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