Skip to content

Commit 5bcc878

Browse files
committed
use CFBundleShortVersionString to compare.
1 parent 5dd67ef commit 5bcc878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AWVersionAgent/AWVersionAgent.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ - (void)checkNewVersionForApp:(NSString *)appid
7676
[[NSUserDefaults standardUserDefaults] setObject:newVersion
7777
forKey:@"kAppNewVersion"];
7878
[[NSUserDefaults standardUserDefaults] synchronize];
79-
NSString *curVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
79+
NSString *curVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
8080
if (newVersion && curVersion && ![newVersion isEqualToString:curVersion]) {
8181
self.newVersionAvailable = YES;
8282
}

0 commit comments

Comments
 (0)