宠物小精灵GO iOS URL方案 [英] Pokemon GO iOS URL Scheme
问题描述
iOS版本的Pokemon GO是否包含用于从另一个iOS应用程序启动Pokemon GO的URL方案?
Does the iOS version of Pokemon GO contain a URL Scheme for purposes of launching Pokemon GO from another iOS application?
推荐答案
URL方案在1.1.0版中已更改为com.googleusercontent.apps.848232511240-dmrj3gba506c9svge2p9gq35p1fg654p
.版本1.1.1也使用此URL方案.
The URL Scheme has changed to com.googleusercontent.apps.848232511240-dmrj3gba506c9svge2p9gq35p1fg654p
in version 1.1.0. Version 1.1.1 uses this URL Scheme also.
感谢 @rmaddy的评论,发现了URL方案. .在iOS设备上打开Pokemon GO的URL方案为b335b2fc-69dc-472c-9e88-e6c97f84091c-3://
.似乎他们不打算让其他开发人员考虑URL格式的使用方式. 我现在暂时不要在已发布的应用程序中实施此操作.
Discovered the URL Scheme thanks to @rmaddy's comment. The URL Scheme to open Pokemon GO on an iOS device is, b335b2fc-69dc-472c-9e88-e6c97f84091c-3://
. Seems like they do not intend for other developers to use the URL Scheme considering the way it is formatted. I'd be cautious implementing this in a published application for now.
快速示例:
// Check if Pokemon GO app installed on device
if let url = URL(string: "b335b2fc-69dc-472c-9e88-e6c97f84091c-3://"), UIApplication.shared.canOpenURL(url) {
UIApplication.sharedApplication().openURL(url)
}
else {
// Pokemon GO not installed
// Do something else
}
此外,从iOS 9开始,您必须在info.plist
中包含LSApplicationQueriesSchemes
.
Also, starting at iOS 9 you must include LSApplicationQueriesSchemes
in your info.plist
.
]
这篇关于宠物小精灵GO iOS URL方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!