自动检测APP Store是否有app的新版本,如果有的话,则推送本地化的通知给用户。
特点
只需要添加两行代码即可使用
自动检测APP Store是否有新版本。不需要服务器。
在用户使用完app之后通知用户。不会打扰用户。
快速例子
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[Pigeon sharedInstance] startWithAppleId:@"584296227"];
return YES;
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[[Pigeon sharedInstance] openInAppStore];
}
@end
定制化
你也可以对Pigeon进行定制。记住要在调用startWithAppleId:之前设置定制化属性
你可以自己管理latestVersion,这样Pigeon可以不从App Store获取数据。
@property (strong, nonatomic) NSString *latestVersion;
本地推送的消息:
@property (strong, nonatomic) NSString *updateMessage;
country code(比如说 @"us", @"ru")。如果你的app没有在所有国家上架的话,则必须设置这个:
@property (strong, nonatomic) NSString *countyCode;
通知的间隔。默认是一天。
@property (assign, nonatomic) NSTimeInterval notifyInterval;
如果你使用Pigeon的话请到Github告诉作者吧:
https://github.com/lightory/Pigeon