开源库
https://github.com/nicklockwood/iVersion
添加Configurations
添加 宏定义
编写自动更新代码
编辑AppDelegate.m
ifdef GITHUB
(void)initialize { //configure iVersion. These paths are optional - if you don't set //them, iVersion will just get the release notes from iTunes directly (if your app is on the store)
[iVersion sharedInstance].remoteVersionsPlistURL = @"https://gpxj.github.io/versions.plist"; [iVersion sharedInstance].localVersionsPlistPath = @"versions.plist"; NSString *updateUrl = @"itms-services:///?action=download-manifest&url=https://gpxj.github.io/gpxj.plist";
[iVersion sharedInstance].updateURL = [NSURL URLWithString:updateUrl]; }
endif