网站如何做定级备案,做游戏必备的几个网站,wordpress怎么优化进程,网络营销案例具体分析//// 获取应用程序信息.h// IOS笔记//一般会用来判断是否有新版本、是否需要强制更新iOS的版本号#xff0c;一个叫做Version#xff0c;一个叫做Build#xff0c;这两个值都可以在Xcode 中选中target#xff0c;点击“Summary”后看到。 Version在plist文件中的key是“C…//// 获取应用程序信息.h// IOS笔记//一般会用来判断是否有新版本、是否需要强制更新iOS的版本号一个叫做Version一个叫做Build这两个值都可以在Xcode 中选中target点击“Summary”后看到。 Version在plist文件中的key是“CFBundleShortVersionString”和AppStore上的版本号保持一致Build在plist中的key是“CFBundleVersion”代表build的版本号该值每次build之后都应该增加1。这两个值都可以在程序中通过下面的代码获得[[[NSBundle mainBundle] infoDictionary] valueForKey:key]2具体实现代码实现获得应用的Verison号[[[NSBundle mainBundle] infoDictionary] objectForKey:CFBundleShortVersionString]或[[NSBundle mainBundle] objectForInfoDictionaryKey:CFBundleShortVersionString];获得build号[[[NSBundle mainBundle] infoDictionary] objectForKey:CFBundleVersion]打印出来infoDictionary的内容 NSLog(%,[[NSBundle mainBundle]infoDictionary]);{ BuildMachineOSBuild 15B42; CFBundleDevelopmentRegion en; CFBundleExecutable UIApplication\U7684\U4f7f\U7528; CFBundleIdentifier cn.juzhong.UIApplication---; CFBundleInfoDictionaryVersion 6.0; CFBundleInfoPlistURL Info.plist -- file:///Users/liuweicheng/Library/Developer/CoreSimulator/Devices/1A2BA12B-DF68-48F4-995A-C6AC2701D3AE/data/Containers/Bundle/Application/1543AEC3-3B92-4282-896E-C3A1D8E99E33/UIApplication%E7%9A%84%E4%BD%BF%E7%94%A8.app/; CFBundleName UIApplication\U7684\U4f7f\U7528; CFBundleNumericVersion 16809984; CFBundlePackageType APPL; CFBundleShortVersionString 1.0; CFBundleSignature ????; CFBundleSupportedPlatforms ( iPhoneSimulator ); CFBundleURLTypes ( { CFBundleURLName ; } ); CFBundleVersion 1; DTCompiler com.apple.compilers.llvm.clang.1_0; DTPlatformBuild ; DTPlatformName iphonesimulator; DTPlatformVersion 9.1; DTSDKBuild 13B137; DTSDKName iphonesimulator9.1; DTXcode 0711; DTXcodeBuild 7B1005; LSRequiresIPhoneOS 1; MinimumOSVersion 9.1; NSAppTransportSecurity { NSAllowsArbitraryLoads 1; }; UIDeviceFamily ( 1 ); UILaunchStoryboardName LaunchScreen; UIMainStoryboardFile Main; UIRequiredDeviceCapabilities ( armv7 ); UISupportedInterfaceOrientations ( UIInterfaceOrientationPortrait, UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight );}iOS获取AppStore内应用程序信息参考 apple的文档www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html具体步骤如下1用 POST 方式发送请求http://itunes.apple.com/search?term你的应用程序名称entitysoftware更加精准的做法是根据 app 的 id 来查找http://itunes.apple.com/lookup?id你的应用程序的ID/*AFHTTPRequestOperationManager *mgr [AFHTTPRequestOperationManager manager];mgr.responseSerializer [AFJSONResponseSerializer serializer];mgr.responseSerializer.acceptableContentTypes [NSSet setWithObject:text/javascript];NSLog(xxx);//发送POST请求[mgr POST:http://itunes.apple.com/search?termQQentitysoftware parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(%,responseObject);} failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(%,error);}];AFHTTPRequestOperationManager *mgr1 [AFHTTPRequestOperationManager manager];mgr1.responseSerializer [AFJSONResponseSerializer serializer];mgr1.responseSerializer.acceptableContentTypes [NSSet setWithObject:text/javascript];NSLog(xxx);//发送POST请求[mgr1 POST:http://itunes.apple.com/lookup?idcom.tenpay.mobile.iphone parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(%,responseObject);} failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(%,error);}];}*/转载于:https://www.cnblogs.com/er-dai-ma-nong/p/5045703.html