react-native-update 10.55.0 → 10.55.1
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.
- package/ios/RCTPushy/RCTPushy.mm +8 -1
- package/package.json +1 -1
- package/src/client.ts +8 -4
package/ios/RCTPushy/RCTPushy.mm
CHANGED
|
@@ -14,8 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
#import <UIKit/UIKit.h>
|
|
16
16
|
|
|
17
|
+
// use_frameworks! 构建里 React 头文件只有 <React/…> 框架形式可见,引号形式的
|
|
18
|
+
// __has_include 会探测失败;漏掉这里会静默编入 [self.bridge reload] 兜底,而
|
|
19
|
+
// bridgeless 下 bridge 是 nil/代理,reload 变成无声 no-op(切版本后不重启)。
|
|
17
20
|
#if __has_include("RCTReloadCommand.h")
|
|
18
21
|
#import "RCTReloadCommand.h"
|
|
22
|
+
#define PUSHY_HAS_RELOAD_COMMAND 1
|
|
23
|
+
#elif __has_include(<React/RCTReloadCommand.h>)
|
|
24
|
+
#import <React/RCTReloadCommand.h>
|
|
25
|
+
#define PUSHY_HAS_RELOAD_COMMAND 1
|
|
19
26
|
#endif
|
|
20
27
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
21
28
|
#import "RCTPushySpec.h"
|
|
@@ -1256,7 +1263,7 @@ RCT_EXPORT_METHOD(resetToPackagedBundle:(RCTPromiseResolveBlock)resolve
|
|
|
1256
1263
|
- (void)reloadBridgeWithReason:(NSString *)reason
|
|
1257
1264
|
{
|
|
1258
1265
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1259
|
-
#if
|
|
1266
|
+
#if PUSHY_HAS_RELOAD_COMMAND
|
|
1260
1267
|
RCTReloadCommandSetBundleURL([[self class] bundleURL]);
|
|
1261
1268
|
RCTTriggerReloadCommandListeners(reason);
|
|
1262
1269
|
#else
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -1291,6 +1291,14 @@ export class Pushy {
|
|
|
1291
1291
|
) => {
|
|
1292
1292
|
const { name, description = '', metaInfo } = updateInfo;
|
|
1293
1293
|
const { hash, attempts, devNoop } = plan;
|
|
1294
|
+
if (devNoop) {
|
|
1295
|
+
// Dev without a full package URL: nothing can be fetched, let alone
|
|
1296
|
+
// installed. Say so and deliver nothing — faking a success here used to
|
|
1297
|
+
// hand the caller a hash whose switchVersion the native side (rightly)
|
|
1298
|
+
// rejects with SWITCH_VERSION_FAILED.
|
|
1299
|
+
log(this.t('dev_incremental_update_disabled'));
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1294
1302
|
const patchStartTime = Date.now();
|
|
1295
1303
|
// One native listener per hash dispatching to a callback set, so
|
|
1296
1304
|
// concurrent callers deduped onto this task can each observe progress
|
|
@@ -1396,10 +1404,6 @@ export class Pushy {
|
|
|
1396
1404
|
attempt,
|
|
1397
1405
|
},
|
|
1398
1406
|
});
|
|
1399
|
-
if (devNoop) {
|
|
1400
|
-
log(this.t('dev_incremental_update_disabled'));
|
|
1401
|
-
succeeded = 'full';
|
|
1402
|
-
}
|
|
1403
1407
|
for (const { type, urls } of attempts) {
|
|
1404
1408
|
if (succeeded) {
|
|
1405
1409
|
break;
|