sourceApplication: UIApplication.OpenURLOptionsKey is always empty

84 Views Asked by At

I have an ApplicationDelegate based (not scene-based) app.

When the (Today) widget sends a URL to the container app, the options dictionary seems to have stopped working, in that the contents are empty.

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
 
 //       print ("URL: \(url)")
 //       print ("ABS: \(url.absoluteString)")
 //       print ("ABU: \(url.absoluteURL)")
        print ("OPT: \(options)")
}

OPT: [__C.UIApplicationOpenURLOptionsKey(_rawValue: UIApplicationOpenURLOptionsOpenInPlaceKey): 0]

I think this was working because I have notes from circle iOS 12 where it did log:

[__C.UIApplicationOpenURLOptionsKey(_rawValue: UIApplicationOpenURLOptionsOpenInPlaceKey): 0, __C.UIApplicationOpenURLOptionsKey(_rawValue: UIApplicationOpenURLOptionsSourceApplicationKey): (thingOne)

(where "thingOne" is the correct PRODUCT_BUNDLE_IDENTIFIER)

I expect the sourceApplication to have data, because I meet the criteria where the extension is on the same team as the container app.

The documentation says:

The value of this key is an NSString object containing the bundle ID of the app that made the request. If the request originated from another app belonging to your team, UIKit sets the value of this key to the ID of that app. If the team identifier of the originating app is different than the team identifier of the current app, the value of the key is nil.

sourceApplication

0

There are 0 best solutions below