0

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.

Doug Smith
  • 29,668
  • 57
  • 204
  • 388

1 Answers1

1

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.

Tom Harrington
  • 69,312
  • 10
  • 146
  • 170