Duplicate link: link
I’ve followed the above link, but it’s not working.
My Procedure: I’ve created a url scheme for host app and called OpenURL for launching host app from share extension. (Swift 5, Tested on iOS 13, Xcode 11.3)
func openURL(url: URL) {
var responder: UIResponder? = self
while responder != nil {
if let application = responder as? UIApplication {
application.perform(#selector(openURL(url:)), with: url)
return
}
responder = responder?.next
}
}
I've used the above method inside SLComposeServiceViewController, called openURL(URL(string: "MyHostAppScheme://")) within this controller. But it's not possible to open Host app from this share extension app.
I've searched Apple forum, but didn't get any solution.
Note: I've found an app from AppStore which is capable to open app from share extension.
Your Help would be appreciated.