iOS Appstore 版本更新
生活随笔
收集整理的這篇文章主要介紹了
iOS Appstore 版本更新
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1,版本更新 通過比較構建號/版本號 檢查更新
?
/// ?構建號 50 // NSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleVersion"];/// 版本號 2.2.0//CFBundleShortVersionStringNSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];NSLog(@"receiveData=%@",sender);// sender[@"version"] @"1.1.3"if ( [sender[@"version"] compare:currentVersion options:NSNumericSearch] == NSOrderedDescending) {UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"有新版本更新,是否前往AppStore下載" delegate:self cancelButtonTitle:@"不去" otherButtonTitles:@"立即前往", nil];alert.tag = 1000;/// 上線前打開 [alert show];}?
/*線上 compare 本地if ( [@"1.2.0" compare:@"1.1" options:NSNumericSearch] == NSOrderedDescending) {NSLog(@"1.2>1.1.1");}*/?
轉載于:https://www.cnblogs.com/code-Officer/p/7001224.html
總結
以上是生活随笔為你收集整理的iOS Appstore 版本更新的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c#html表格样式大全,漂亮的表格样式
- 下一篇: [密码学基础][每个信息安全博士生应该知