Skip to content

Check and notify user that new version is available from Local Notification.

License

Notifications You must be signed in to change notification settings

guange2015/AWVersionAgent

 
 

Repository files navigation

AWVersionAgent

修改日志:

  1. 将本地通知改为进入时弹AlertView.
  2. 加入自定义更新方式

There is so many update checker using UIAlertView to notify user to upgrade your app, but the alert will stop user's action. AWVersionAgent will check new version in background and notify user that new version is available from Local Notification.

Usage:

  1. Add [[AWVersionAgent sharedAgent] checkNewVersionForApp:@"your-app-id"]; in application:didFinishLaunchingWithOptions: to check new version in background.
  2. Add [[AWVersionAgent sharedAgent] upgradeAppWithNotification:notification]; in application:didReceiveLocalNotification: to response local notification.
  3. You can enable debug mode by [[AWVersionAgent sharedAgent] setDebug:YES];.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [self.window makeKeyAndVisible];

    [[AWVersionAgent sharedAgent] checkNewVersion];

    return YES;
}

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
    [[AWVersionAgent sharedAgent] upgradeAppWithNotification:notification];
}

License

AWVersionAgent is available under the MIT license.

About

Check and notify user that new version is available from Local Notification.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.7%
  • Ruby 0.3%