iOS13 application openUrl?

How the holy do you import files to your app on ios13?


Previously I could download a txt file in Safari and chose Copy to (app) and I would catch this in the app delegate open Url delegate. Doesn't work anymore.


The Copy To is still there in Safari, but it just dismissed Safari and nothing happens.

Replies

Sorry, I was a bit unclear. Previously, when downloading a file through another app (like Safari), the user could select to open this file in my app by tapping "Copy To (app)".

I would then catch this copy request through the appdelegate:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { [...] }

This delegate is not called in iOS13, only iOS12 and below.

I have tried finding a way to catch the "Copy to" request from other apps to no avail. There seems to be a new way of handling these things through a SceneDelegate?


I have added the SceneDelegate and set it up in the plist. Generally, it seems to be working but the SceneDelegate doesn't have a : openUrl method.


Please help!

Hi, the UISceneDelegate protocol has this optional method that you can implement


func scene(_ scene: UIScene, openURLContexts URLContexts: Set)


It will be called in iOS 13 instead of AppDelegate's openURL

One year late I have the same issue. Did you figure it out? Thanks.