Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 146355b

Browse files
author
Rahul Jiresal
committed
Fix the hash mismatch happening due to .DS_Store file when running on simulator
1 parent 93c3e61 commit 146355b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ios/CodePush/CodePushUpdateUtils.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ + (void)addContentsOfFolderToManifest:(NSString *)folderPath
2020
}
2121

2222
for (NSString *fileName in folderFiles) {
23+
#if TARGET_IPHONE_SIMULATOR
24+
// If the user is running this in a simulator, there is a chance
25+
// that the .DS_Store file will mess up the calculated hash
26+
// We must skip this file.
27+
if ([fileName isEqualToString:@".DS_Store"]) {
28+
continue;
29+
}
30+
#endif
2331
NSString *fullFilePath = [folderPath stringByAppendingPathComponent:fileName];
2432
NSString *relativePath = [pathPrefix stringByAppendingPathComponent:fileName];
2533
BOOL isDir = NO;

0 commit comments

Comments
 (0)