在 Google Play 上,您可以获得仅包含包 ID 的应用链接。
例如。 https://play.google.com/store/apps/details?id=com.google.android.gm
有没有办法只使用包标识符对 App Store 做同样的事情?
例如。 https://itunes.apple.com/app/gmail-email-by-google/id422689480有效,但没有 id422689480
链接无效:https://itunes.apple.com/app/gmail-email-by-google
最佳答案
如果您想通过 bundle ID 搜索应用程序,您应该使用 iTunes Search API。 Refer to this question.
如果您想从应用程序的名称 创建 App Store 链接(如您的示例所述),您必须遵循指南 found here:
There are three types of App Store Short Links, [...] one for iOS apps [...]:
[...]
http://appstore.com/<appname>
for example, http://appstore.com/keynote[...]
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.
!¡"#$%'()*+,\-./:;<=>¿?@[\]^_`{|}~
由此,您的示例将是:
关于ios - 仅使用包标识符获取 App Store 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50175511/