Repository: AYJk/AYCheckVersion Branch: master Commit: 5e8e0fa4ad9d Files: 22 Total size: 54.9 KB Directory structure: gitextract_l1htb093/ ├── .gitignore ├── .travis.yml ├── AYCheckVersion/ │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets/ │ │ └── AppIcon.appiconset/ │ │ └── Contents.json │ ├── Base.lproj/ │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Classes/ │ │ ├── AYCheckManager.h │ │ └── AYCheckManager.m │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── AYCheckVersion.podspec ├── AYCheckVersion.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── AYCheckVersionTests/ │ ├── AYCheckVersionTests.m │ └── Info.plist ├── AYCheckVersionUITests/ │ ├── AYCheckVersionUITests.m │ └── Info.plist ├── LICENSE └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated build/ DerivedData ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata ## Other *.xccheckout *.moved-aside *.xcuserstate *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md fastlane/report.xml fastlane/screenshots ================================================ FILE: .travis.yml ================================================ language: objective-c before_install: - brew update - brew install xctool script: xctool -project AYCheckVersion.xcodeproj -scheme AYCheckVersion -sdkiphonesimulator test ================================================ FILE: AYCheckVersion/AppDelegate.h ================================================ // // AppDelegate.h // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; @end ================================================ FILE: AYCheckVersion/AppDelegate.m ================================================ // // AppDelegate.m // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { return YES; } - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } @end ================================================ FILE: AYCheckVersion/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: AYCheckVersion/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: AYCheckVersion/Base.lproj/Main.storyboard ================================================ ================================================ FILE: AYCheckVersion/Classes/AYCheckManager.h ================================================ // // AYCheckManager.h // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import @interface AYCheckManager : NSObject /** * open APPStore inside your APP, default is No. */ @property (nonatomic, assign) BOOL openAPPStoreInsideAPP; // if you can't get the update info of your APP. Set countryAbbreviation of the sale area. like `countryAbbreviation = @"cn"`,`countryAbbreviation = @"us"`.General, you don't need to set this property. @property (nonatomic, copy) NSString *countryAbbreviation; /** * get a singleton of the Check Manager */ + (instancetype)sharedCheckManager; /** * start check version with default param. */ - (void)checkVersion; /** * start check version with AlertTitle,NextTimeTitle,ConfimTitle. */ - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle; /** * start check version with AlertTitle,NextTimeTitle,ConfimTitle,skipVersionTitle. */ - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle skipVersionTitle:(NSString *)skipVersionTitle; @end ================================================ FILE: AYCheckVersion/Classes/AYCheckManager.m ================================================ // // AYCheckManager.m // AYCheckVersion // com.ayjkdev.AYCheckVersion // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import "AYCheckManager.h" #import #define REQUEST_SUCCEED 200 #define CURRENT_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] #define BUNDLE_IDENTIFIER [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] #define SYSTEM_VERSION_8_OR_ABOVE (([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)? (YES):(NO)) #define TRACK_ID @"TRACKID" #define APP_LAST_VERSION @"APPLastVersion" #define APP_RELEASE_NOTES @"APPReleaseNotes" #define APP_TRACK_VIEW_URL @"APPTRACKVIEWURL" #define SPECIAL_MODE_CHECK_URL @"https://itunes.apple.com/lookup?country=%@&bundleId=%@×tamp=%ld" #define NORMAL_MODE_CHECK_URL @"https://itunes.apple.com/lookup?bundleId=%@×tamp=%ld" #define SKIP_CURRENT_VERSION @"SKIPCURRENTVERSION" #define SKIP_VERSION @"SKIPVERSION" @interface AYCheckManager () @property (nonatomic, copy) NSString *nextTimeTitle; @property (nonatomic, copy) NSString *confimTitle; @property (nonatomic, copy) NSString *alertTitle; @property (nonatomic, copy) NSString *skipVersionTitle; @end @implementation AYCheckManager static AYCheckManager *checkManager = nil; + (instancetype)sharedCheckManager { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ checkManager = [[AYCheckManager alloc] init]; checkManager.nextTimeTitle = @"下次提示"; checkManager.confimTitle = @"前往更新"; checkManager.alertTitle = @"发现新版本"; checkManager.skipVersionTitle = nil; }); return checkManager; } - (void)checkVersion { [self checkVersionWithAlertTitle:self.alertTitle nextTimeTitle:self.nextTimeTitle confimTitle:self.confimTitle]; } - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle { [self checkVersionWithAlertTitle:alertTitle nextTimeTitle:nextTimeTitle confimTitle:confimTitle skipVersionTitle:nil]; } - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle skipVersionTitle:(NSString *)skipVersionTitle { self.alertTitle = alertTitle; self.nextTimeTitle = nextTimeTitle; self.confimTitle = confimTitle; self.skipVersionTitle = skipVersionTitle; [checkManager getInfoFromAppStore]; } - (void)getInfoFromAppStore { NSInteger timeStamp = [[NSDate date] timeIntervalSince1970]; NSURL *requestURL; if (self.countryAbbreviation == nil) { requestURL = [NSURL URLWithString:[NSString stringWithFormat:NORMAL_MODE_CHECK_URL,BUNDLE_IDENTIFIER,timeStamp]]; } else { requestURL = [NSURL URLWithString:[NSString stringWithFormat:SPECIAL_MODE_CHECK_URL,self.countryAbbreviation,BUNDLE_IDENTIFIER,timeStamp]]; } NSURLRequest *request = [NSURLRequest requestWithURL:requestURL]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSHTTPURLResponse *urlResponse = (NSHTTPURLResponse *)response; if (data == nil) { return ; } if (urlResponse.statusCode == REQUEST_SUCCEED) { @try { NSDictionary *responseDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]; NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; if ([responseDic[@"resultCount"] intValue] == 1) { NSArray *results = responseDic[@"results"]; NSDictionary *resultDic = [results firstObject]; [userDefault setObject:resultDic[@"version"] forKey:APP_LAST_VERSION]; [userDefault setObject:resultDic[@"releaseNotes"] forKey:APP_RELEASE_NOTES]; [userDefault setObject:resultDic[@"trackViewUrl"] forKey:APP_TRACK_VIEW_URL]; [userDefault setObject:resultDic[@"trackId"] forKey:TRACK_ID]; if ([resultDic[@"version"] isEqualToString:CURRENT_VERSION] || ![[userDefault objectForKey:SKIP_VERSION] isEqualToString:resultDic[@"version"]]) { [userDefault setBool:NO forKey:SKIP_CURRENT_VERSION]; } [userDefault synchronize]; #ifdef DEBUG NSLog(@"*****************\nAPP_LAST_VERSION:\n%@\nAPP_RELEASE_NOTES:\n%@\n*****************",[userDefault objectForKey:APP_LAST_VERSION],[userDefault objectForKey:APP_RELEASE_NOTES]); #endif dispatch_async(dispatch_get_main_queue(), ^{ if (![[userDefault objectForKey:SKIP_CURRENT_VERSION] boolValue]) { if (![self isEqualByCompareLastVersion:resultDic[@"version"] withCurrentVersion:CURRENT_VERSION]) { [self compareWithCurrentVersion]; } } }); } } @catch (NSException *exception) { NSLog(@"exception.name = %@, exception.reason = %@", exception.name, exception.reason); } @finally { } } }]; [dataTask resume]; } /** * 比较当前版本号是否与沙盒中的版本号相同 */ //- (BOOL)isEqualByCompareLastVersion:(NSString *)lastVersion withCurrentVersion:(NSString *)currentVersion { // NSArray *lastVersionArray = [lastVersion componentsSeparatedByString:@"."]; // NSArray *currentVersionArray = [currentVersion componentsSeparatedByString:@"."]; // if (lastVersionArray.count != currentVersionArray.count) { // return NO; // } // for (int index = 0; index < lastVersionArray.count; index++) { // if ([currentVersionArray[index] integerValue] != [lastVersionArray[index] integerValue]) { // return NO; // } // } // return YES; //} - (BOOL)isEqualByCompareLastVersion:(NSString *)lastVersion withCurrentVersion:(NSString *)currentVersion { NSMutableArray *lastVersionArray = [[lastVersion componentsSeparatedByString:@"."] mutableCopy]; NSMutableArray *currentVersionArray = [[currentVersion componentsSeparatedByString:@"."] mutableCopy]; int modifyCount = abs((int)(lastVersionArray.count - currentVersionArray.count)); if (lastVersionArray.count > currentVersionArray.count) { for (int index = 0; index < modifyCount; index ++) { [currentVersionArray addObject:@"0"]; } } else if (lastVersionArray.count < currentVersionArray.count) { for (int index = 0; index < modifyCount; index ++) { [lastVersionArray addObject:@"0"]; } } for (int index = 0; index < lastVersionArray.count; index++) { if ([currentVersionArray[index] integerValue] > [lastVersionArray[index] integerValue]) { return YES; } else if ([currentVersionArray[index] integerValue] < [lastVersionArray[index] integerValue]) { return NO; } } return NO; } - (double)floatForVersion:(NSString *)version { NSArray *versionArray = [version componentsSeparatedByString:@"."]; NSMutableString *versionString = @"".mutableCopy; for (int index = 0; index < versionArray.count; index++) { [versionString appendString:versionArray[index]]; if (!index) { [versionString appendString:@"."]; } } return versionString.doubleValue; } - (void)compareWithCurrentVersion { NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; NSString *updateMessage = [userDefault objectForKey:APP_RELEASE_NOTES]; if (![[userDefault objectForKey:APP_LAST_VERSION] isEqualToString:CURRENT_VERSION]) { if (SYSTEM_VERSION_8_OR_ABOVE) { __weak typeof(self) weakSelf = self; UIAlertController *alertControler = [UIAlertController alertControllerWithTitle:self.alertTitle message:updateMessage preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:self.nextTimeTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { }]; UIAlertAction *confimAction = [UIAlertAction actionWithTitle:self.confimTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [weakSelf openAPPStore]; }]; [alertControler addAction:confimAction]; [alertControler addAction:cancelAction]; if (self.skipVersionTitle != nil) { UIAlertAction *skipVersionAction = [UIAlertAction actionWithTitle:self.skipVersionTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { [userDefault setBool:YES forKey:SKIP_CURRENT_VERSION]; [userDefault setObject:[userDefault objectForKey:APP_LAST_VERSION] forKey:SKIP_VERSION]; }]; [alertControler addAction:skipVersionAction]; } [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertControler animated:YES completion:^{ }]; } else { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:self.alertTitle message:updateMessage delegate:self cancelButtonTitle:self.nextTimeTitle otherButtonTitles:self.confimTitle, self.skipVersionTitle,nil]; [alertView show]; } } } - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex != 0) { [self openAPPStore]; } } - (void)openAPPStore { NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; if (!self.openAPPStoreInsideAPP) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[userDefault objectForKey:APP_TRACK_VIEW_URL]]]; } else { SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init]; storeViewController.delegate = self; NSDictionary *parametersDic = @{SKStoreProductParameterITunesItemIdentifier:[userDefault objectForKey:TRACK_ID]}; [storeViewController loadProductWithParameters:parametersDic completionBlock:^(BOOL result, NSError * _Nullable error) { if (result) { [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:storeViewController animated:YES completion:^{ }]; } }]; } } - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController { [[UIApplication sharedApplication].keyWindow.rootViewController dismissViewControllerAnimated:YES completion:^{ }]; } @end ================================================ FILE: AYCheckVersion/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 7.6.0 CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS NSAppTransportSecurity NSAllowsArbitraryLoads UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: AYCheckVersion/ViewController.h ================================================ // // ViewController.h // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import @interface ViewController : UIViewController @end ================================================ FILE: AYCheckVersion/ViewController.m ================================================ // // ViewController.m // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import "ViewController.h" #import "AYCheckManager.h" //com.tencent.xin //com.facebook.Facebook @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; AYCheckManager *checkManger = [AYCheckManager sharedCheckManager]; checkManger.countryAbbreviation = @"cn"; checkManger.openAPPStoreInsideAPP = YES; // [checkManger checkVersion]; [checkManger checkVersionWithAlertTitle:@"发现新版本" nextTimeTitle:@"下次提示" confimTitle:@"前往更新" skipVersionTitle:@"跳过当前版本"]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end ================================================ FILE: AYCheckVersion/main.m ================================================ // // main.m // AYCheckVersion // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } ================================================ FILE: AYCheckVersion.podspec ================================================ Pod::Spec.new do |s| s.name = "AYCheckVersion" s.version = "1.3.5" s.summary = "Check version from AppStore" s.homepage = "https://github.com/AYJk/AYCheckVersion" s.license = "MIT" s.author = { "Andy" => "andy5759520@gmail.com" } s.platform = :ios, "7.0" s.source = { :git => "https://github.com/AYJk/AYCheckVersion.git", :tag => "1.3.5" } s.source_files = "AYCheckVersion/Classes/*.{h,m}" s.requires_arc = true end ================================================ FILE: AYCheckVersion.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 251AD21A1CB5549D00DB55A9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD2191CB5549D00DB55A9 /* main.m */; }; 251AD21D1CB5549D00DB55A9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD21C1CB5549D00DB55A9 /* AppDelegate.m */; }; 251AD2201CB5549D00DB55A9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD21F1CB5549D00DB55A9 /* ViewController.m */; }; 251AD2231CB5549D00DB55A9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 251AD2211CB5549D00DB55A9 /* Main.storyboard */; }; 251AD2251CB5549D00DB55A9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 251AD2241CB5549D00DB55A9 /* Assets.xcassets */; }; 251AD2281CB5549D00DB55A9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 251AD2261CB5549D00DB55A9 /* LaunchScreen.storyboard */; }; 251AD2331CB5549E00DB55A9 /* AYCheckVersionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD2321CB5549E00DB55A9 /* AYCheckVersionTests.m */; }; 251AD23E1CB5549E00DB55A9 /* AYCheckVersionUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD23D1CB5549E00DB55A9 /* AYCheckVersionUITests.m */; }; 251AD2541CB5557500DB55A9 /* AYCheckManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 251AD2531CB5557500DB55A9 /* AYCheckManager.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 251AD22F1CB5549E00DB55A9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 251AD20D1CB5549D00DB55A9 /* Project object */; proxyType = 1; remoteGlobalIDString = 251AD2141CB5549D00DB55A9; remoteInfo = AYCheckVersion; }; 251AD23A1CB5549E00DB55A9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 251AD20D1CB5549D00DB55A9 /* Project object */; proxyType = 1; remoteGlobalIDString = 251AD2141CB5549D00DB55A9; remoteInfo = AYCheckVersion; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 251AD2151CB5549D00DB55A9 /* AYCheckVersion.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AYCheckVersion.app; sourceTree = BUILT_PRODUCTS_DIR; }; 251AD2191CB5549D00DB55A9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 251AD21B1CB5549D00DB55A9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 251AD21C1CB5549D00DB55A9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 251AD21E1CB5549D00DB55A9 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 251AD21F1CB5549D00DB55A9 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 251AD2221CB5549D00DB55A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 251AD2241CB5549D00DB55A9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 251AD2271CB5549D00DB55A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 251AD2291CB5549D00DB55A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 251AD22E1CB5549E00DB55A9 /* AYCheckVersionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AYCheckVersionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 251AD2321CB5549E00DB55A9 /* AYCheckVersionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AYCheckVersionTests.m; sourceTree = ""; }; 251AD2341CB5549E00DB55A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 251AD2391CB5549E00DB55A9 /* AYCheckVersionUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AYCheckVersionUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 251AD23D1CB5549E00DB55A9 /* AYCheckVersionUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AYCheckVersionUITests.m; sourceTree = ""; }; 251AD23F1CB5549E00DB55A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 251AD2521CB5557500DB55A9 /* AYCheckManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AYCheckManager.h; sourceTree = ""; }; 251AD2531CB5557500DB55A9 /* AYCheckManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AYCheckManager.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 251AD2121CB5549D00DB55A9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 251AD22B1CB5549E00DB55A9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 251AD2361CB5549E00DB55A9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 251AD20C1CB5549D00DB55A9 = { isa = PBXGroup; children = ( 251AD2171CB5549D00DB55A9 /* AYCheckVersion */, 251AD2311CB5549E00DB55A9 /* AYCheckVersionTests */, 251AD23C1CB5549E00DB55A9 /* AYCheckVersionUITests */, 251AD2161CB5549D00DB55A9 /* Products */, ); sourceTree = ""; }; 251AD2161CB5549D00DB55A9 /* Products */ = { isa = PBXGroup; children = ( 251AD2151CB5549D00DB55A9 /* AYCheckVersion.app */, 251AD22E1CB5549E00DB55A9 /* AYCheckVersionTests.xctest */, 251AD2391CB5549E00DB55A9 /* AYCheckVersionUITests.xctest */, ); name = Products; sourceTree = ""; }; 251AD2171CB5549D00DB55A9 /* AYCheckVersion */ = { isa = PBXGroup; children = ( 251AD24B1CB554BE00DB55A9 /* Classes */, 251AD21B1CB5549D00DB55A9 /* AppDelegate.h */, 251AD21C1CB5549D00DB55A9 /* AppDelegate.m */, 251AD21E1CB5549D00DB55A9 /* ViewController.h */, 251AD21F1CB5549D00DB55A9 /* ViewController.m */, 251AD2211CB5549D00DB55A9 /* Main.storyboard */, 251AD2241CB5549D00DB55A9 /* Assets.xcassets */, 251AD2261CB5549D00DB55A9 /* LaunchScreen.storyboard */, 251AD2291CB5549D00DB55A9 /* Info.plist */, 251AD2181CB5549D00DB55A9 /* Supporting Files */, ); path = AYCheckVersion; sourceTree = ""; }; 251AD2181CB5549D00DB55A9 /* Supporting Files */ = { isa = PBXGroup; children = ( 251AD2191CB5549D00DB55A9 /* main.m */, ); name = "Supporting Files"; sourceTree = ""; }; 251AD2311CB5549E00DB55A9 /* AYCheckVersionTests */ = { isa = PBXGroup; children = ( 251AD2321CB5549E00DB55A9 /* AYCheckVersionTests.m */, 251AD2341CB5549E00DB55A9 /* Info.plist */, ); path = AYCheckVersionTests; sourceTree = ""; }; 251AD23C1CB5549E00DB55A9 /* AYCheckVersionUITests */ = { isa = PBXGroup; children = ( 251AD23D1CB5549E00DB55A9 /* AYCheckVersionUITests.m */, 251AD23F1CB5549E00DB55A9 /* Info.plist */, ); path = AYCheckVersionUITests; sourceTree = ""; }; 251AD24B1CB554BE00DB55A9 /* Classes */ = { isa = PBXGroup; children = ( 251AD2521CB5557500DB55A9 /* AYCheckManager.h */, 251AD2531CB5557500DB55A9 /* AYCheckManager.m */, ); path = Classes; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 251AD2141CB5549D00DB55A9 /* AYCheckVersion */ = { isa = PBXNativeTarget; buildConfigurationList = 251AD2421CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersion" */; buildPhases = ( 251AD2111CB5549D00DB55A9 /* Sources */, 251AD2121CB5549D00DB55A9 /* Frameworks */, 251AD2131CB5549D00DB55A9 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = AYCheckVersion; productName = AYCheckVersion; productReference = 251AD2151CB5549D00DB55A9 /* AYCheckVersion.app */; productType = "com.apple.product-type.application"; }; 251AD22D1CB5549E00DB55A9 /* AYCheckVersionTests */ = { isa = PBXNativeTarget; buildConfigurationList = 251AD2451CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersionTests" */; buildPhases = ( 251AD22A1CB5549E00DB55A9 /* Sources */, 251AD22B1CB5549E00DB55A9 /* Frameworks */, 251AD22C1CB5549E00DB55A9 /* Resources */, ); buildRules = ( ); dependencies = ( 251AD2301CB5549E00DB55A9 /* PBXTargetDependency */, ); name = AYCheckVersionTests; productName = AYCheckVersionTests; productReference = 251AD22E1CB5549E00DB55A9 /* AYCheckVersionTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 251AD2381CB5549E00DB55A9 /* AYCheckVersionUITests */ = { isa = PBXNativeTarget; buildConfigurationList = 251AD2481CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersionUITests" */; buildPhases = ( 251AD2351CB5549E00DB55A9 /* Sources */, 251AD2361CB5549E00DB55A9 /* Frameworks */, 251AD2371CB5549E00DB55A9 /* Resources */, ); buildRules = ( ); dependencies = ( 251AD23B1CB5549E00DB55A9 /* PBXTargetDependency */, ); name = AYCheckVersionUITests; productName = AYCheckVersionUITests; productReference = 251AD2391CB5549E00DB55A9 /* AYCheckVersionUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 251AD20D1CB5549D00DB55A9 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1000; ORGANIZATIONNAME = AYJkdev; TargetAttributes = { 251AD2141CB5549D00DB55A9 = { CreatedOnToolsVersion = 7.2.1; ProvisioningStyle = Manual; }; 251AD22D1CB5549E00DB55A9 = { CreatedOnToolsVersion = 7.2.1; TestTargetID = 251AD2141CB5549D00DB55A9; }; 251AD2381CB5549E00DB55A9 = { CreatedOnToolsVersion = 7.2.1; TestTargetID = 251AD2141CB5549D00DB55A9; }; }; }; buildConfigurationList = 251AD2101CB5549D00DB55A9 /* Build configuration list for PBXProject "AYCheckVersion" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 251AD20C1CB5549D00DB55A9; productRefGroup = 251AD2161CB5549D00DB55A9 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 251AD2141CB5549D00DB55A9 /* AYCheckVersion */, 251AD22D1CB5549E00DB55A9 /* AYCheckVersionTests */, 251AD2381CB5549E00DB55A9 /* AYCheckVersionUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 251AD2131CB5549D00DB55A9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 251AD2281CB5549D00DB55A9 /* LaunchScreen.storyboard in Resources */, 251AD2251CB5549D00DB55A9 /* Assets.xcassets in Resources */, 251AD2231CB5549D00DB55A9 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 251AD22C1CB5549E00DB55A9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 251AD2371CB5549E00DB55A9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 251AD2111CB5549D00DB55A9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 251AD2201CB5549D00DB55A9 /* ViewController.m in Sources */, 251AD21D1CB5549D00DB55A9 /* AppDelegate.m in Sources */, 251AD2541CB5557500DB55A9 /* AYCheckManager.m in Sources */, 251AD21A1CB5549D00DB55A9 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 251AD22A1CB5549E00DB55A9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 251AD2331CB5549E00DB55A9 /* AYCheckVersionTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 251AD2351CB5549E00DB55A9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 251AD23E1CB5549E00DB55A9 /* AYCheckVersionUITests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 251AD2301CB5549E00DB55A9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 251AD2141CB5549D00DB55A9 /* AYCheckVersion */; targetProxy = 251AD22F1CB5549E00DB55A9 /* PBXContainerItemProxy */; }; 251AD23B1CB5549E00DB55A9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 251AD2141CB5549D00DB55A9 /* AYCheckVersion */; targetProxy = 251AD23A1CB5549E00DB55A9 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 251AD2211CB5549D00DB55A9 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 251AD2221CB5549D00DB55A9 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; 251AD2261CB5549D00DB55A9 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 251AD2271CB5549D00DB55A9 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 224776AA1D7FF18A00C04981 /* ad hoc distribution */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = "ad hoc distribution"; }; 224776AB1D7FF18A00C04981 /* ad hoc distribution */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = AYCheckVersion/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.tencent.mqq; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; }; name = "ad hoc distribution"; }; 224776AC1D7FF18A00C04981 /* ad hoc distribution */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = AYCheckVersionTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionTests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AYCheckVersion.app/AYCheckVersion"; }; name = "ad hoc distribution"; }; 224776AD1D7FF18A00C04981 /* ad hoc distribution */ = { isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = AYCheckVersionUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = AYCheckVersion; USES_XCTRUNNER = YES; }; name = "ad hoc distribution"; }; 251AD2401CB5549E00DB55A9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 251AD2411CB5549E00DB55A9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; 251AD2431CB5549E00DB55A9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = AYCheckVersion/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.tencent.mqq; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; 251AD2441CB5549E00DB55A9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = AYCheckVersion/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.tencent.mqq; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; 251AD2461CB5549E00DB55A9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = AYCheckVersionTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionTests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AYCheckVersion.app/AYCheckVersion"; }; name = Debug; }; 251AD2471CB5549E00DB55A9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = AYCheckVersionTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionTests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AYCheckVersion.app/AYCheckVersion"; }; name = Release; }; 251AD2491CB5549E00DB55A9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = AYCheckVersionUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = AYCheckVersion; USES_XCTRUNNER = YES; }; name = Debug; }; 251AD24A1CB5549E00DB55A9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = AYCheckVersionUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ayjkdev.AYCheckVersionUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = AYCheckVersion; USES_XCTRUNNER = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 251AD2101CB5549D00DB55A9 /* Build configuration list for PBXProject "AYCheckVersion" */ = { isa = XCConfigurationList; buildConfigurations = ( 251AD2401CB5549E00DB55A9 /* Debug */, 251AD2411CB5549E00DB55A9 /* Release */, 224776AA1D7FF18A00C04981 /* ad hoc distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 251AD2421CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersion" */ = { isa = XCConfigurationList; buildConfigurations = ( 251AD2431CB5549E00DB55A9 /* Debug */, 251AD2441CB5549E00DB55A9 /* Release */, 224776AB1D7FF18A00C04981 /* ad hoc distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 251AD2451CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersionTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 251AD2461CB5549E00DB55A9 /* Debug */, 251AD2471CB5549E00DB55A9 /* Release */, 224776AC1D7FF18A00C04981 /* ad hoc distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 251AD2481CB5549E00DB55A9 /* Build configuration list for PBXNativeTarget "AYCheckVersionUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( 251AD2491CB5549E00DB55A9 /* Debug */, 251AD24A1CB5549E00DB55A9 /* Release */, 224776AD1D7FF18A00C04981 /* ad hoc distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 251AD20D1CB5549D00DB55A9 /* Project object */; } ================================================ FILE: AYCheckVersion.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: AYCheckVersionTests/AYCheckVersionTests.m ================================================ // // AYCheckVersionTests.m // AYCheckVersionTests // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import @interface AYCheckVersionTests : XCTestCase @end @implementation AYCheckVersionTests - (void)setUp { [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. } - (void)tearDown { // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; } - (void)testExample { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } - (void)testPerformanceExample { // This is an example of a performance test case. [self measureBlock:^{ // Put the code you want to measure the time of here. }]; } @end ================================================ FILE: AYCheckVersionTests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: AYCheckVersionUITests/AYCheckVersionUITests.m ================================================ // // AYCheckVersionUITests.m // AYCheckVersionUITests // // Created by Andy on 16/4/6. // Copyright © 2016年 AYJkdev. All rights reserved. // #import @interface AYCheckVersionUITests : XCTestCase @end @implementation AYCheckVersionUITests - (void)setUp { [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. self.continueAfterFailure = NO; // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. [[[XCUIApplication alloc] init] launch]; // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } - (void)tearDown { // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; } - (void)testExample { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } @end ================================================ FILE: AYCheckVersionUITests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 黄鹏飞 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # AYCheckVersion [![LICENSE](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/AYJk/AYPageControl/blob/master/License)  [![SUPPORT](https://img.shields.io/badge/support-iOS%207%2B%20-blue.svg)](https://en.wikipedia.org/wiki/IOS_7)  ![CocoaPods Version](https://img.shields.io/badge/pod-v1.3.0-brightgreen.svg)  我的博客中有详尽的实现过程和相关说明: [iOS利用iTunesLookup检查更新](http://ayjkdev.top/2016/04/06/update-in-app-with-itunes-lookup/) # 介绍 这是一个从AppStore检测最新版本的工具类。 *Debug环境下输出取回的应用更新信息,Release环境下不输出* # 安装 推荐使用[CocoaPods](http://cocoapods.org/)进行安装。 ```ruby pod 'AYCheckVersion' ``` 然后输入 `pod install` or `pod update`。将会安装最新版本的AYCheckVersion。 最后导入头文件\ # 用法 ```objc AYCheckManager *checkManger = [AYCheckManager sharedCheckManager]; [checkManger checkVersion]; ``` 使用默认属性进行版本的检测。 ```objc - (void)checkVersion; ``` 自定义警示框的标题,下次提示的标题,立即更新的标题。 ```objc - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle; ``` 自定义警示框的标题,下次提示的标题,立即更新的标题,跳过该版本的标题。 ```objc - (void)checkVersionWithAlertTitle:(NSString *)alertTitle nextTimeTitle:(NSString *)nextTimeTitle confimTitle:(NSString *)confimTitle skipVersionTitle:(NSString *)skipVersionTitle; ``` 如果你想在当前应用中以模态视图的形式打开AppStore,请设置`openAPPStoreInsideAPP`,默认从应用跳转出去到AppStore。 ```objc checkManger.openAPPStoreInsideAPP = YES; ``` 如果你无法检测到你的App的最新版。请设置你应用的销售地区,如:`countryAbbreviation = @"cn"`,`countryAbbreviation = @"us"`。通常情况下,你不需要设置这个属性。 ```objc checkManger.countryAbbreviation = @"cn"; ``` # 版本更新 v 1.3.5 解决修复苹果修改数据格式造成的问题。[issues10](https://github.com/AYJk/AYCheckVersion/issues/10) v 1.3.0 解决CDN缓存导致的更新延迟问题。[issues9](https://github.com/AYJk/AYCheckVersion/issues/9) v 1.2.0 修复个别线上版本号和提审版本号带来的问题 v 1.1.2 修复由于iTunes被墙使返回的data为nil所导致的异常 [issues3](https://github.com/AYJk/AYCheckVersion/issues/3),去除debug开关,debug环境下默认输出更新内容 v 1.1.0 修复因项目个别version问题导致的bug v 1.0.1 添加debug开关,输出当前更新信息 v 1.0.0 首次提交 # 许可证 AYCheckVersion 使用 MIT 许可证,详情见 LICENSE 文件。