ios - Spotify SDK Missing token refresh service? -


i trying void popup grant permission user every time session expired in spotify sdk , after 1 hour maybe popup appear grant permission again user can play tracks spotify on app , error getting when try renew session :

[player][play][spotify] error renew session optional(error domain=com.spotify.auth code=0 "missing token refresh service." userinfo={nslocalizeddescription=missing token refresh service.}) [player][spotify] session not renewed,popup login 

and here how trying renew session :

//renew session func renewsession(completion:@escaping (bool)->()) {     print("[player][play][spotify] renew session requested ")      let auth = sptauth.defaultinstance()         auth?.renewsession(auth?.session, callback: { (error, session) in              if (error != nil)             {                 print("[player][play][spotify] error renew session \(string(describing: error))")                 completion(false)                 return             }              auth?.session = session              if auth?.session.isvalid() == true             {                 print("[player][play][spotify] renew session success")                 completion(true)             }else             {                 print("[player][play][spotify] renew session failed")                 completion(false)             }     })  } 

any solution ?

have assigned these properties on sptauth object?

[sptauth defaultinstance].tokenswapurl = [nsurl urlwithstring:@"swapurl"]; [sptauth defaultinstance].tokenrefreshurl = [nsurl urlwithstring:@"refreshurl"];

taken https://github.com/spotify/ios-sdk/issues/427 might have more info if isn't sufficient.

there's reference sptauth class:

https://spotify.github.io/ios-sdk/classes/sptauth.html


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -