I have an app which picks document using UIDocumentPickerController.
After the document is selected by user I want to pass the URL to that document to as deep link to other app(I know the URL schemes for this app).
I have been able to access the document using UIDocumentPickerController and the 2nd app launches(of which I know the url schemes)
I am passing the url to the file as
let urlfin = URL(string: "appscheme://open?url=\(documenturl.absoluteString)")
self.openUrlinotherapp(urlfin!)
**but I have no idea how to get back the documenturl in scenedelegate of other app that is launched using first app ** I am following a guide and according to that I should be able to access the urlfin in scenedelegate as
extension SceneDelegate {
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let firstUrl = URLContexts.first?.url else {
return
}
print(firstUrl.absoluteString)
}
}