Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Best user flow design for an alarm app iOS

Best user flow design for an alarm app iOS

I am using the iOS SDK, I am trying to figure out the best user flow, maybe the SDK is the wrong way for initial authentication for my use cas. If Session is given playURI with an empty string it will start playing whatever was playing last on your spotify app but if is not given there is another app switch required. I am using a swap token server with /swap and /refresh endpoints.

 

My app will be an alarm clock, so during initial launch I just need user to authenticate, I don't need appRemote, maybe not even a Session. I just need initial authentication, then the user can setup an alarm with their desired song. Before the alarm goes off the app should refresh token, obviously if refresh fails I will have a backup sound.

 

What would be the best user workflow, for best user experience for authentication?

Reply
1 Reply

Hi @TheFern2,

 

Given the iOS SDK's limitations, it isn't practical to implement an alarm clock that uses Spotify playback because the SDK can't start playback when the app is in the background or when the device is locked. This would require an app switch, which isn't ideal for alarm functionality. Additionally, Spotifyโ€™s Developer Policy prohibits alarm functionality unless you receive written approval, and unfortunately, there isn't a direct contact option for this.

 

For the best user experience, you could:

  1. You can start the authorization flow without starting playback by calling initiateSession from the session manager, as described here: Advanced Authentication Guide.
  2. Allow users to choose their alarm sound (Spotify track) and clearly explain the app switch requirement.
  3. Set up a fallback sound if token refresh fails or playback cannot be started due to background limitations.

 

Hope this helps! Feel free to ask any other questions.

 

Cheers,

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Type a product name