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

后端 未结 2 1132
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 19:57

    After checking for hours, I could not come up with a solution for my problem. It looks like this dialog will appear regardless anything... I hope Apple will add the option to handle it in the app's info.plist as if both apps are mine, logically, there should not be any dialog to confirm switching between them...

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题