How to launch a parent iOS App from its App Extension

后端 未结 7 1377
借酒劲吻你
借酒劲吻你 2021-02-07 07:22

Does any one know how to launch the parent app from the app extension\'s view controller?

I just want to launch the main app from its app extension.

7条回答
  •  不思量自难忘°
    2021-02-07 07:45

    The documentation is pretty clear on saying that you can use extensionContext openURL within a Today extension. By implication, openURL can only be used in a Today exception and our experiences are proving this to be true--I also can't get it working from within a Share extension.

    I would be interested to see if any of these work arounds are accepted by Apple's review process. I doubt it. If Apple wanted it to work, it would have been easy enough for them to allow it.

    Apple allows any Today widget to use the openURL:completionHandler: method to open the widget’s own containing app.

    If you employ this method to open other apps from your Today widget, your App Store submission might entail additional review to ensure compliance with the intent of Today widgets.

    I'm certain this second paragraph was added after Launcher was accepted, rejected, and then later approved for sale.

提交回复
热议问题