从iTunes获取App信息-检测版本

今天更新版本之后APP Stroe上面显示的是最新版(Version1.8.1),APP(Version1.8.0)应该提示立即更新,但是并没有。

检查代码发现:

https://itunes.apple.com/cn/lookup?id=(YourAppID)

lookup?id  这个接口请求的数据 版本是1.8.0 

换个接口试下:

https://itunes.apple.com/lookup?bundleId=(YourAppBundleID)

lookup?bundleId  这个接口请求的数据 版本是1.8.1

根据APP的BundleId从iTunes获取版本信息对比更新

2016年12月22日更新:

以BundleId获取APP信息:https://itunes.apple.com/lookup?bundleId=com.tencent.xin
返回的信息中包括版本号(version)、trackId(即iTunes id)、更新信息(releaseNotes)、描述(description)、屏幕截图(screenshotUrls)等。

使用这个接口,可以在APP一开始就部署更新机制,未上架时请求返回的数据是:

{
  "resultCount":0,
  "results": []
}

上架后可以根据results里的version字段值,比较后提示更新。
请求返回的数据是:

{
  "resultCount" : 1,
  "results" : [
    {
      "advisories" : [
        "Frequent/Intense Mature/Suggestive Themes"
      ],
      "appletvScreenshotUrls" : [],
      "artistId" : 614694882,
      "artistName" : "WeChat",
      "artistViewUrl" : "https://itunes.apple.com/us/developer/wechat/id614694882?mt=8&uo=4",
      "artworkUrl100" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/100x100bb.jpg",
      "artworkUrl512" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/512x512bb.jpg",
      "artworkUrl60" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/60x60bb.jpg",
      "averageUserRating" : 4.5,
      "averageUserRatingForCurrentVersion" : 3.5,
      "bundleId" : "com.tencent.xin",
      "contentAdvisoryRating" : "17+",
      "currency" : "USD",
      "currentVersionReleaseDate" : "2019-01-22T12:20:09Z",
      "description" : "WeChat is more than a messaging and social media app – it is a lifestyle for one billion users across the world. Chat and make calls with friends, read news and use local services in Official Accounts and Mini Programs, play games with friends, enjoy mobile payment features with WeChat Pay, and much more.\n\nWhy do one billion people use WeChat?\n• MORE WAYS TO CHAT: Message friends using text, photo, voice, video, location sharing, and more. Create group chats with up to 500 members.\n• VOICE & VIDEO CALLS: High-quality voice and video calls to anywhere in the world. Make group video calls with up to 9 people.\n• REAL-TIME LOCATION: Not good at explaining directions? Share your real-time location with the tap of a button.\n• MOMENTS: Never forget your favorite moments. Post photos, videos, and more to share with friends on your personal Moments stream.\n• TIME CAPSULE (NEW!): Share glimpses of your day. Record short videos to post in your Time Capsule before they disappear in 24 hours.\n• STICKER GALLERY: Browse thousands of fun, animated stickers to help express yourself in chats, including stickers with your favorite cartoon and movie characters.\n• CUSTOM STICKERS (NEW!): Make chatting more unique with custom stickers and selfie stickers.\n• OFFICIAL ACCOUNTS: Tons of accounts to follow with original content and news for your reading pleasure.\n• MINI PROGRAMS: Countless third-party services all within the WeChat app that don’t require additional installation, saving you precious phone storage and time. \n• TOP STORIES: See the latest articles your friends are reading and discover all kinds of interesting content.\n• GAMES: Have fun and compete with friends in a huge selection of WeChat Mini Games and Tencent Games (available in select regions).\n• WECHAT PAY: Enjoy the convenience of world-leading mobile payment features with WeChat Pay and Wallet (available in select regions).\n• WECHAT OUT: Make calls to mobile phones and landlines around the globe at super low rates (only available in select regions).\n• LANGUAGE SUPPORT: Localized in 20 different languages and can translate friends' messages and Moments posts.\n• BETTER PRIVACY: Giving you the highest level of control over your privacy, WeChat is the only messaging app to be certified by TRUSTe.",
      "features" : [
        "iosUniversal"
      ],
      "fileSizeBytes" : "245409792",
      "formattedPrice" : "Free",
      "genreIds" : [
        "6005",
        "6007"
      ],
      "genres" : [
        "Social Networking",
        "Productivity"
      ],
      "ipadScreenshotUrls" : [
        "https://is2-ssl.mzstatic.com/image/thumb/Purple114/v4/7d/82/72/7d8272e3-8c57-cb14-bf54-79f21890e123/source/576x768bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/37/fb/f1/37fbf1c0-3341-f222-229b-dc50a4408b99/source/576x768bb.jpg",
        "https://is5-ssl.mzstatic.com/image/thumb/Purple124/v4/d2/a8/9b/d2a89b00-2ea4-cb74-25e1-95d2766089cf/source/576x768bb.jpg",
        "https://is2-ssl.mzstatic.com/image/thumb/Purple124/v4/88/17/ba/8817ba32-2554-38fc-4463-b61cec56c433/source/576x768bb.jpg"
      ],
      "isGameCenterEnabled" : false,
      "isVppDeviceBasedLicensingEnabled" : true,
      "kind" : "software",
      "languageCodesISO2A" : [
        "AR",
        "ZH",
        "EN",
        "FR",
        "DE",
        "ID",
        "IT",
        "JA",
        "KO",
        "MS",
        "PT",
        "RU",
        "ZH",
        "ES",
        "TH",
        "ZH",
        "TR",
        "VI"
      ],
      "minimumOsVersion" : "9.0",
      "price" : 0,
      "primaryGenreId" : 6005,
      "primaryGenreName" : "Social Networking",
      "releaseDate" : "2011-01-21T01:32:15Z",
      "releaseNotes" : "What's New:\n- Record a \"Time Capsule\" to chronicle the world through your eyes. \"Blow a bubble\" when viewing a friend's Time Capsule to let your friend know you've opened it.\n- A whole new design with a clearer, more intuitive interface\n- Configure an alert from a chat's settings screen for a special alert when receiving a message\n\nRecent Updates:\n- From the stickers panel, create and send a Selfie Sticker\n- Long-press the text input bar in a chat to enter a new line break",
      "screenshotUrls" : [
        "https://is3-ssl.mzstatic.com/image/thumb/Purple124/v4/bf/8d/7b/bf8d7b3a-6bb5-26b0-f2db-23e62b1b170f/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/5a/95/33/5a95333f-a44f-c79d-e337-c1c841936dc7/source/392x696bb.jpg",
        "https://is3-ssl.mzstatic.com/image/thumb/Purple114/v4/98/f4/88/98f48880-06a0-ea0d-e0f6-cf4e2c3b6868/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/13/b2/f8/13b2f88a-e2fe-3bf1-8e9b-626d43b022c0/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/0d/6f/04/0d6f04a4-88ce-8486-24eb-0116ae2d2ab4/source/392x696bb.jpg"
      ],
      "sellerName" : "Tencent Technology (Shenzhen) Company Limited",
      "sellerUrl" : "http://www.wechat.com",
      "supportedDevices" : [
        "Watch4-Watch4",
        "iPhone5s-iPhone5s",
        "iPadAir-iPadAir",
        "iPadAirCellular-iPadAirCellular",
        "iPadMiniRetina-iPadMiniRetina",
        "iPadMiniRetinaCellular-iPadMiniRetinaCellular",
        "iPhone6-iPhone6",
        "iPhone6Plus-iPhone6Plus",
        "iPadAir2-iPadAir2",
        "iPadAir2Cellular-iPadAir2Cellular",
        "iPadMini3-iPadMini3",
        "iPadMini3Cellular-iPadMini3Cellular",
        "iPodTouchSixthGen-iPodTouchSixthGen",
        "iPhone6s-iPhone6s",
        "iPhone6sPlus-iPhone6sPlus",
        "iPadMini4-iPadMini4",
        "iPadMini4Cellular-iPadMini4Cellular",
        "iPadPro-iPadPro",
        "iPadProCellular-iPadProCellular",
        "iPadPro97-iPadPro97",
        "iPadPro97Cellular-iPadPro97Cellular",
        "iPhoneSE-iPhoneSE",
        "iPhone7-iPhone7",
        "iPhone7Plus-iPhone7Plus",
        "iPad611-iPad611",
        "iPad612-iPad612",
        "iPad71-iPad71",
        "iPad72-iPad72",
        "iPad73-iPad73",
        "iPad74-iPad74",
        "iPhone8-iPhone8",
        "iPhone8Plus-iPhone8Plus",
        "iPhoneX-iPhoneX",
        "iPad75-iPad75",
        "iPad76-iPad76",
        "iPhoneXS-iPhoneXS",
        "iPhoneXSMax-iPhoneXSMax",
        "iPhoneXR-iPhoneXR",
        "iPad812-iPad812",
        "iPad834-iPad834",
        "iPad856-iPad856",
        "iPad878-iPad878",
        "iPadMini5-iPadMini5",
        "iPadMini5Cellular-iPadMini5Cellular",
        "iPadAir3-iPadAir3",
        "iPadAir3Cellular-iPadAir3Cellular"
      ],
      "trackCensoredName" : "WeChat",
      "trackContentRating" : "17+",
      "trackId" : 414478124,
      "trackName" : "WeChat",
      "trackViewUrl" : "https://itunes.apple.com/us/app/wechat/id414478124?mt=8&uo=4",
      "userRatingCount" : 83189,
      "userRatingCountForCurrentVersion" : 1830,
      "version" : "7.0.3",
      "wrapperType" : "software"
    }
  ]
}

