Method 'scene(_:openURLContexts:)' is not called

后端 未结 3 1117
深忆病人
深忆病人 2021-01-17 10:44

In info.plist file I configured URL Identifier and URL Scheme successfully. Also I am able to open app using custom URL. The problem is when app la

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-17 11:14

    My situation was that the openURL extra function provided in the SceneDelegate was not being called after returning from Facebook Authentication.

    The solution was using

    .onOpenURL { (url) in
                    ApplicationDelegate.shared.application(
                        UIApplication.shared,
                        open: url,
                        sourceApplication: nil,
                        annotation: [UIApplication.OpenURLOptionsKey.annotation]
                    )
                }
    

    To call the function in my extra application delegate, which then worked properly.

提交回复
热议问题