ios 获取应用程序本身的 iTunes App Store ID?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9717159/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Get iTunes App Store ID of an app itself?
提问by est
Could an iOS app get the iTunes link of itself? Is there a documented or undocumented API for this?
iOS 应用程序可以获取自身的 iTunes 链接吗?是否有记录或未记录的 API?
回答by est
Here is the answer.
这是答案。
- The app requests http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds
- Find the
"version": "2.1.0"and"trackId": 343200656in the JSON response.
- 该应用程序请求http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds
- 在 JSON 响应中找到
"version": "2.1.0"和"trackId": 343200656。
Warning: This API is undocumented, Apple could change it without notice.
警告:此 API 未记录,Apple 可能会更改它,恕不另行通知。
References:
参考:
[1] https://github.com/nicklockwood/iVersion/blob/master/iVersion/iVersion.m#L705
[2] https://stackoverflow.com/a/8841636/41948
[3] http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsLookup?id=343200656&mt=8
[4] http://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/wsSearch?term=+Angry+Birds&country=US&media=software&entity=softwareDeveloper&limit=6&genreId=&version=2&output=json&callback=jsonp1343116626493
[1] https://github.com/nicklockwood/iVersion/blob/master/iVersion/iVersion.m#L705
[2] https://stackoverflow.com/a/8841636/41948
[3] http://ax .phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsLookup?id=343200656&mt=8
[4] http://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/wsSearch?term =+Angry+Birds&country=US&media=software&entity=softwareDeveloper&limit=6&genreId=&version=2&output=json&callback=jsonp1343116626493
回答by Aleksejs Mjaliks
You way use iTunes Search API to look up your and other apps on the App Store.
您可以使用 iTunes Search API 在 App Store 上查找您的应用程序和其他应用程序。
文档:http: //www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
Example: http://itunes.apple.com/search?media=software&country=us&term=raining%20weather
示例:http: //itunes.apple.com/search?media=software&country=us&term=raining%20weather
iTunes may return more then one result, but you can filter results by bundleId.
trackViewUrlwill contain iTunes URL to your app. trackIdwill contain app's ID.
iTunes 可能会返回多个结果,但您可以按 筛选结果bundleId。
trackViewUrl将包含您的应用程序的 iTunes URL。trackId将包含应用程序的 ID。
回答by imthi
Until your app is approved and published for the first time you cannot get the app store link. I would recommend using bit.ly shorturl with a random link in your app. Once the app is approved you can change the bit.ly destination to the app store link.
在您的应用首次获得批准和发布之前,您无法获得应用商店链接。我建议在您的应用中使用带有随机链接的 bit.ly shorturl。应用程序获得批准后,您可以将 bit.ly 目标更改为应用程序商店链接。

