Notes:
react-native ^v0.4.3
is required
npm install react-native-mapbox-gl --save
- In the XCode's
Project navigator
, right click on project's name ➜Add Files to <...>
- Add
node_modules/react-native-mapbox-gl/ios/RCTMapboxGL.xcodeproj
- Select your project in the
Project navigator
. ClickBuild Phases
thenLink Binary With Libraries
. Addnode_modules/react-native-mapbox-gl/ios/RCTMapboxGL/libRCTMapboxGL.a
- Select your project in the
Project navigator
. ClickBuild Phases
thenCopy Bundle Resources
. Click the+
button. When the modal appears, clickAdd other
. Addnode_modules/ios/react-native-mapbox-gl/RCTMapboxGL/Mapbox.bundle
. - Just like in the last step, select your project in the
Project navigator
. ClickBuild Phases
thenCopy Bundle Resources
. Click the+
button. When the modal appears, clickAdd other
. Addnode_modules/react-native-mapbox-gl/ios/RCTMapboxGL/Settings.bundle
. More information on location metrics can be found here. - Add the following Cocoa framework dependencies to your target's Link Binary With Libraries build phase: