Map displays as a black screen in V10 example (iOS)
See original GitHub issueDescription
The map displays a black frame instead of the expected map contents. It looks like the screenshot below - the same on simulator and device.
I know the V10 library is very much a work in progress, but my understanding is that it should at least display a map at this point, so I’m wondering if anybody else has had success with the example.
Reproduction
- Do a standard installation of
rnmapbox/maps
with$RNMapboxMapsImpl = 'mapbox'
:
git clone git@github.com:rnmapbox/maps.git
cd maps && npm i
cd example && npm i
- Delete the existing
MapLibre
Swift package, and addhttps://github.com/mapbox/mapbox-maps-ios.git
as a new one. - Launch the app on device or simulator.
- Navigate to the
V10
section and launch either of the options.
Expected behavior
The map should look like a … map.
Actual behavior
The map looks like a flat black rectangle.
Screenshots
Versions (please complete the following information):
- Platform: iOS
- Platform OS: iOS 15.3.1
- Device: iPhone 12s
- Emulator/ Simulator: Simulator and device
- Dev OS: macOS 12.2 (21D49)
- @rnmapbox/maps Version: 10.0.0-beta.0
- React Native Version: 0.66.0
Other
Note that I was getting a Multiple commands produce...
build error, which I was able to resolve by deleting one of the binary links - specifically the one at Build Phases > Link Binary With Libraries > MapboxMaps
.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Good to hear. We certainly can and should make it fail with a more visible error if accessToken is not passed/not valid.
Got it working!
A little embarrassing, but for the sake of any future travelers: check
example/ios/env.json
and make sure that the access token is in there as well.I hadn’t thought through the fact (clearly listed in the readme 🤦) that the token is added during dependency installation (the
postinstall
script), not at build time. It’s a silly mistake but hard to debug!