$ npm install @pkhien/react-native-apple-music --save
React Native 0.59+:
$ cd ios && pod install
React Native <0.59
$ react-native link react-native-apple-music
import {Auth} from 'react-native-apple-music'
Auth.requestAuthorization()
.then(authorizationStatus => {})
.catch(error => {})
Auth.getStoreFrontCountryCode()
.then(code => {})
.catch(error => {})
Auth.requestUserToken('<developerToken>')
.then(userToken => {})
.catch(error => {})
Auth.requestCapabilities()
.then(capability => {})
.catch(error => {})
import {MediaPlayer} from 'react-native-apple-music'
MediaPlayer.setQueue(['storeId1', 'storeId2'])
MediaPlayer.play()
MediaPlayer.pause()
MediaPlayer.play() // Play again to resume
MediaPlayer.stop()