Files
react-native-mapbox-gl/ios/install.md
T
Dave Sibiski 4e86746895 Updates steps explaining header_search_paths
The React Native module is actually 1 more level up in the folder structure now since the `RCTMapboxGL.xcodeproj` is in the nested `ios` folder.
2015-10-16 13:09:45 -04:00

1.9 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/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.