Skip to content

Commit 2fa7201

Browse files
committed
fix: brownfield access
1 parent b9d038a commit 2fa7201

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/api/brownfield.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ Multiple calls with the same name return the same singleton instance, ensuring c
1616

1717
```kotlin
1818
import android.content.Context
19+
import kotlinx.coroutines.runBlocking
20+
import org.asyncstorage.shared_storage.Entry
1921
import org.asyncstorage.shared_storage.SharedStorage
2022
import org.asyncstorage.storage.StorageRegistry
21-
import kotlinx.coroutines.runBlocking
2223

2324
// access shared storage via StorageRegistry
2425
val storage: SharedStorage = StorageRegistry.getStorage(ctx, "my-users")
2526

27+
// runBlocking only for a demonstration
2628
runBlocking {
2729
storage.setValues(listOf(Entry("email", "john@example.com")))
2830
val values = storage.getValues(listOf("email"))
@@ -35,6 +37,7 @@ runBlocking {
3537
On iOS and macOS, the `StorageRegistry` singleton provides the same functionality in Swift and Objective-C.
3638

3739
```swift
40+
import AsyncStorage
3841
import SharedAsyncStorage
3942

4043
// access shared storage via StorageRegistry

packages/async-storage/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ repositories {
8585

8686
dependencies {
8787
implementation "com.facebook.react:react-android"
88-
implementation "org.asyncstorage.shared_storage:storage-android:1.0.0"
88+
api "org.asyncstorage.shared_storage:storage-android:1.0.0"
8989

9090

9191
// ksp/room is required to support legacy storage

0 commit comments

Comments
 (0)