diff --git a/CodePush.m b/CodePush.m index 105f4ce..09cec25 100644 --- a/CodePush.m +++ b/CodePush.m @@ -119,20 +119,6 @@ static NSString *bundleResourceName = @"main"; return testConfigurationFlag; } -/* - * This returns the modified date as a string for a given file URL. - */ -+ (NSString *)modifiedDateStringOfFileAtUrl:(NSURL *)fileUrl -{ - if (fileUrl != nil) { - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileUrl path] error:nil]; - NSDate *modifiedDate = [fileAttributes objectForKey:NSFileModificationDate]; - return [NSString stringWithFormat:@"%f", [modifiedDate timeIntervalSince1970]]; - } else { - return nil; - } -} - + (void)setDeploymentKey:(NSString *)deploymentKey { [CodePushConfig current].deploymentKey = deploymentKey; @@ -300,6 +286,20 @@ static NSString *bundleResourceName = @"main"; }); } +/* + * This returns the modified date as a string for a given file URL. + */ ++ (NSString *)modifiedDateStringOfFileAtURL:(NSURL *)fileURL +{ + if (fileURL != nil) { + NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:nil]; + NSDate *modifiedDate = [fileAttributes objectForKey:NSFileModificationDate]; + return [NSString stringWithFormat:@"%f", [modifiedDate timeIntervalSince1970]]; + } else { + return nil; + } +} + /* * This method is used when an update has failed installation * and the app needs to be rolled back to the previous bundle.