custom url scheme launches the app but doesn't call open url

I have a custom url scheme for my app, prior to building with Xcode 10 when a user taps on a URL with the custom scheme my app would launch and a delegate call would be made to:


```

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool

```


However, now that I am building with Xcode 10 this functionality is broken. The app continues to launch when a user taps on the custom url, however the open url method in my app delegate does not get called.


I've been trying everything I can think of here and can't seem to figure out why it is not getting called. If I create a sample app using the same URL scheme it works just fine and open url is called. Something has got to be going wrong inside my app, some other item in my info.plist or build settings that could be interfering maybe?


Has anyone else seen this?

Answered by paul.yorke in 335113022

I was able to figure out the issue I was having. After the Swift 4.2 migration the compiler recommended that the `openURL` func be marked private (no idea why). So because it was private it wasn't getting called. Removing that `private` fixed the issue for me.

Are you returning true from didFinishLaunchingWithOptions?

Yes returning true from both didFinish and willFinish

Hey did you make any progress on that? I'm experiencing the same issue.

Accepted Answer

I was able to figure out the issue I was having. After the Swift 4.2 migration the compiler recommended that the `openURL` func be marked private (no idea why). So because it was private it wasn't getting called. Removing that `private` fixed the issue for me.

custom url scheme launches the app but doesn't call open url
 
 
Q