Files
react-native-mapbox-gl/install.md
T
2015-05-24 09:21:11 -07:00

1.5 KiB

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/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/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/react-native-mapbox-gl/RCTMapboxGL/MapboxGL.bundle.
  6. 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++.dylib
  • libsqlite3.dylib
  • libz.dylib
  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.