diff --git a/README.md b/README.md index 4834268c..4137f04d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ $ react-native link @react-native-community/async-storage See docs for [manual linking guide.](docs/Linking.md) +**Note:** For iOS project using `pods`, run: + ``` + $ cd ios/ && pod install + ``` + ## Usage @@ -66,4 +71,4 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. ## License -MIT \ No newline at end of file +MIT diff --git a/docs/Linking.md b/docs/Linking.md index ff345be6..0dd9326d 100644 --- a/docs/Linking.md +++ b/docs/Linking.md @@ -2,6 +2,27 @@ ## iOS +#### Project linking +1. Open your project `.xcodeproj` on xcode. + +2. Right click on the Libraries folder and select `Add files to "yourProjectName"`. + +3. Add `RNCAsyncStorage.xcodeproj` (located at `node_modules/@react-native-community/async-storage/ios`) to your project Libraries. + +3. Go to `Build Phases -> Link Binary with Libraries` and add: `libRNCAsyncStorage.a`. + +#### Using 'Pods' +1. Enter into iOS Folder `cd ios/` (on your project's root folder). + +2. Add this line to your `Podfile` just below the last pod: (if you don't one just create a new runnning: `pod init`). + +```diff ++ pod 'react-native-async-storage', :path => '../node_modules/@react-native-community/async-storage' +``` + +3. Run `pod install` + + ## Android 1. Add project to `android/settings.gradle`: ```diff