I've been having issues getting my custom URL to work right in my iOS app.
When I open this url bdat://hello
in Safari, it transitions back to my app, but doesn't call the AppDelegate
method.
Here's the method and relevant Info.plist
data. I broke it down to this simple case, because I was seeing the same issue with the Spotify API.
Is there some other setting I'm missing?
// AppDelegate.swift
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print(url)
return true
}
// Info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.bdat.test</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bdat</string>
</array>
</dict>
</array>