I’m new to swift and I’m struggling to redirect from the share extension to the main application, I want to extract the image’s url and then use that in the main application.
I’ve tried instantiating the storyboard once I’ve got my url, but I can’t since they aren’t in the same target.
2
Answers
Please select the file and add it to your target.
you can use
openURL:
to send the url from share extension to the main application.call this function in view controller in share extension
and main application can receive the url in app delegate
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool