Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Sample Project not working for me #36

Open
CodeRed-Tim opened this issue Feb 15, 2021 · 1 comment
Open

Sample Project not working for me #36

CodeRed-Tim opened this issue Feb 15, 2021 · 1 comment

Comments

@CodeRed-Tim
Copy link

I downloaded the sample project and added in my redirectURL, client id and client secret. Added the correct URL type in the info tab. The app launches, I press the login button, it takes me to Spotify and I authorize it successfully and then takes me back to the login screen and nothing else happens. The loginSuccessful() method is never called. Please help

@canalun
Copy link

canalun commented Mar 9, 2021

On iOS above version 13, redirect should be done NOT in appdelegate BUT in scenedelegate.
So the below code should be added in scenedelegate, NOT in appdelegate. (the explanation in README.md was not updated, i think)

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
     guard let url = URLContexts.first?.url else {
            return
     }
     let handle = SpotifyLogin.shared.applicationOpenURL(url) { (error) in }
     return
}

I don't know if it works. but hope it will work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants