Skip to content

Boilerplate project demonstrating how to use React-native with the Spotify iOS SDK to perform authentication

Notifications You must be signed in to change notification settings

doplr-app/react-native-spotify-ios-sdk-boilerplate

Repository files navigation

This is the minimal react-native project demonstrating how to use the Spotify iOS SDK with the react-native-ios-spotify-sdk module to perform authentication.

You can find the tutorial explaining how to install and use the module here

Installation

Simply install all the dependencies through npm

npm install

Create a new Spotify Application by following this tutorial (section Creating Your Client ID, Secret and Callback URI)

Add the following callback to the application: my-app-auth://spotify

Add your Spotify Application client_id into the react-native-spotify-ios-sdk-boilerplate/ios/react-native-spotify-ios-sdk-boilerplate/SpotifyModule.m file

  // The spotify client id
  [[SPTAuth defaultInstance] setClientID:@"[your-client-id]"];

Do not change the callback url unless you know how to modify it in Xcode too.

Usage

Start the demo application with the react-native cli:

react-native run-ios

Open the remote js debugger so you can see console.log output.

You can then click on the Spotify Auth button, log yourself in and you'll see your token in the console.

About

Boilerplate project demonstrating how to use React-native with the Spotify iOS SDK to perform authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published