mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-23 17:48:55 +08:00
Update version to 10.31.1, enhance iOS Info.plist with camera and photo library usage descriptions, and refactor code for improved readability in index.tsx. Adjust currentVersionInfo retrieval in RCTPushy.mm for better data handling.
This commit is contained in:
@@ -37,8 +37,14 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>For taking photos</string>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
|
<string>For saving photos</string>
|
||||||
|
<key>RCTNewArchEnabled</key>
|
||||||
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
@@ -53,10 +59,5 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>For taking photos</string>
|
|
||||||
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
|
||||||
<string>For saving photos</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,6 @@ import {
|
|||||||
import { Camera } from 'react-native-camera-kit';
|
import { Camera } from 'react-native-camera-kit';
|
||||||
import { LocalSvg } from 'react-native-svg/css';
|
import { LocalSvg } from 'react-native-svg/css';
|
||||||
|
|
||||||
|
|
||||||
import TestConsole from './TestConsole';
|
import TestConsole from './TestConsole';
|
||||||
|
|
||||||
import _updateConfig from '../update.json';
|
import _updateConfig from '../update.json';
|
||||||
@@ -54,7 +53,7 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Text style={styles.welcome}>欢迎使用Pushy热更新服务</Text>
|
<Text style={styles.welcome}>欢迎22使用Pushy热更新服务</Text>
|
||||||
<View style={{ flexDirection: 'row' }}>
|
<View style={{ flexDirection: 'row' }}>
|
||||||
<Text>
|
<Text>
|
||||||
{useDefaultAlert ? '当前使用' : '当前不使用'}默认的alert更新提示
|
{useDefaultAlert ? '当前使用' : '当前不使用'}默认的alert更新提示
|
||||||
@@ -124,7 +123,8 @@ function App() {
|
|||||||
onPress={() => {
|
onPress={() => {
|
||||||
checkUpdate();
|
checkUpdate();
|
||||||
setShowUpdateSnackbar(true);
|
setShowUpdateSnackbar(true);
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Text style={styles.instructions}>点击这里检查更新</Text>
|
<Text style={styles.instructions}>点击这里检查更新</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
@@ -133,7 +133,8 @@ function App() {
|
|||||||
style={{ marginTop: 15 }}
|
style={{ marginTop: 15 }}
|
||||||
onLongPress={() => {
|
onLongPress={() => {
|
||||||
setShowTestConsole(true);
|
setShowTestConsole(true);
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Text style={styles.instructions}>
|
<Text style={styles.instructions}>
|
||||||
react-native-update版本:{client?.version}
|
react-native-update版本:{client?.version}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -155,7 +156,8 @@ function App() {
|
|||||||
await downloadUpdate();
|
await downloadUpdate();
|
||||||
setShowUpdateBanner(true);
|
setShowUpdateBanner(true);
|
||||||
},
|
},
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Text style={{ color: 'white' }}>
|
<Text style={{ color: 'white' }}>
|
||||||
有新版本({updateInfo.name})可用,是否更新?
|
有新版本({updateInfo.name})可用,是否更新?
|
||||||
</Text>
|
</Text>
|
||||||
@@ -179,7 +181,8 @@ function App() {
|
|||||||
]}
|
]}
|
||||||
icon={({ size }) => (
|
icon={({ size }) => (
|
||||||
<Icon name="checkcircleo" size={size} color="#00f" />
|
<Icon name="checkcircleo" size={size} color="#00f" />
|
||||||
)}>
|
)}
|
||||||
|
>
|
||||||
更新已完成,是否立即重启?
|
更新已完成,是否立即重启?
|
||||||
</Banner>
|
</Banner>
|
||||||
</View>
|
</View>
|
||||||
|
@@ -178,7 +178,7 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
||||||
NSString *currentVersion = [pushyInfo objectForKey:paramCurrentVersion];
|
NSString *currentVersion = [pushyInfo objectForKey:paramCurrentVersion];
|
||||||
ret[@"currentVersion"] = currentVersion;
|
ret[@"currentVersion"] = currentVersion;
|
||||||
ret[@"currentVersionInfo"] = [pushyInfo objectForKey:[keyHashInfo stringByAppendingString:currentVersion]];
|
ret[@"currentVersionInfo"] = [defaults objectForKey:[keyHashInfo stringByAppendingString:currentVersion]];
|
||||||
|
|
||||||
// clear isFirstTimemarked
|
// clear isFirstTimemarked
|
||||||
if (ret[@"isFirstTime"]) {
|
if (ret[@"isFirstTime"]) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "10.31.0",
|
"version": "10.31.1",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "src/index",
|
"main": "src/index",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user