ios应用启动后的自动版本检测方式_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > ios应用启动后的自动版本检测方式

ios应用启动后的自动版本检测方式

 2014/8/13 15:23:00  wx0123  程序员俱乐部  我要评论(0)
  • 摘要:今天意外的发现了appstore居然还提供通过url获取json格式的客户端信息链接:http://itunes.apple.com/lookup?id=$id通过此地址可以获取应用的icon、介绍、截图、版本号以及版本说明例如请求秘密的json信息:Java代码http://itunes.apple.com/lookup?id=839415177Java代码{"resultCount":1,"results":[{"kind":"software","features":[]
  • 标签:检测 iOS 应用 方式 启动 版本

今天意外的发现了appstore居然还提供通过url获取json格式的客户端信息链接:

http://itunes.apple.com/lookup?id=$id

 

通过此地址可以获取应用的icon、介绍、截图、版本号以及版本说明

 

例如请求秘密的json信息:

Java代码class="Apple-converted-space"> javascripts/syntaxhighlighter/clipboard_new.swf" type="application/x-shockwave-flash">ways" /> 收藏代码
  1. http://itunes.apple.com/lookup?id=839415177  

 

Java代码 iPodTouchFifthGen%22%2C%20%22iPad2Wifi%22%2C%20%22iPadFourthGen%22%2C%20%22iPadFourthGen4G%22%2C%20%22iPadMini4G%22%2C%20%22iPadThirdGen%22%2C%20%22iPadMini%22%2C%20%22iPhone5%22%2C%20%22iPhone5c%22%2C%20%22iPad23G%22%2C%20%22iPhone4%22%2C%20%22iPhone4S%22%2C%20%22iPadThirdGen4G%22%2C%20%22iPhone5s%22%5D%2C%20%22isGameCenterEnabled%22%3Afalse%2C%20%0A%22screenshotUrls%22%3A%5B%22http%3A%2F%2Fa4.mzstatic.com%2Fus%2Fr30%2FPurple4%2Fv4%2F3f%2Fee%2F08%2F3fee086d-cd99-2ac0-2159-99372c989ad3%2Fscreen1136x1136.jpeg%22%2C%20%22http%3A%2F%2Fa3.mzstatic.com%2Fus%2Fr30%2FPurple6%2Fv4%2F07%2Fa6%2F2d%2F07a62d2a-0bdc-ae5f-2239-532c364e9641%2Fscreen1136x1136.jpeg%22%2C%20%22http%3A%2F%2Fa2.mzstatic.com%2Fus%2Fr30%2FPurple4%2Fv4%2F3f%2Fe0%2Fca%2F3fe0ca8d-67bd-2923-d3c1-797dd362c0cb%2Fscreen1136x1136.jpeg%22%2C%20%22http%3A%2F%2Fa2.mzstatic.com%2Fus%2Fr30%2FPurple6%2Fv4%2F4a%2F0d%2F9f%2F4a0d9f68-79fb-f0ca-d0c0-570da23ae037%2Fscreen1136x1136.jpeg%22%2C%20%22http%3A%2F%2Fa1.mzstatic.com%2Fus%2Fr30%2FPurple4%2Fv4%2F04%2F7b%2F63%2F047b63d5-1f09-04fd-1c5c-3fabf45b33fc%2Fscreen1136x1136.jpeg%22%5D%2C%20%22ipadScreenshotUrls%22%3A%5B%5D%2C%20%22artworkUrl60%22%3A%22http%3A%2F%2Fa1246.phobos.apple.com%2Fus%2Fr30%2FPurple%2Fv4%2Fc9%2F71%2F71%2Fc97171eb-c2f9-4b13-378d-d5cfdde611b4%2FIcon.png%22%2C%20%22artworkUrl512%22%3A%22http%3A%2F%2Fa1418.phobos.apple.com%2Fus%2Fr30%2FPurple%2Fv4%2F33%2Fd0%2F63%2F33d063f6-c2d1-a2fd-4490-d2ab86ac071b%2Fmzl.cctcjnum.png%22%2C%20%22artistViewUrl%22%3A%22https%3A%2F%2Fitunes.apple.com%2Fus%2Fartist%2Fshenzhen-wumii-technology%2Fid593518769%3Fuo%3D4%22%2C%20%22artistId%22%3A593518769%2C%20%22artistName%22%3A%22Shenzhen%20Wumii%20Technology%20Limited%22%2C%20%22price%22%3A0.00%2C%20%22version%22%3A%221.1%22%2C%20%0A%22description%22%3A%22%E3%80%8C%E7%A7%98%E5%AF%86%E3%80%8D%E6%98%AF%E5%8C%BF%E5%90%8D%E7%89%88%E7%9A%84%E6%9C%8B%E5%8F%8B%E5%9C%88%5Cn%E4%BD%A0%E5%8F%AF%E4%BB%A5%E5%92%8C%E6%9C%8B%E5%8F%8B%E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82%E4%BB%96%E7%8E%B0%E5%9C%A8%E6%98%AF%E6%88%91%E8%80%81%E5%85%AC%20%E3%80%82%E3%80%8D%5Cn%5Cn%E6%9B%B4%E5%A4%9A%E6%9C%8B%E5%8F%8B%E7%9A%84%E7%A7%98%E5%AF%86%EF%BC%8C%E7%AD%89%E4%BD%A0%E5%8F%91%E7%8E%B0%5Cu2026%5Cu2026%5Cn%5Cn%5Cn%E5%AE%98%E6%96%B9%E5%BE%AE%E5%8D%9A%EF%BC%9A%40%E7%A7%98%E5%AF%86App%22%2C%20%22currency%22%3A%22USD%22%2C%20%22genres%22%3A%5B%22Social%20Networking%22%2C%20%22Lifestyle%22%5D%2C%20%22genreIds%22%3A%5B%226005%22%2C%20%226012%22%5D%2C%20%22releaseDate%22%3A%222014-04-04T09%3A58%3A58Z%22%2C%20%22sellerName%22%3A%22Shenzhen%20Wumii%20Technology%20Limited%22%2C%20%22bundleId%22%3A%22com.wumii.ios.WMMimi%22%2C%20%22trackId%22%3A839415177%2C%20%22trackName%22%3A%22%E7%A7%98%E5%AF%86-%E6%9C%8B%E5%8F%8B%E5%9C%88%E7%9A%84%E5%8C%BF%E5%90%8D%E7%88%86%E6%96%99%22%2C%20%22primaryGenreName%22%3A%22Social%20Networking%22%2C%20%22primaryGenreId%22%3A6005%2C%20%22releaseNotes%22%3A%22-%20%E6%96%B0%E5%A2%9E%E9%87%8D%E7%BD%AE%E5%AF%86%E7%A0%81%E5%8A%9F%E8%83%BD%5Cn-%20%E6%96%B0%E5%A2%9E%E8%AF%84%E8%AE%BA%E6%98%BE%E7%A4%BA%E6%A5%BC%E5%B1%82%5Cn-%20%E6%94%AF%E6%8C%81%E5%9B%BD%E9%99%85%E6%89%8B%E6%9C%BA%E5%8F%B7%E6%B3%A8%E5%86%8C%E7%99%BB%E5%BD%95%5Cn-%20%E6%8F%90%E5%8D%87%E5%BA%94%E7%94%A8%E7%A8%B3%E5%AE%9A%E6%80%A7%22%2C%20%22formattedPrice%22%3A%22Free%22%2C%20%22wrapperType%22%3A%22software%22%2C%20%22trackCensoredName%22%3A%22%E7%A7%98%E5%AF%86-%E6%9C%8B%E5%8F%8B%E5%9C%88%E7%9A%84%E5%8C%BF%E5%90%8D%E7%88%86%E6%96%99%22%2C%20%22languageCodesISO2A%22%3A%5B%22EN%22%2C%20%22ZH%22%5D%2C%20%22fileSizeBytes%22%3A%2215325961%22%2C%20%22contentAdvisoryRating%22%3A%2212%2B%22%2C%20%22averageUserRatingForCurrentVersion%22%3A4.0%2C%20%22userRatingCountForCurrentVersion%22%3A16%2C%20%22artworkUrl100%22%3A%22http%3A%2F%2Fa1418.phobos.apple.com%2Fus%2Fr30%2FPurple%2Fv4%2F33%2Fd0%2F63%2F33d063f6-c2d1-a2fd-4490-d2ab86ac071b%2Fmzl.cctcjnum.png%22%2C%20%22trackViewUrl%22%3A%22https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fmi-mi-peng-you-quan-ni-ming%2Fid839415177%3Fmt%3D8%26uo%3D4%22%2C%20%22trackContentRating%22%3A%2212%2B%22%2C%20%22averageUserRating%22%3A4.0%2C%20%22userRatingCount%22%3A26%7D%5D%0A%7D%0A" /> 收藏代码
  1. {  
  2.  "resultCount":1,  
  3.  "results": [  
  4. {"kind":"software", "features":[],   
  5. "supportedDevices":["iPodTouchFifthGen", "iPad2Wifi", "iPadFourthGen", "iPadFourthGen4G", "iPadMini4G", "iPadThirdGen", "iPadMini", "iPhone5", "iPhone5c", "iPad23G", "iPhone4", "iPhone4S", "iPadThirdGen4G", "iPhone5s"], "isGameCenterEnabled":false,   
  6. "screenshotUrls":["http://a4.mzstatic.com/us/r30/Purple4/v4/3f/ee/08/3fee086d-cd99-2ac0-2159-99372c989ad3/screen1136x1136.jpeg", "http://a3.mzstatic.com/us/r30/Purple6/v4/07/a6/2d/07a62d2a-0bdc-ae5f-2239-532c364e9641/screen1136x1136.jpeg", "http://a2.mzstatic.com/us/r30/Purple4/v4/3f/e0/ca/3fe0ca8d-67bd-2923-d3c1-797dd362c0cb/screen1136x1136.jpeg", "http://a2.mzstatic.com/us/r30/Purple6/v4/4a/0d/9f/4a0d9f68-79fb-f0ca-d0c0-570da23ae037/screen1136x1136.jpeg", "http://a1.mzstatic.com/us/r30/Purple4/v4/04/7b/63/047b63d5-1f09-04fd-1c5c-3fabf45b33fc/screen1136x1136.jpeg"], "ipadScreenshotUrls":[], "artworkUrl60":"http://a1246.phobos.apple.com/us/r30/Purple/v4/c9/71/71/c97171eb-c2f9-4b13-378d-d5cfdde611b4/Icon.png", "artworkUrl512":"http://a1418.phobos.apple.com/us/r30/Purple/v4/33/d0/63/33d063f6-c2d1-a2fd-4490-d2ab86ac071b/mzl.cctcjnum.png", "artistViewUrl":"https://itunes.apple.com/us/artist/shenzhen-wumii-technology/id593518769?uo=4", "artistId":593518769, "artistName":"Shenzhen Wumii Technology Limited", "price":0.00, "version":"1.1",   
  7. "description":"「秘密」是匿名版的朋友圈\n你可以和朋友们毫无顾忌地匿名分享秘密、八卦、爆料、真心话等等劲爆内容!\n\n「秘密」不是树洞,也不是漂流瓶\n你看到的秘密就来自你身边的朋友!\n同样,你发的秘密也会向你朋友展示,让最关心你的人的给你反馈!\n\n「秘密」让你带上面具,卸下身份\n发表和评论都是匿名的,就好像你和朋友都带上了面具,正在参加一个假面派对一样!卸下了身份,朋友们都可以畅所欲言!\n\n【主要功能】\n\n1.查看来自朋友的秘密\n2.匿名发表秘密和评论\n3.支持精美的图文排版\n4.极其严格的隐私保护\n\n\n【当朋友们都匿名了,他们会怎样?】\n\n在朋友圈:\n「还是宝马5系开着舒服,是时候和我那辆奥迪A4说拜拜了!」\n在秘密:\n「一早醒来我身上就背负着房贷车贷各种贷款,压力好大,活着真累!」\n\n在朋友圈:\n「能每天睁开眼睛跟老公说早安,这就是我最大的幸福!」\n在秘密:\n「3年前我走上了长江二桥,打算结束生命,但因他留下来了。他现在是我老公 。」\n\n更多朋友的秘密,等你发现\u2026\u2026\n\n\n官方微博:@秘密App", "currency":"USD", "genres":["Social Networking", "Lifestyle"], "genreIds":["6005", "6012"], "releaseDate":"2014-04-04T09:58:58Z", "sellerName":"Shenzhen Wumii Technology Limited", "bundleId":"com.wumii.ios.WMMimi", "trackId":839415177, "trackName":"秘密-朋友圈的匿名爆料", "primaryGenreName":"Social Networking", "primaryGenreId":6005, "releaseNotes":"- 新增重置密码功能\n- 新增评论显示楼层\n- 支持国际手机号注册登录\n- 提升应用稳定性", "formattedPrice":"Free", "wrapperType":"software", "trackCensoredName":"秘密-朋友圈的匿名爆料", "languageCodesISO2A":["EN", "ZH"], "fileSizeBytes":"15325961", "contentAdvisoryRating":"12+", "averageUserRatingForCurrentVersion":4.0, "userRatingCountForCurrentVersion":16, "artworkUrl100":"http://a1418.phobos.apple.com/us/r30/Purple/v4/33/d0/63/33d063f6-c2d1-a2fd-4490-d2ab86ac071b/mzl.cctcjnum.png", "trackViewUrl":"https://itunes.apple.com/us/app/mi-mi-peng-you-quan-ni-ming/id839415177?mt=8&uo=4", "trackContentRating":"12+", "averageUserRating":4.0, "userRatingCount":26}]  
  8. }  

 

回想之前做的ios版本检测都是客户端请求服务器,服务端返回最新版本信息以及跟新说明,并且服务端需要维护一个ios版本更新记录,实际上是把更新功能复杂化了;

 

后续ios版本更新可以采用:

1.后台只维护一个appstore的id

2.客户端每次检测升级直接请求appstore,获取appstore的版本信息,然后本地判断是否有新版本,有则提示更新

发表评论
用户名: 匿名