ios-sdk icon indicating copy to clipboard operation
ios-sdk copied to clipboard

After agreed to policies of spotify, it fails to redirect to the app.

Open VjPrajapat opened this issue 3 years ago • 3 comments

I am using this sdk. It redirect to spotify and account login and policies agree process is successfully done but after this it do not redirect to the main app.

VjPrajapat avatar May 03 '22 04:05 VjPrajapat

Is anyone has solution of this issue, please share. I am stuck on this from last one month.

VjPrajapat avatar May 30 '22 12:05 VjPrajapat

You need to make sure you haven't skipped a step setting up the redirect stuff and the configuration in your own app to allow opening the app from the same url. If you're doing all that and it still isn't working, posting more info would help.

sgoodwin avatar Aug 10 '22 08:08 sgoodwin

func application(_ app: UIApplication,
                     open url: URL,
                     options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
        if let parameters = appRemote.authorizationParameters(from: url) {
            let access_token = parameters[SPTAppRemoteAccessTokenKey]
            appRemote.connectionParameters.accessToken = access_token
            sessionManager.application(app, open: url, options: options)
        } 
        return true
    }

Add this in appDelegate

jayeshtejwani8055 avatar Sep 07 '22 13:09 jayeshtejwani8055