Skip to content

Commit 8945aca

Browse files
committed
Binary hash w/o assets
1 parent c8fe32f commit 8945aca

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

ios/CodePush/CodePushUpdateUtils.m

+11-7
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,19 @@ + (NSString *)getHashForBinaryContents:(NSURL *)binaryBundleUrl
175175
}
176176

177177
binaryHashDictionary = [NSMutableDictionary dictionary];
178+
NSMutableArray *manifest = [NSMutableArray array];
178179

180+
// If the app is using assets, then add
181+
// them to the generated content manifest.
179182
NSString *assetsPath = [CodePushPackage getBinaryAssetsPath];
180-
NSMutableArray *manifest = [NSMutableArray array];
181-
[self addContentsOfFolderToManifest:assetsPath
182-
pathPrefix:[NSString stringWithFormat:@"%@/%@", [self manifestFolderPrefix], @"assets"]
183-
manifest:manifest
184-
error:error];
185-
if (*error) {
186-
return nil;
183+
if ([[NSFileManager defaultManager] fileExistsAtPath:assetsPath]) {
184+
[self addContentsOfFolderToManifest:assetsPath
185+
pathPrefix:[NSString stringWithFormat:@"%@/%@", [self manifestFolderPrefix], @"assets"]
186+
manifest:manifest
187+
error:error];
188+
if (*error) {
189+
return nil;
190+
}
187191
}
188192

189193
NSData *jsBundleContents = [NSData dataWithContentsOfURL:binaryBundleUrl];

0 commit comments

Comments
 (0)