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

Commit e29ea84

Browse files
committed
feedback
1 parent e5ec7fd commit e29ea84

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CodePush.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ + (NSURL *)bundleURLForResource:(NSString *)resourceName
5757
NSError *error;
5858
NSString *packageFile = [CodePushPackage getCurrentPackageBundlePath:&error];
5959
NSURL *binaryJsBundleUrl = [[NSBundle mainBundle] URLForResource:resourceName withExtension:resourceExtension];
60-
NSDictionary *binaryFileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[binaryJsBundleUrl path] error:nil];
61-
NSDate *binaryDate = [binaryFileAttributes objectForKey:NSFileModificationDate];
62-
[self saveBinaryBundleDate:binaryDate];
60+
[self saveBinaryBundleDate:binaryJsBundleUrl];
6361

6462
NSString *logMessageFormat = @"Loading JS bundle from %@";
6563

@@ -124,10 +122,12 @@ + (BOOL)isUsingTestConfiguration
124122
return testConfigurationFlag;
125123
}
126124

127-
+ (void)saveBinaryBundleDate:(NSDate *)binaryBundleDate
125+
+ (void)saveBinaryBundleDate:(NSURL *)binaryJsBundleUrl
128126
{
127+
NSDictionary *binaryFileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[binaryJsBundleUrl path] error:nil];
128+
NSDate *binaryDate = [binaryFileAttributes objectForKey:NSFileModificationDate];
129129
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
130-
[preferences setObject:binaryBundleDate forKey:BinaryBundleDateKey];
130+
[preferences setObject:binaryDate forKey:BinaryBundleDateKey];
131131
[preferences synchronize];
132132
}
133133

0 commit comments

Comments
 (0)