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 +4
-27
lines changed Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -113,14 +113,16 @@ - (instancetype)init
113
113
self = [super init ];
114
114
115
115
if (self) {
116
- // Do a check to see whether we need to start the rollback timer
117
- // due to a pending update being installed at start
118
116
[self initializeUpdateAfterRestart ];
119
117
}
120
118
121
119
return self;
122
120
}
123
121
122
+ /*
123
+ * This method starts the rollback protection timer
124
+ * and is used when a new update is initialized.
125
+ */
124
126
- (void )initializeUpdateAfterRestart
125
127
{
126
128
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults ];
@@ -141,31 +143,6 @@ - (void)initializeUpdateAfterRestart
141
143
}
142
144
}
143
145
144
-
145
- /*
146
- * This method performs the actual initialization work for an update
147
- * to ensure that the necessary state is setup, including:
148
- * --------------------------------------------------------
149
- * 1. Updating the current bundle URL to point at the latest update on disk
150
- * 2. Optionally restarting the app to load the new bundle
151
- * 3. Optionally starting the rollback protection timer
152
- */
153
- - (void )initializeUpdateWithRollbackTimeout : (int )rollbackTimeout
154
- needsRestart : (BOOL )needsRestart
155
- {
156
- didUpdate = YES ;
157
-
158
- if (needsRestart) {
159
- [self loadBundle ];
160
- }
161
-
162
- if (0 != rollbackTimeout) {
163
- dispatch_async (dispatch_get_main_queue (), ^{
164
- [self startRollbackTimer: rollbackTimeout];
165
- });
166
- }
167
- }
168
-
169
146
/*
170
147
* This method checks to see whether a specific package hash
171
148
* has previously failed installation.
You can’t perform that action at this time.
0 commit comments