AYCheckVersion 1.3.5

AYCheckVersion 1.3.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2018

Maintained by AYJk.



  • By
  • Andy

AYCheckVersion

LICENSE  SUPPORT  CocoaPods Version 

我的博客中有详尽的实现过程和相关说明: iOS利用iTunesLookup检查更新

介绍

这是一个从AppStore检测最新版本的工具类。 Debug环境下输出取回的应用更新信息,Release环境下不输出

安装

推荐使用CocoaPods进行安装。

pod 'AYCheckVersion'

然后输入 pod install or pod update。将会安装最新版本的AYCheckVersion。

最后导入头文件<AYCheckVersion/AYCheckVersion.h>

用法

AYCheckManager *checkManger = [AYCheckManager sharedCheckManager];
[checkManger checkVersion];

使用默认属性进行版本的检测。

- (void)checkVersion;

自定义警示框的标题,下次提示的标题,立即更新的标题。

- (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle;

自定义警示框的标题,下次提示的标题,立即更新的标题,跳过该版本的标题。

- (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle skipVersionTitle:(NSString *)skipVersionTitle;

如果你想在当前应用中以模态视图的形式打开AppStore,请设置openAPPStoreInsideAPP,默认从应用跳转出去到AppStore。

checkManger.openAPPStoreInsideAPP = YES;

如果你无法检测到你的App的最新版。请设置你应用的销售地区,如:countryAbbreviation = @"cn",countryAbbreviation = @"us"。通常情况下,你不需要设置这个属性。

checkManger.countryAbbreviation = @"cn";

版本更新

v 1.3.0 解决CDN缓存导致的更新延迟问题。issues9

v 1.2.0 修复个别线上版本号和提审版本号带来的问题

v 1.1.2 修复由于iTunes被墙使返回的data为nil所导致的异常 issues3,去除debug开关,debug环境下默认输出更新内容

v 1.1.0 修复因项目个别version问题导致的bug

v 1.0.1 添加debug开关,输出当前更新信息

v 1.0.0 首次提交

许可证

AYCheckVersion 使用 MIT 许可证,详情见 LICENSE 文件。