Skip to main content

CarPlay

CarPlay uses the same browse + playback handler model as Android Auto. The difference is iOS setup.

1. Enable the plugin flag

{
"expo": {
"plugins": [["react-native-queue-player", { "carplay": true }]]
}
}

This adds the CarPlay audio entitlement and the CarPlay scene configuration to your iOS project. Run npx expo prebuild afterwards.

Bare React Native: there's no plugin — add the com.apple.developer.carplay-audio entitlement (and enable the CarPlay capability), plus the UIApplicationSceneManifest (phone + CarPlay scenes) to your Info.plist, by hand. See the bare-RN setup table.

2. Get Apple approval for the entitlement

The CarPlay audio entitlement (com.apple.developer.carplay-audio) requires approval from Apple before it can be used in a distributed build. Request it for your App ID through your Apple Developer account.

3. Initialize on cold start

CarPlay can attach its scene without your app's UI being shown, so initialize the player and register your handlers from a bootstrap module imported before your app entry — see Setup & manual configuration.

4. Provide a browse tree and resolve play requests

Use setBrowseSnapshot, onBrowseRequest, and onPlayFromIdRequest exactly as described in the Android Auto browse-handlers section. Section icons map to SF Symbols on iOS via the SectionIcon enum.

import { getTrackPlayer, SectionIcon } from 'react-native-queue-player';

getTrackPlayer().setBrowseSnapshot({
rootId: 'root',
sections: [
{ id: 'recent', title: 'Recently played', icon: SectionIcon.RecentlyPlayed, items: [/* … */] },
{ id: 'playlists', title: 'Playlists', icon: SectionIcon.Playlists, items: [/* … */] },
],
});

Notes

  • For a local Xcode build without automatic signing, enable the CarPlay capability once in the target's Signing & Capabilities pane. EAS Build handles this automatically.
  • Voice playback requests (Siri) are resolved through onPlayFromSearchRequest — see the Voice guide.
  • Check the current connection with isCarConnected() and handle transitions with onCarConnect / onCarDisconnect — the same connection API as Android Auto.