Permissions
Foreground location permissions required by controls, location tracking, and the location puck.
When permissions are needed
The base map component requests no permissions at all. Location permissions are only required once you install one of:
controlswithshowLocatelocation(useLocationTracking/useCurrentPosition)location-puck(MapLocationPuck)
Each of these registry components declares the same permissions, and mapcn-rn init/add write them into app.json automatically when it's readable. An existing iOS usage description is never overwritten, so your own wording survives a re-install. With a dynamic Expo config, or no app.json, the CLI prints the strings to add instead.
Required permission strings
{
"expo": {
"ios": {
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "Show your location on the map."
}
},
"android": {
"permissions": ["ACCESS_FINE_LOCATION", "ACCESS_COARSE_LOCATION"]
}
}
}mapcn only requests foreground location -- there is no background tracking or geofencing in 2.0 (see Location tracking), so NSLocationAlwaysAndWhenInUseUsageDescription is not required.
How permission requests happen
MapControls's locate button andMapLocationPuck(withrequestPermission={true}, the default) callexpo-location's permission API directly when needed.useLocationTracking({ requestPermission: true })(the default) requests permission the first timestart()runs, whether that's viaautoStartor an explicit call.- Denial doesn't throw:
useLocationTracking'sstatusbecomes"denied", andMapLocationPuck/MapControlssimply don't render a location or fail gracefully withonPermissionDenied.
Verifying permissions
npx mapcn-rn doctordoctor checks app.json's ios.infoPlist.NSLocationWhenInUseUsageDescription and android.permissions only when a location-dependent component is actually installed -- a project with just map/marker/popup is not flagged for missing location permissions it doesn't need.