CocoaPods usage

This commit is contained in:
Chris Dell 2016-05-03 20:43:17 +01:00
parent 039869036b
commit 2196577b66

View File

@ -10,6 +10,21 @@ First you need to install react-native-fs:
npm install react-native-fs --save
```
### Adding with CocoaPods
Add the RNFS pod to your list of application pods in your Podfile, using the path from the Podfile to the installed module:
```
pod 'RNFS', :path => './node_modules/react-native-fs'
```
Install pods as usual:
```
pod install
```
### Adding Manually in XCode
In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] Go to node_modules ➜ react-native-fs and add the .xcodeproj file
In XCode, in the project navigator, select your project. Add the lib*.a from the RNFS project to your project's Build Phases ➜ Link Binary With Libraries Click .xcodeproj file you added before in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive.