How to avoid “wants to open” dialog triggered by openURL in iOS 9.0

后端 未结 2 1131
Happy的楠姐
Happy的楠姐 2021-01-01 19:45

I use openURL to open app B from App A, and I get this alert dialog \"App A wants to open App B\", with t

2条回答
  •  囚心锁ツ
    2021-01-01 20:06

    http://www.macstories.net/linked/ios-9-bringing-changes-to-url-schemes/

    Starting on iOS 9, apps will have to declare what URL schemes they would like to be able to check for and open in the configuration files of the app as it is submitted to Apple. This is essentially a whitelist that can only be changed or added to by submitting an update to Apple.

    openURL / canOpenURL has changed in iOS9 due to user privacy. I suggest you read http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes

    The user will now see this prompt the first time you ask for permission as per other permission requests. This is an OS change and apps, including core applications such as messages now ask for permission when opening a custom URL scheme for the first time.

    You also may be able to achieve what you are trying to do using Universal Links - https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12

提交回复
热议问题