Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 1.89 KB

install.md

File metadata and controls

24 lines (22 loc) · 1.89 KB

Installation Process

Notes:

  • react-native ^v0.4.3 is required
  1. npm install react-native-mapbox-gl --save
  2. In the XCode's Project navigator, right click on project's name ➜ Add Files to <...>
  3. Add node_modules/react-native-mapbox-gl/ios/RCTMapboxGL.xcodeproj
  4. Select your project in the Project navigator. Click Build Phases then Link Binary With Libraries. Add node_modules/react-native-mapbox-gl/ios/RCTMapboxGL/libRCTMapboxGL.a
  5. Select your project in the Project navigator. Click Build Phases then Copy Bundle Resources. Click the + button. When the modal appears, click Add other. Add node_modules/ios/react-native-mapbox-gl/RCTMapboxGL/Mapbox.bundle.
  6. Just like in the last step, select your project in the Project navigator. Click Build Phases then Copy Bundle Resources. Click the + button. When the modal appears, click Add other. Add node_modules/react-native-mapbox-gl/ios/RCTMapboxGL/Settings.bundle. More information on location metrics can be found here.
  7. Add the following Cocoa framework dependencies to your target's Link Binary With Libraries build phase:
  • CoreTelephony.framework
  • GLKit.framework
  • ImageIO.framework
  • MobileCoreServices.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • libc++.tbd
  • libsqlite3.tbd
  • libz.tbd
  1. Click on the RCTMapboxGL project. Under the Build Settings tab, search for header_search_path. Make sure $(SRCROOT)/../../../React and $(SRCROOT)/../../react-native/React are added and set to recursive.
  2. You can now require('react-native-mapbox-gl') and build.