根据APP的id从iTunes获取版本信息,对比更新

https://itunes.apple.com/cn/lookup?id=(YourAppID)适用在中国范围发布
https://itunes.apple.com/lookup?id=(YourAppID)适用其他地区范围

E.g:https://itunes.apple.com/cn/lookup?id=414478124
初版发布后可以从iTunes获取id,后面的版本根据id请求版本信息,与当前版本对比,提示更新。

{
  "resultCount" : 1,
  "results" : [
    {
      "advisories" : [
        "Frequent/Intense Mature/Suggestive Themes"
      ],
      "appletvScreenshotUrls" : [],
      "artistId" : 614694882,
      "artistName" : "WeChat",
      "artistViewUrl" : "https://itunes.apple.com/us/developer/wechat/id614694882?mt=8&uo=4",
      "artworkUrl100" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/100x100bb.jpg",
      "artworkUrl512" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/512x512bb.jpg",
      "artworkUrl60" : "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/eb/b5/a8/ebb5a892-c161-c79f-ba51-2089219fb833/source/60x60bb.jpg",
      "averageUserRating" : 4.5,
      "averageUserRatingForCurrentVersion" : 3.5,
      "bundleId" : "com.tencent.xin",
      "contentAdvisoryRating" : "17+",
      "currency" : "USD",
      "currentVersionReleaseDate" : "2019-01-22T12:20:09Z",
      "description" : "WeChat is more than a messaging and social media app – it is a lifestyle for one billion users across the world. Chat and make calls with friends, read news and use local services in Official Accounts and Mini Programs, play games with friends, enjoy mobile payment features with WeChat Pay, and much more.\n\nWhy do one billion people use WeChat?\n• MORE WAYS TO CHAT: Message friends using text, photo, voice, video, location sharing, and more. Create group chats with up to 500 members.\n• VOICE & VIDEO CALLS: High-quality voice and video calls to anywhere in the world. Make group video calls with up to 9 people.\n• REAL-TIME LOCATION: Not good at explaining directions? Share your real-time location with the tap of a button.\n• MOMENTS: Never forget your favorite moments. Post photos, videos, and more to share with friends on your personal Moments stream.\n• TIME CAPSULE (NEW!): Share glimpses of your day. Record short videos to post in your Time Capsule before they disappear in 24 hours.\n• STICKER GALLERY: Browse thousands of fun, animated stickers to help express yourself in chats, including stickers with your favorite cartoon and movie characters.\n• CUSTOM STICKERS (NEW!): Make chatting more unique with custom stickers and selfie stickers.\n• OFFICIAL ACCOUNTS: Tons of accounts to follow with original content and news for your reading pleasure.\n• MINI PROGRAMS: Countless third-party services all within the WeChat app that don’t require additional installation, saving you precious phone storage and time. \n• TOP STORIES: See the latest articles your friends are reading and discover all kinds of interesting content.\n• GAMES: Have fun and compete with friends in a huge selection of WeChat Mini Games and Tencent Games (available in select regions).\n• WECHAT PAY: Enjoy the convenience of world-leading mobile payment features with WeChat Pay and Wallet (available in select regions).\n• WECHAT OUT: Make calls to mobile phones and landlines around the globe at super low rates (only available in select regions).\n• LANGUAGE SUPPORT: Localized in 20 different languages and can translate friends' messages and Moments posts.\n• BETTER PRIVACY: Giving you the highest level of control over your privacy, WeChat is the only messaging app to be certified by TRUSTe.",
      "features" : [
        "iosUniversal"
      ],
      "fileSizeBytes" : "245409792",
      "formattedPrice" : "Free",
      "genreIds" : [
        "6005",
        "6007"
      ],
      "genres" : [
        "Social Networking",
        "Productivity"
      ],
      "ipadScreenshotUrls" : [
        "https://is2-ssl.mzstatic.com/image/thumb/Purple114/v4/7d/82/72/7d8272e3-8c57-cb14-bf54-79f21890e123/source/576x768bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/37/fb/f1/37fbf1c0-3341-f222-229b-dc50a4408b99/source/576x768bb.jpg",
        "https://is5-ssl.mzstatic.com/image/thumb/Purple124/v4/d2/a8/9b/d2a89b00-2ea4-cb74-25e1-95d2766089cf/source/576x768bb.jpg",
        "https://is2-ssl.mzstatic.com/image/thumb/Purple124/v4/88/17/ba/8817ba32-2554-38fc-4463-b61cec56c433/source/576x768bb.jpg"
      ],
      "isGameCenterEnabled" : false,
      "isVppDeviceBasedLicensingEnabled" : true,
      "kind" : "software",
      "languageCodesISO2A" : [
        "AR",
        "ZH",
        "EN",
        "FR",
        "DE",
        "ID",
        "IT",
        "JA",
        "KO",
        "MS",
        "PT",
        "RU",
        "ZH",
        "ES",
        "TH",
        "ZH",
        "TR",
        "VI"
      ],
      "minimumOsVersion" : "9.0",
      "price" : 0,
      "primaryGenreId" : 6005,
      "primaryGenreName" : "Social Networking",
      "releaseDate" : "2011-01-21T01:32:15Z",
      "releaseNotes" : "What's New:\n- Record a \"Time Capsule\" to chronicle the world through your eyes. \"Blow a bubble\" when viewing a friend's Time Capsule to let your friend know you've opened it.\n- A whole new design with a clearer, more intuitive interface\n- Configure an alert from a chat's settings screen for a special alert when receiving a message\n\nRecent Updates:\n- From the stickers panel, create and send a Selfie Sticker\n- Long-press the text input bar in a chat to enter a new line break",
      "screenshotUrls" : [
        "https://is3-ssl.mzstatic.com/image/thumb/Purple124/v4/bf/8d/7b/bf8d7b3a-6bb5-26b0-f2db-23e62b1b170f/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/5a/95/33/5a95333f-a44f-c79d-e337-c1c841936dc7/source/392x696bb.jpg",
        "https://is3-ssl.mzstatic.com/image/thumb/Purple114/v4/98/f4/88/98f48880-06a0-ea0d-e0f6-cf4e2c3b6868/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/13/b2/f8/13b2f88a-e2fe-3bf1-8e9b-626d43b022c0/source/392x696bb.jpg",
        "https://is4-ssl.mzstatic.com/image/thumb/Purple124/v4/0d/6f/04/0d6f04a4-88ce-8486-24eb-0116ae2d2ab4/source/392x696bb.jpg"
      ],
      "sellerName" : "Tencent Technology (Shenzhen) Company Limited",
      "sellerUrl" : "http://www.wechat.com",
      "supportedDevices" : [
        "Watch4-Watch4",
        "iPhone5s-iPhone5s",
        "iPadAir-iPadAir",
        "iPadAirCellular-iPadAirCellular",
        "iPadMiniRetina-iPadMiniRetina",
        "iPadMiniRetinaCellular-iPadMiniRetinaCellular",
        "iPhone6-iPhone6",
        "iPhone6Plus-iPhone6Plus",
        "iPadAir2-iPadAir2",
        "iPadAir2Cellular-iPadAir2Cellular",
        "iPadMini3-iPadMini3",
        "iPadMini3Cellular-iPadMini3Cellular",
        "iPodTouchSixthGen-iPodTouchSixthGen",
        "iPhone6s-iPhone6s",
        "iPhone6sPlus-iPhone6sPlus",
        "iPadMini4-iPadMini4",
        "iPadMini4Cellular-iPadMini4Cellular",
        "iPadPro-iPadPro",
        "iPadProCellular-iPadProCellular",
        "iPadPro97-iPadPro97",
        "iPadPro97Cellular-iPadPro97Cellular",
        "iPhoneSE-iPhoneSE",
        "iPhone7-iPhone7",
        "iPhone7Plus-iPhone7Plus",
        "iPad611-iPad611",
        "iPad612-iPad612",
        "iPad71-iPad71",
        "iPad72-iPad72",
        "iPad73-iPad73",
        "iPad74-iPad74",
        "iPhone8-iPhone8",
        "iPhone8Plus-iPhone8Plus",
        "iPhoneX-iPhoneX",
        "iPad75-iPad75",
        "iPad76-iPad76",
        "iPhoneXS-iPhoneXS",
        "iPhoneXSMax-iPhoneXSMax",
        "iPhoneXR-iPhoneXR",
        "iPad812-iPad812",
        "iPad834-iPad834",
        "iPad856-iPad856",
        "iPad878-iPad878",
        "iPadMini5-iPadMini5",
        "iPadMini5Cellular-iPadMini5Cellular",
        "iPadAir3-iPadAir3",
        "iPadAir3Cellular-iPadAir3Cellular"
      ],
      "trackCensoredName" : "WeChat",
      "trackContentRating" : "17+",
      "trackId" : 414478124,
      "trackName" : "WeChat",
      "trackViewUrl" : "https://itunes.apple.com/us/app/wechat/id414478124?mt=8&uo=4",
      "userRatingCount" : 83189,
      "userRatingCountForCurrentVersion" : 1830,
      "version" : "7.0.3",
      "wrapperType" : "software"
    }
  ]
}
缓存架构
Cache-Architecture.jpg

Apple官方文档

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 206,839评论 6 482
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 88,543评论 2 382
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 153,116评论 0 344
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 55,371评论 1 279
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 64,384评论 5 374
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,111评论 1 285
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,416评论 3 400
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,053评论 0 259
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 43,558评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,007评论 2 325
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,117评论 1 334
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,756评论 4 324
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,324评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,315评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,539评论 1 262
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,578评论 2 355
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,877评论 2 345

推荐阅读更多精彩内容