bramus / bramus/react-native-maps-directions

React-native-maps-directions does not work with restricted API key on iOS

Open
#229 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

### Summary
using the following libs..

If i DO NOT restrict the key for iOS, then the whole google maps is invisible inside the iOS build on Testflight, however the geocoding, the Places and Directions API, they all works. When I DO restrict the key, the google maps becomes visible, however all other libs such as geocoder, directions, places API, they seize to work. lol

Explain this to me.

The API/s i have restricted for my bundle identifier:

some.expo.app
Geocoding API
Geolocation API
Maps SDK for iOS
Directions API
Distance Matrix API
Maps Elevation API
Maps Embed API
Maps JavaScript API
Maps Static API
Places API
Roads API
Routes API
Time Zone API

**Reproducible sample code**
```
import MapView, {Marker, PROVIDER_GOOGLE} from 'react-native-maps';
import MapViewDirections from 'react-native-maps-directions';
import Geocoder from 'react-native-geocoding';

"react-native-geocoding": "^0.5.0",
"react-native-maps": "1.10.0",
"react-native-maps-directions": "^1.9.0",
"expo": "~50.0.20",
```
**Steps to reproduce**
restrict/unrestrict iOS key

**Expected result**
working google maps + libs of use inside Google Maps API

**Actual result**
Does not work.

**React Native Maps Version**
1.10.0

**What platforms are you seeing the problem on?**
iOS (Google Maps)

**React Native Version**
0.73.6

**What version of Expo are you using?**
SDK 50

**Device(s)**
ALL IPHONES...

**Additional information**
How can i solve it?

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is identified. Start by reproducing the iOS/TestFlight behavior with the listed react-native-maps, react-native-maps-directions, react-native-geocoding, Expo, and React Native versions, then compare restricted and unrestricted key configurations. Done means the cause is established and a documented, verified path makes both the map and APIs work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.