From 7a8faa2450eb6439a1e6a826b011e472ab8e15cd Mon Sep 17 00:00:00 2001 From: Geoffrey Goh Date: Fri, 5 Feb 2016 17:12:36 -0800 Subject: [PATCH] rename function --- CodePush.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CodePush.m b/CodePush.m index db086f1..7a6e8fb 100644 --- a/CodePush.m +++ b/CodePush.m @@ -87,7 +87,7 @@ static NSString *bundleResourceName = @"main"; NSString *packageDate = [currentPackageMetadata objectForKey:BinaryBundleDateKey]; NSString *packageAppVersion = [currentPackageMetadata objectForKey:@"appVersion"]; - if ([[self modifiedDateStringFromFileUrl:binaryBundleURL] isEqualToString:packageDate] && ([CodePush isUsingTestConfiguration] ||[binaryAppVersion isEqualToString:packageAppVersion])) { + if ([[self modifiedDateStringOfFileAtUrl:binaryBundleURL] isEqualToString:packageDate] && ([CodePush isUsingTestConfiguration] ||[binaryAppVersion isEqualToString:packageAppVersion])) { // Return package file because it is newer than the app store binary's JS bundle NSURL *packageUrl = [[NSURL alloc] initFileURLWithPath:packageFile]; NSLog(logMessageFormat, packageUrl); @@ -122,7 +122,7 @@ static NSString *bundleResourceName = @"main"; /* * This returns the modified date as a string for a given file URL. */ -+ (NSString *)modifiedDateStringFromFileUrl:(NSURL *)fileUrl ++ (NSString *)modifiedDateStringOfFileAtUrl:(NSURL *)fileUrl { if (fileUrl != nil) { NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileUrl path] error:nil]; @@ -397,7 +397,7 @@ RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary*)updatePackage NSDictionary *mutableUpdatePackage = [updatePackage mutableCopy]; NSURL *binaryBundleURL = [CodePush binaryBundleURL]; if (binaryBundleURL != nil) { - [mutableUpdatePackage setValue:[CodePush modifiedDateStringFromFileUrl:binaryBundleURL] + [mutableUpdatePackage setValue:[CodePush modifiedDateStringOfFileAtUrl:binaryBundleURL] forKey:BinaryBundleDateKey]; }