Installation
This guide will help you install and configure @rnmapbox/maps for iOS, Android, and Expo projects.Prerequisites
- React Native 0.79 or higher
- Node.js installed
- A Mapbox access token
Step 1: Install the Package
Install @rnmapbox/maps using your preferred package manager:Step 2: Platform-Specific Setup
Choose your platform for detailed setup instructions:- iOS
- Android
- Expo
iOS Configuration
After installing the package, you need to configure your iOS project.Update Podfile
Add the following hooks to yourios/Podfile:Install Pods
Navigate to the iOS directory and install dependencies:Add Location Permissions (Optional)
If you want to show the user’s location with theUserLocation or LocationPuck component, add location permissions to your ios/Info.plist:See Mapbox iOS documentation for more details on location permissions.
Custom Mapbox Version (Optional)
To use a specific Mapbox SDK version, add this to the top of yourPodfile:Step 3: Verify Installation
Verify your installation by running your app:Troubleshooting
iOS: Pod Install Fails After Upgrade
If you see an error likecould not find compatible versions for pod "MapboxMaps", run:
Android: Maven Repository Issues
Ensure the Mapbox Maven repository is added after other repositories in yourbuild.gradle.
Expo: Module Not Found
Make sure you’ve runnpx expo prebuild after adding the plugin to regenerate native code.
Supported Versions
- Package Version: 10.3.0-rc.0
- Mapbox iOS SDK: ~> 11.18.2
- Mapbox Android SDK: 11.18.2
- React Native: 0.79+
- Node.js: 22.16.0 (recommended)
Next Steps
Quickstart Guide
Create your first map
Set Access Token
Configure your Mapbox token