--- url: https://audiobrowser.dev/guide/getting-started.md description: >- Install react-native-audio-browser and its react-native-nitro-modules peer dependency, complete the iOS and Android native setup, and add shaka-player if you target the browser. --- # Getting Started ## Installation The library requires **React Native 0.76 or newer** (with the New Architecture enabled) and React 18.2+, and runs on iOS 16+ and Android API 24+. Building for iOS needs Xcode 26.4 or later (Swift 6.3): Swift 6.2 has a bug that makes the library crash on iOS below 18, so the library refuses to compile with it. `react-native-nitro-modules` 0.35 or later is a required peer dependency — install it alongside: ::: code-group ```bash [npm] npm install react-native-audio-browser react-native-nitro-modules ``` ```bash [yarn] yarn add react-native-audio-browser react-native-nitro-modules ``` ```bash [pnpm] pnpm add react-native-audio-browser react-native-nitro-modules ``` ```bash [bun] bun add react-native-audio-browser react-native-nitro-modules ``` ::: On iOS, install the pods: ```bash cd ios && pod install ``` For playback to continue in the background on iOS, add the `audio` background mode to your app's `Info.plist`: ```xml UIBackgroundModes audio ``` Android links automatically. For web (`react-native-web`), also install [`shaka-player`](https://github.com/shaka-project/shaka-player) 4 (4.7.9 or later). It is an optional peer dependency that the web player loads during `setupPlayer()`. Native builds don't need it. ::: code-group ```bash [npm] npm install shaka-player ``` ```bash [yarn] yarn add shaka-player ``` ```bash [pnpm] pnpm add shaka-player ``` ```bash [bun] bun add shaka-player ``` ::: ## Basic Setup ```ts import { setupPlayer } from 'react-native-audio-browser' // Initialize the player once at startup await setupPlayer() ``` > The library exposes both named exports (`import { setupPlayer }`) and a default namespace (`import AudioBrowser from '…'; AudioBrowser.setupPlayer()`). The guides use the named form throughout. ## Web The same API runs in the browser. On web the library plays through an HTML `