Skip to main content
Version: 4.0

Installation

Stable

npm install --save react-native-track-player

Unstable / Nightly

If for some reason you require an update that has not yet been officially released you can install the nightly version which is an automatic release of main published to npm every 24hrs.

npm install --save react-native-track-player@nightly

iOS Setup

iOS requires a few extra steps that are not required for Android/Windows.

Enable Swift Modules

Because the iOS module uses Swift, if the user is using a standard react-native application they'll need to add support for Swift in the project. This can be easily by adding a swift file to the Xcode project -- could be called dummy.swift and saying yes when prompted if you'd like to generate a bridging header.

Importing Swift

Pod Install

You'll need to run a pod install in order to install the native iOS dependencies

cd ios && pod install

Expo

You can now use React Native Track Player with Expo.

Please be aware that while many people are using React Native Track Player with Expo successfully, the current maintainers of this project do not use Expo and their ability to resolve issues involving Expo is limited.

To get started, create a custom development client for your Expo app and then install React Native Track Player.

Here is the configuration required for audio playback in background: