Check iOS app newest version according to appstore automatically. It works on iOS 6.0+ and requires ARC to build.
- directly add the ZZYAppVersionManager.h and ZZYAppVersionManager.m source files to your project
- in AppDelegate class
#import "ZZYAppVersionManager.h"
- in AppDelegate.m didFinishLaunchingWithOptions's method
[[ZZYAppVersionManager sharedInstance] start];
- you can implemetion
NewVersionHandle
block yourself with a custom alert view.
[ZZYAppVersionManager sharedInstance].versionHandle = ^(NSString *releaseNote) {
//TODO:: 实现自定义弹窗的方法(推荐用默认的弹窗即可)
NSLog(@"release note is %@",releaseNote);
};
[[ZZYAppVersionManager sharedInstance] start];
- set the minimal alert time interval
[ZZYAppVersionManager sharedInstance].minimalInterval = 24 * 3600;
Instead of running the project on simulator, you should run it on device.