File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ $ react-native link @react-native-community/async-storage
16
16
17
17
See docs for [ manual linking guide.] ( docs/Linking.md )
18
18
19
+ ** Note:** For iOS project using ` pods ` , run:
20
+ ```
21
+ $ cd ios/ && pod install
22
+ ```
23
+
19
24
20
25
## Usage
21
26
@@ -66,4 +71,4 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
66
71
67
72
## License
68
73
69
- MIT
74
+ MIT
Original file line number Diff line number Diff line change 2
2
3
3
## iOS
4
4
5
+ #### Project linking
6
+ 1 . Open your project ` .xcodeproj ` on xcode.
7
+
8
+ 2 . Right click on the Libraries folder and select ` Add files to "yourProjectName" ` .
9
+
10
+ 3 . Add ` RNCAsyncStorage.xcodeproj ` (located at ` node_modules/@react-native-community/async-storage/ios ` ) to your project Libraries.
11
+
12
+ 3 . Go to ` Build Phases -> Link Binary with Libraries ` and add: ` libRNCAsyncStorage.a ` .
13
+
14
+ #### Using 'Pods'
15
+ 1 . Enter into iOS Folder ` cd ios/ ` (on your project's root folder).
16
+
17
+ 2 . Add this line to your ` Podfile ` just below the last pod: (if you don't one just create a new runnning: ` pod init ` ).
18
+
19
+ ``` diff
20
+ + pod 'react-native-async-storage', :path => '../node_modules/@react-native-community/async-storage'
21
+ ```
22
+
23
+ 3 . Run ` pod install `
24
+
25
+
5
26
## Android
6
27
1 . Add project to ` android/settings.gradle ` :
7
28
``` diff
Original file line number Diff line number Diff line change 14
14
const { NativeModules} = require ( 'react-native' ) ;
15
15
16
16
const RCTAsyncStorage =
17
- NativeModules . AsyncLocalStorage || // Support for external modules, like react-native-windows
18
17
NativeModules . RNC_AsyncSQLiteDBStorage ||
19
- NativeModules . RNCAsyncStorage ;
18
+ NativeModules . RNCAsyncStorage ||
19
+ NativeModules . PlatformLocalStorage ; // Support for external modules, like react-native-windows
20
20
21
21
if ( ! RCTAsyncStorage ) {
22
22
throw new Error ( `[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
You can’t perform that action at this time.
0 commit comments