Skip to content

Commit 5684da4

Browse files
author
Krzysztof Borowy
authored
release: v1.2.5
2 parents 485eba4 + e2a58a4 commit 5684da4

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ $ react-native link @react-native-community/async-storage
1616

1717
See docs for [manual linking guide.](docs/Linking.md)
1818

19+
**Note:** For iOS project using `pods`, run:
20+
```
21+
$ cd ios/ && pod install
22+
```
23+
1924

2025
## Usage
2126

@@ -66,4 +71,4 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
6671

6772
## License
6873

69-
MIT
74+
MIT

docs/Linking.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
## iOS
44

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+
526
## Android
627
1. Add project to `android/settings.gradle`:
728
```diff

lib/AsyncStorage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
const {NativeModules} = require('react-native');
1515

1616
const RCTAsyncStorage =
17-
NativeModules.AsyncLocalStorage || // Support for external modules, like react-native-windows
1817
NativeModules.RNC_AsyncSQLiteDBStorage ||
19-
NativeModules.RNCAsyncStorage;
18+
NativeModules.RNCAsyncStorage ||
19+
NativeModules.PlatformLocalStorage; // Support for external modules, like react-native-windows
2020

2121
if (!RCTAsyncStorage) {
2222
throw new Error(`[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

0 commit comments

Comments
 (0)