Reputation: 565
I have a working project with Universal Links working and I did a Xcode 11 update and modularization of the project at the same time... (Yeah.. I was asking for headaches...) I've managed to make the new project work after the modularization... except for Universal links.
I've searched a lot about this issue... I think the problem may lie on Apple's new SceneDelegate...
So I have no Application Scene Manifest entry on my Info.plist file and still application(application userActivity ...) is not called... but applicationDidBecomeActive is called normally on AppDelegate.
I've tried creating a new Application project using SceneDelegate and now I don't know how should I implement universal links.. like should I use only SceneDelegate for ios 13 and have the code all repeted in AppDelegate for older versions!? Like, should I import UserNotifications on both and set it's delegate on both?
It's not clear anywhere how Apple expect us to update an existing project to this new cycle... and how to work with both iOS 13 and previous versions...
My universal links are correct, I mean, It does open the app when I click on a universal Link. Just the new modular project that doesn't call the useractivity func... Any light on this matter?
Upvotes: 0
Views: 405
Reputation: 565
Ok... I found the problem. Sorry for the mixup. The Application Scene Manifest entry works fine. It was an update to swift 4.2 that Apple changed the signature of
func application(_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
to
func application(_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
Apple... always helping...
Upvotes: 1