iOS獲取應用程序信息,版本號,程序名等

p34f 9年前發布 | 4K 次閱讀 C/C++ IOS

iOS獲取應用程序信息

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

其中的信息示范:

版本號:[infoDictionary objectForKey:@”CFBundleVersion”];


應用程序名:[infoDictionary objectForKey:@”CFBundleDisplayName”];

{

   CFBundleDevelopmentRegion = en;

   CFBundleDisplayName = “”;

   CFBundleExecutable = “”;

   CFBundleExecutablePath = “”;

   CFBundleIdentifier = “”;

   CFBundleInfoDictionaryVersion = “6.0”;

   CFBundleInfoPlistURL = “”;

   CFBundleName = “”;

   CFBundlePackageType = APPL;

   CFBundleShortVersionString = “1.0”;

   CFBundleSignature = “????”;

   CFBundleSupportedPlatforms =     (

       iPhoneSimulator

   );

   CFBundleVersion = “1.0”;

   DTPlatformName = iphonesimulator;

   DTSDKName = “iphonesimulator6.1″;

   LSRequiresIPhoneOS = 1;

   NSBundleInitialPath = “”;

   NSBundleResolvedPath = “”;

   UIDeviceFamily =     (

       1,

       2

   );

   UIRequiredDeviceCapabilities =     (

       armv7

   );

   UISupportedInterfaceOrientations =     (

       UIInterfaceOrientationPortrait,

       UIInterfaceOrientationLandscapeLeft,

       UIInterfaceOrientationLandscapeRight

   );

}


 

iOS獲取AppStore內應用程序信息

參考 apple 的文檔:www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

具體步驟如下:

用 POST 方式發送請求:

http://itunes.apple.com/search?term=你的應用程序名稱&entity=software

更加精準的做法是根據 app 的 id 來查找:

http://itunes.apple.com/lookup?id=你的應用程序的ID

 本文由用戶 p34f 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!