@@ -128,32 +128,32 @@ + (NSURL *)bundleURLForResource:(NSString *)resourceName
128128 bundleResourceExtension = resourceExtension;
129129 bundleResourceSubdirectory = resourceSubdirectory;
130130 bundleResourceBundle = resourceBundle;
131-
131+
132132 [self ensureBinaryBundleExists ];
133-
133+
134134 NSString *logMessageFormat = @" Loading JS bundle from %@ " ;
135-
135+
136136 NSError *error;
137137 NSString *packageFile = [CodePushPackage getCurrentPackageBundlePath: &error];
138138 NSURL *binaryBundleURL = [self binaryBundleURL ];
139-
139+
140140 if (error || !packageFile) {
141141 CPLog (logMessageFormat, binaryBundleURL);
142142 isRunningBinaryVersion = YES ;
143143 return binaryBundleURL;
144144 }
145-
145+
146146 NSString *binaryAppVersion = [[CodePushConfig current ] appVersion ];
147147 NSDictionary *currentPackageMetadata = [CodePushPackage getCurrentPackage: &error];
148148 if (error || !currentPackageMetadata) {
149149 CPLog (logMessageFormat, binaryBundleURL);
150150 isRunningBinaryVersion = YES ;
151151 return binaryBundleURL;
152152 }
153-
153+
154154 NSString *packageDate = [currentPackageMetadata objectForKey: BinaryBundleDateKey];
155155 NSString *packageAppVersion = [currentPackageMetadata objectForKey: AppVersionKey];
156-
156+
157157 if ([[CodePushUpdateUtils modifiedDateStringOfFileAtURL: binaryBundleURL] isEqualToString: packageDate] && ([CodePush isUsingTestConfiguration ] ||[binaryAppVersion isEqualToString: packageAppVersion])) {
158158 // Return package file because it is newer than the app store binary's JS bundle
159159 NSURL *packageUrl = [[NSURL alloc ] initFileURLWithPath: packageFile];
@@ -165,11 +165,11 @@ + (NSURL *)bundleURLForResource:(NSString *)resourceName
165165#ifndef DEBUG
166166 isRelease = YES ;
167167#endif
168-
168+
169169 if (isRelease || ![binaryAppVersion isEqualToString: packageAppVersion]) {
170170 [CodePush clearUpdates ];
171171 }
172-
172+
173173 CPLog (logMessageFormat, binaryBundleURL);
174174 isRunningBinaryVersion = YES ;
175175 return binaryBundleURL;
0 commit comments