This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,11 @@ - (void)checkForPendingUpdate:(BOOL)needsRestart
103
103
NSString *pendingHash = pendingUpdate[PendingUpdateHashKey];
104
104
NSString *currentHash = [CodePushPackage getCurrentPackageHash: &error];
105
105
106
- // If the current hash is equivalent to the pending hash, then the app
107
- // restart "picked up" the new update, but we need to kick off the
108
- // rollback timer and ensure that the necessary state is setup.
109
- if ([pendingHash isEqualToString: currentHash]) {
110
- int rollbackTimeout = [pendingUpdate[PendingUpdateRollbackTimeoutKey] intValue ];
111
- [self initializeUpdateWithRollbackTimeout: rollbackTimeout needsRestart: needsRestart];
112
- } else {
113
- // NOTE: We shouldn't ever reach here
114
- }
106
+ NSAssert ([pendingHash isEqualToString: currentHash], @" There is a pending update but it's hash doesn't match that of the current package." );
107
+
108
+ // Kick off the rollback timer and ensure that the necessary state is setup for the pending update.
109
+ int rollbackTimeout = [pendingUpdate[PendingUpdateRollbackTimeoutKey] intValue ];
110
+ [self initializeUpdateWithRollbackTimeout: rollbackTimeout needsRestart: needsRestart];
115
111
116
112
// Clear the pending update and sync
117
113
[preferences removeObjectForKey: PendingUpdateKey];
You can’t perform that action at this time.
0 commit comments