Announcements

Spotify WEB API from iOS App Can't Authenticate

Reply

Spotify WEB API from iOS App Can't Authenticate

josephtclegg
Newbie

Hey guys, I'm trying to build an iOS application which makes use of the Spotify WEB API for a school project.  Basically I want to be able to authenticate through Spotify in the app and then be able to search and play songs on a phone with Spotify installed.  Easy.  However I'm having some trouble when I try to authenticate through Spotify.  A dialog box pops up saying "AppName wants to Use Spotify.com to Sign In" with two options, Cancel, and Continue.  I press Continue.  A page briefly pops up before going away, and in my console I see the following error message:

 

[Error: The operation couldn’t be completed. (com.spotify.sdk.login error 3.)

The data couldn’t be read because it isn’t in the correct format.]

 

What is an error 3?  Where can I see the definition of this error?  My redirect URI is a deep link pointing to a page in the app.  My token swap/refresh server is running as a heroku application.  I am building through XCode and testing on a physical iPhone.  Anyone have any suggestions?

 

Update: Trying to authenticate through the iOS emulator takes me to a Spotify login page but gives me this error after trying to log in: 

 

[Error: The operation couldn’t be completed. (com.spotify.sdk.login error 1.)

An SSL error has occurred and a secure connection to the server cannot be made.

The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1200.)]

 

SUGGESTED POSTS