URL Opening Swift App - Open Works - Called Function Does NOT work

后端 未结 2 1281
北恋
北恋 2020-12-19 06:43

Hello All – I am a newbie here ... trying to get my first iOS Swift (Xcode 11.2.1 / Swift 5 / iOS 13.2) app to open via URL and process the URL string. The app opens just f

2条回答
  •  借酒劲吻你
    2020-12-19 07:27

    I just found a solution here: application(...continue userActivity...) method not called in ios 13

    The trick is to also implement the SceneDelegate.swift functions for Apps with iOS > 13. This function should be called if you open the URL confirmevent://HelloWorld:

    func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
        print(URLContexts.debugDescription)
    }
    

提交回复
热议问题