[Swift 5] If snapchat isn't authenticating after redirect, try this!

Marwan
0 replies
I got Login Kit to open Snapchat and redirect back to my app, but the completion handler was never running. Turns out if you're on Swift 5 and your app uses SceneDelegate then you don't want to run `open url` from your AppDelegate. Instead, add this at the end of your SceneDelegate and you're good to go. func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { if let url = URLContexts.first?.url{ SCSDKLoginClient.application(UIApplication.shared, open: url, options: nil) } } Not sure how many people will find this useful, but it would have saved me a lot of time lol
🤔
No comments yet