This guide walks you through adding React Native Audio Pro to an existing React Native project. You will install the JavaScript package, link the iOS native module with CocoaPods, enable the required iOS capability in Xcode, and verify your Android SDK configuration. The whole process takes about five minutes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/afkcodes/react-native-audio-pro/llms.txt
Use this file to discover all available pages before exploring further.
Platform Requirements
| Platform | Minimum |
|---|---|
| React Native | 0.72+ |
| TypeScript | 5.0+ |
| iOS | 17.0+ |
| Android | 8.0 (API 26)+ |
Android compileSdkVersion | 35 |
Android targetSdkVersion | 35 |
Installation Steps
Install the package
Install from the npm registry using your preferred package manager:If you need unreleased features from the fork’s development branch, you can install directly from GitHub instead:
When installing from GitHub, the
prepare script runs automatically via react-native-builder-bob and compiles the necessary JavaScript output files. No extra build step is required.iOS: install pods and enable Background Modes
Run CocoaPods to link the native iOS module:Next, open your project in Xcode and enable the required capability:
- Select your app target in the project navigator.
- Open the Signing & Capabilities tab.
- Click + Capability and add Background Modes.
- Check Audio, AirPlay, and Picture in Picture.
Background Modes must be enabled for audio to continue playing when the app is backgrounded or the screen is locked. Without this capability, playback will stop as soon as the user leaves the app.
Android: verify SDK versions
Open React Native Audio Pro uses Media3 under the hood on Android, which requires API 35 for full media session and notification support. No additional
android/build.gradle (the project-level file, not the app-level one) and confirm that both compileSdkVersion and targetSdkVersion are set to 35:android/build.gradle
AndroidManifest.xml changes are needed — the library’s manifest handles the FOREGROUND_SERVICE and WAKE_LOCK permissions automatically.Verify the installation
Confirm the package is available by importing it at the top of any TypeScript file:If your editor resolves the types without errors, the installation is complete. Proceed to the Quickstart to configure the player and play your first track.