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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 17:19:23  来源:igfitidea点击:

Get iTunes App Store ID of an app itself?

iosapiapp-storeitunes

提问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 Aleksejs Mjaliks

You way use iTunes Search API to look up your and other apps on the App Store.

您可以使用 iTunes Search API 在 App Store 上查找您的应用程序和其他应用程序。

Docs: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

文档: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 可能会返回多个结果,但您可以按 筛选结果bundleIdtrackViewUrl将包含您的应用程序的 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 目标更改为应用程序商店链接。