我正在创造自己的iPhone游戏的免费版本。我想在免费版本中添加一个按钮,引导用户进入应用商店中的付费版本。如果我使用标准链接
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300136119&mt=8
iPhone首先打开Safari,然后打开应用商店。我使用过其他直接打开应用程序商店的应用程序,所以我知道这是可能的。
什么好主意吗?应用商店的URL方案是什么?
我正在创造自己的iPhone游戏的免费版本。我想在免费版本中添加一个按钮,引导用户进入应用商店中的付费版本。如果我使用标准链接
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300136119&mt=8
iPhone首先打开Safari,然后打开应用商店。我使用过其他直接打开应用程序商店的应用程序,所以我知道这是可能的。
什么好主意吗?应用商店的URL方案是什么?
当前回答
这里的大多数解决方案都过时了
为那些寻找更新的工作解决方案
// let appStoreLink = "https://apps.apple.com/app/{app-name}/{app-id}"
guard let url = URL(string: Constants.App.appStoreLink) else { return }
UIApplication.shared.open(url)
其他回答
这里的大多数解决方案都过时了
为那些寻找更新的工作解决方案
// let appStoreLink = "https://apps.apple.com/app/{app-name}/{app-id}"
guard let url = URL(string: Constants.App.appStoreLink) else { return }
UIApplication.shared.open(url)
我认为苹果已经为应用程序链接提供了一个新的链接: https://apps.apple.com/app/id1445530088或https://apps.apple.com/app/ {your_app_id}
苹果刚刚公布了appstore.com的网址。
https://developer.apple.com/library/ios/qa/qa1633/_index.html
There are three types of App Store Short Links, in two forms, one for iOS apps, another for Mac Apps: Company Name iOS: http://appstore.com/ for example, http://appstore.com/apple Mac: http://appstore.com/mac/ for example, http://appstore.com/mac/apple App Name iOS: http://appstore.com/ for example, http://appstore.com/keynote Mac: http://appstore.com/mac/ for example, http://appstore.com/mac/keynote App by Company iOS: http://appstore.com// for example, http://appstore.com/apple/keynote Mac: http://appstore.com/mac// for example, http://appstore.com/mac/apple/keynote Most companies and apps have a canonical App Store Short Link. This canonical URL is created by changing or removing certain characters (many of which are illegal or have special meaning in a URL (for example, "&")). To create an App Store Short Link, apply the following rules to your company or app name: Remove all whitespace Convert all characters to lower-case Remove all copyright (©), trademark (™) and registered mark (®) symbols Replace ampersands ("&") with "and" Remove most punctuation (See Listing 2 for the set) Replace accented and other "decorated" characters (ü, å, etc.) with their elemental character (u, a, etc.) Leave all other characters as-is. Listing 2 Punctuation characters that must be removed. !¡"#$%'()*+,-./:;<=>¿?@[]^_`{|}~ Below are some examples to demonstrate the conversion that takes place. App Store Company Name examples Gameloft => http://appstore.com/gameloft Activision Publishing, Inc. => http://appstore.com/activisionpublishinginc Chen's Photography & Software => http://appstore.com/chensphotographyandsoftware App Name examples Ocarina => http://appstore.com/ocarina Where’s My Perry? => http://appstore.com/wheresmyperry Brain Challenge™ => http://appstore.com/brainchallenge
如果你想链接到开发商的应用,而开发商的名字中有标点符号或空格(例如Development Company, LLC),你的URL是这样的:
itms-apps://itunes.com/apps/DevelopmentCompanyLLC
否则它在iOS 4.3.3上返回“此请求不能被处理”
只需在应用程序链接中将“itunes”改为“phobos”即可。
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300136119&mt=8
现在它会直接打开应用商店