You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced the README with new section icons, improved table of contents, and added helpful tips and notes for users. Updated section headers for clarity, included usage tips, and provided additional guidance for simulators, Expo, and development workflows.
Copy file name to clipboardExpand all lines: README.md
+56-30Lines changed: 56 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,34 +6,40 @@
6
6
7
7
Modern secure storage for React Native, powered by Nitro Modules. Version 6 ships a new headless API surface, stronger security defaults, and a fully revamped example app.
8
8
9
+
> [!TIP]
10
+
> Need the TL;DR? Jump to [🚀 Highlights](#-highlights) and [⚙️ Installation](#-installation) to get productive in under five minutes.
11
+
9
12
> [!WARNING]
10
13
> Version 6 drops Windows support. The module now targets iOS and Android only.
11
14
12
15
## Table of contents
13
16
14
-
-[Highlights](#highlights)
15
-
-[Platform support](#platform-support)
16
-
-[Installation](#installation)
17
-
-[Quick start](#quick-start)
18
-
-[API reference](#api-reference)
19
-
-[Access control & metadata](#access-control--metadata)
20
-
-[Simulators and emulators](#simulators-and-emulators)
- Headless Nitro hybrid object with a simple Promise-based API (`setItem`, `getItem`, `hasItem`, `getAllItems`, `clearService`).
31
34
- Automatic security negotiation: prefers Secure Enclave (iOS) or StrongBox/biometric-protected keys (Android) with graceful fallbacks.
32
35
- Unified metadata reporting (security level, backend, access control, timestamp) for every stored secret.
33
36
- Friendly example app showcasing prompts, metadata inspection, and per-platform capability detection.
34
37
- First-class TypeScript definitions and tree-shakeable distribution via `react-native-builder-bob`.
35
38
36
-
## Platform support
39
+
> [!NOTE]
40
+
> All APIs are fully typed. Hover over any option in your editor to explore the metadata surface without leaving VS Code.
41
+
42
+
## 🧭 Platform support
37
43
38
44
| Platform | Minimum OS | Notes |
39
45
| --- | --- | --- |
@@ -46,7 +52,10 @@ Modern secure storage for React Native, powered by Nitro Modules. Version 6 ship
46
52
- Node.js `18` or newer.
47
53
-`react-native-nitro-modules``>=0.30.0`.
48
54
49
-
## Installation
55
+
> [!TIP]
56
+
> Pair this module with [`react-native-quick-crypto`](https://github.com/mCodex/react-native-quick-crypto) when you need high-performance hashing alongside secure storage.
All functions live at the top level export and return Promises.
129
141
@@ -137,7 +149,7 @@ All functions live at the top level export and return Promises.
137
149
|`clearService`|`(options?) => Promise<void>`| Removes every secret within a service namespace. |
138
150
|`getSupportedSecurityLevels`|`() => Promise<SecurityAvailability>`| Returns a snapshot of platform capabilities (secure enclave, biometrics, etc.). |
139
151
140
-
### Options shared by all operations
152
+
### 🧩 Options shared by all operations
141
153
142
154
-`service` (default: bundle identifier or `default`) — logical namespace for secrets.
143
155
-`accessControl` (default: `secureEnclaveBiometry`) — preferred policy; the native layer chooses the strongest supported fallback.
@@ -148,7 +160,7 @@ All functions live at the top level export and return Promises.
148
160
149
161
See `src/views/sensitive-info.nitro.ts` for full TypeScript definitions.
150
162
151
-
## Access control & metadata
163
+
## 🔐 Access control & metadata
152
164
153
165
`MutationResult` and `SensitiveInfoItem.metadata` surface how a value was stored:
154
166
@@ -159,17 +171,28 @@ See `src/views/sensitive-info.nitro.ts` for full TypeScript definitions.
159
171
160
172
Use `getSupportedSecurityLevels()` to tailor UX before prompting users. For example, disable Secure Enclave options on simulators.
161
173
162
-
## Simulators and emulators
174
+
> [!TIP]
175
+
> Need to demo biometrics on a simulator? Use Xcode’s “Features → Face ID” and Android Studio’s “Fingerprints” toggles to simulate successful scans.
176
+
177
+
## 🧪 Simulators and emulators
163
178
164
179
- iOS simulators do not offer Secure Enclave hardware. Biometric prompts usually fall back to a passcode dialog.
165
180
- Android emulators rarely provide StrongBox. Depending on the system image, biometric APIs may be stubbed.
166
181
- The example app displays these limitations prominently under “Simulators & emulators”.
167
182
183
+
> [!IMPORTANT]
184
+
> Simulators are great for flows, but only physical hardware validates secure hardware policies such as StrongBox and Secure Enclave. Run your final regression tests on devices before shipping.
185
+
168
186
Always validate security behavior on the physical devices you ship to customers.
169
187
170
-
## Example application
188
+
## 🎮 Example application
189
+
190
+
Explore the full feature set with the bundled example app. It showcases capability detection, metadata inspection, and error surface normalization for every API call.
171
191
172
-
## Performance benchmarks
192
+
> [!TIP]
193
+
> Prefer Expo? The same Nitro module works inside bare Expo projects—just install via `expo install` and run the commands below from `example/`.
194
+
195
+
## 📈 Performance benchmarks
173
196
174
197
The Nitro rewrite in v6 removes the classic React Native bridge bottleneck that previous releases (v5 and earlier) relied on.
175
198
@@ -202,7 +225,10 @@ yarn android
202
225
203
226
The example includes required permissions and the `NSFaceIDUsageDescription` string out of the box (see `example/android/app/src/main/AndroidManifest.xml` and `example/ios/SensitiveInfoExample/Info.plist`).
204
227
205
-
## Development
228
+
> [!TIP]
229
+
> Run `yarn codegen --watch` in one terminal and your platform build in another to regenerate bindings automatically during native development.
230
+
231
+
## 🛠️ Development
206
232
207
233
```bash
208
234
# Install dependencies
@@ -220,17 +246,17 @@ yarn build
220
246
221
247
The project uses Nitrogen for code generation and `react-native-builder-bob` for packaging CommonJS/ESM bundles.
222
248
223
-
## Troubleshooting
249
+
## 🩺 Troubleshooting
224
250
225
251
-**Biometric prompt never appears** — verify the device supports the requested access control. Fallback to `devicePasscode` where appropriate.
226
252
-**`authentication failed` errors on simulator** — expected when Secure Enclave or biometrics are not available. Test on hardware.
227
253
-**Undefined symbol on iOS** — ensure `pod install` was run after upgrading to v6.
228
254
-**Windows build errors** — Windows is no longer supported. Pin to v5 if you must target that platform.
229
255
230
-
## Contributing
256
+
## 🤝 Contributing
231
257
232
258
PRs and issue reports are welcome. Please open an issue before introducing breaking API changes so we can discuss the best upgrade path.
0 commit comments