ATAppUpdater 2.0

ATAppUpdater 2.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年5月

Jean-Pierre Fourie维护。




ATAppUpdater 2.0

检查您的AppStore中是否有更新的应用版本,并提示用户更新。

特性

  • 一行代码
  • 毫秒级响应
  • 线程安全
  • 在弹窗中显示版本号
  • 从弹窗中打开AppStore中的应用
  • 可选择或不强制用户现在更新
  • 支持本地化
  • 支持委托方法

示例

一行代码

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   [[ATAppUpdater sharedUpdater] showUpdateWithForce];
   return YES;
}

ATAppUpdater1

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   [[ATAppUpdater sharedUpdater] showUpdateWithConfirmation];
   return YES;
}

ATAppUpdater2


自定义标题 + 本地化

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   ATAppUpdater *updater = [ATAppUpdater sharedUpdater];
   [updater setAlertTitle:NSLocalizedString(@"Nuwe Weergawe", @"Alert Title")];
   [updater setAlertMessage:NSLocalizedString(@"Weergawe %@ is beskikbaar op die AppStore.", @"Alert Message")];
   [updater setAlertUpdateButtonTitle:@"Opgradeer"];
   [updater setAlertCancelButtonTitle:@"Nie nou nie"];
   [updater setDelegate:self]; // Optional
   [updater showUpdateWithConfirmation];
   return YES;
}

ATAppUpdater3


支持委托方法

- (void)appUpdaterDidShowUpdateDialog;
- (void)appUpdaterUserDidLaunchAppStore;
- (void)appUpdaterUserDidCancel;

安装

手动

  • ATAppUpdater文件夹复制到您的项目中
  • 链接SystemConfiguration.framework
  • #import "ATAppUpdater.h"在所需的类中
  • 如果需要,则添加<ATAppUpdaterDelegate>协议

CocoaPods

  • 将以下内容添加到podfile中:pod 'ATAppUpdater'
  • #import "ATAppUpdater.h"在所需的类中
  • 如果需要,则添加<ATAppUpdaterDelegate>协议

许可证

ATAppUpdater遵循MIT许可证发布。有关详细信息,请参阅LICENSE