react-native-update 9.0.0-beta.3 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,6 @@ typedef NS_ENUM(NSInteger, PushyType) {
53
53
  };
54
54
 
55
55
  static BOOL ignoreRollback = false;
56
- static BOOL isUsingBundleUrl = false;
57
56
 
58
57
  @implementation RCTPushy {
59
58
  RCTPushyManager *_fileManager;
@@ -66,7 +65,6 @@ RCT_EXPORT_MODULE(RCTPushy);
66
65
 
67
66
  + (NSURL *)bundleURL
68
67
  {
69
- isUsingBundleUrl = true;
70
68
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
71
69
 
72
70
  NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
@@ -163,7 +161,6 @@ RCT_EXPORT_MODULE(RCTPushy);
163
161
  ret[@"uuid"] = [defaults objectForKey:keyUuid];
164
162
  NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
165
163
  ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion];
166
- ret[@"isUsingBundleUrl"] = @(isUsingBundleUrl);
167
164
 
168
165
  // clear isFirstTimemarked
169
166
  if (ret[@"isFirstTime"]) {
package/lib/main.ts CHANGED
@@ -44,7 +44,7 @@ export const buildTime = PushyConstants.buildTime;
44
44
  let blockUpdate = PushyConstants.blockUpdate;
45
45
  let uuid = PushyConstants.uuid;
46
46
 
47
- if (!PushyConstants.isUsingBundleUrl) {
47
+ if (Platform.OS === 'android' && !PushyConstants.isUsingBundleUrl) {
48
48
  throw new Error(
49
49
  'react-native-update模块无法加载,请对照文档检查Bundle URL的配置',
50
50
  );
@@ -125,6 +125,7 @@ export const cInfo = {
125
125
  };
126
126
 
127
127
  function assertRelease() {
128
+ // @ts-expect-error
128
129
  if (__DEV__) {
129
130
  throw new Error('react-native-update 只能在 RELEASE 版本中运行.');
130
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "9.0.0-beta.3",
3
+ "version": "9.0.0",
4
4
  "description": "react-native hot update",
5
5
  "main": "lib/index.ts",
6
6
  "scripts": {