我正在创造自己的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方案是什么?
当前回答
我认为苹果已经为应用程序链接提供了一个新的链接: https://apps.apple.com/app/id1445530088或https://apps.apple.com/app/ {your_app_id}
其他回答
直接链接:没有重定向而有直接链接:
使用苹果服务营销工具:https://tools.applemediaservices.com/获得真正的直接链接 将https://替换为itms-apps:// 用UIApplication.shared打开链接。打开(url,选项:[:])
注意,这些链接只在实际设备上工作,而不是在模拟器中。
来源:
评论:新的链接归功于@rwcorbett 苹果文档:https://developer.apple.com/library/ios/#qa/qa2008/qa1629.html
只需在应用程序链接中将“itunes”改为“phobos”即可。
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300136119&mt=8
现在它会直接打开应用商店
试试这个方法
http://itunes.apple.com/lookup?id=“你的应用ID在这里”返回json。从这里,找到键“trackViewUrl”和值是所需的url。使用这个url(只需将https://替换为itms-apps://)。这工作得很好。
例如,如果你的应用ID是xyz,那么就转到这个链接 http://itunes.apple.com/lookup?id=xyz
然后找到“trackViewUrl”键的url。这是你的应用程序在应用商店的url,在xcode中使用这个url试试这个
NSString *iTunesLink = @"itms-apps://itunes.apple.com/us/app/Your app name/id Your app ID?mt=8&uo=4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
谢谢
苹果刚刚公布了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
这是重定向/链接应用商店中其他现有应用程序的简单而简短的方法。
NSString *customURL = @"http://itunes.apple.com/app/id951386316";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
}