Reputation: 29326
I'm building an app, and I was curious if there's a way to open the app when you're on the website through the iOS Safari extension. So, if I'm on a post I'd tap the app icon in the share sheet and I'd pass that to the app to load the post in the app.
I know the Bing app can translate the current website and inject directly into the DOM, so I was wondering what custom logic you can implement.
Upvotes: 0
Views: 138
Reputation: 70966
There's really no way to open the app from this kind of extension. Extensions can't access [UIApplication sharedApplication]
, so they can't call openURL:
. There's an openURL:completionHandler:
method on NSExtensionContext
, but it only works in "today" extensions. Share extensions can display a fully custom UI and can save data that's available to their containing app, but they can't actually open that app.
Upvotes: 1