Skip to main content

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.

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.

Platform Requirements

PlatformMinimum
React Native0.72+
TypeScript5.0+
iOS17.0+
Android8.0 (API 26)+
Android compileSdkVersion35
Android targetSdkVersion35

Installation Steps

1

Install the package

Install from the npm registry using your preferred package manager:
npm install react-native-audio-pro
If you need unreleased features from the fork’s development branch, you can install directly from GitHub instead:
yarn add github:afkcodes/react-native-audio-pro#feature/main
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.
2

iOS: install pods and enable Background Modes

Run CocoaPods to link the native iOS module:
npx pod-install
Next, open your project in Xcode and enable the required capability:
  1. Select your app target in the project navigator.
  2. Open the Signing & Capabilities tab.
  3. Click + Capability and add Background Modes.
  4. 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.
3

Android: verify SDK versions

Open 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
buildscript {
  ext {
    compileSdkVersion = 35
    targetSdkVersion  = 35
    // ... other settings
  }
}
React Native Audio Pro uses Media3 under the hood on Android, which requires API 35 for full media session and notification support. No additional AndroidManifest.xml changes are needed — the library’s manifest handles the FOREGROUND_SERVICE and WAKE_LOCK permissions automatically.
4

Verify the installation

Confirm the package is available by importing it at the top of any TypeScript file:
import { AudioPro, AudioProContentType, useAudioPro } from 'react-native-audio-pro';
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.

Build docs developers (and LLMs) love