Is there an existing issue for this?
SDK Version
@optimizely/optimizely-sdk: 6.6.1
@react-native-async-storage/async-storage: 3.1.1
Current Behavior
The React Native cache's getBatched() implementation calls AsyncStorage.multiGet(keys). AsyncStorage v3 replaced the multi* methods; its v3.1.1 interface provides getMany, but not multiGet.
The SDK also declares an AsyncStorage peer range of >=1.0.0 <3.0.0 in its package manifest, and its React Native import shim imports AsyncStorageStatic, which is absent from the v3.1.1 exports.
These incompatibilities are identified from source inspection. We have not reproduced a runtime failure on a device.
Expected Behavior
The built-in React Native cache supports AsyncStorage v3 while preserving compatibility with the currently supported v1/v2 versions. Batched reads return values in the requested key order and retain the existing missing-key behavior. Use of v3's default storage export should preserve access to existing legacy storage data.
Steps To Reproduce
Source-based reproduction; installation, compilation, and a device-level reproduction have not yet been run:
- Compare Optimizely's
getBatched() call to multiGet with the AsyncStorage v3.1.1 public API, which provides getMany instead.
- Compare Optimizely's peer range and
AsyncStorageStatic import with v3.1.1's package and exports.
- If peer validation is bypassed and the batched path runs with v3, the current call is expected to fail because v3's default export has no
multiGet method.
SDK Type
React Native
Logs
No device log available; the incompatibility was identified through source inspection.
Severity
Blocking development — prevents adoption of AsyncStorage v3.
Workaround/Solution
Use getMany(keys) on v3 and map its returned record through the requested keys (for example, keys.map(key => values[key] ?? undefined)) to preserve order and missing-key behavior. Retain a multiGet path for v1/v2, replace the removed type import, widen the peer range, and test both API paths.
Is there an existing issue for this?
SDK Version
@optimizely/optimizely-sdk:6.6.1@react-native-async-storage/async-storage:3.1.1Current Behavior
The React Native cache's
getBatched()implementation callsAsyncStorage.multiGet(keys). AsyncStorage v3 replaced themulti*methods; its v3.1.1 interface providesgetMany, but notmultiGet.The SDK also declares an AsyncStorage peer range of
>=1.0.0 <3.0.0in its package manifest, and its React Native import shim importsAsyncStorageStatic, which is absent from the v3.1.1 exports.These incompatibilities are identified from source inspection. We have not reproduced a runtime failure on a device.
Expected Behavior
The built-in React Native cache supports AsyncStorage v3 while preserving compatibility with the currently supported v1/v2 versions. Batched reads return values in the requested key order and retain the existing missing-key behavior. Use of v3's default storage export should preserve access to existing legacy storage data.
Steps To Reproduce
Source-based reproduction; installation, compilation, and a device-level reproduction have not yet been run:
getBatched()call tomultiGetwith the AsyncStorage v3.1.1 public API, which providesgetManyinstead.AsyncStorageStaticimport with v3.1.1's package and exports.multiGetmethod.SDK Type
React Native
Logs
No device log available; the incompatibility was identified through source inspection.
Severity
Blocking development — prevents adoption of AsyncStorage v3.
Workaround/Solution
Use
getMany(keys)on v3 and map its returned record through the requested keys (for example,keys.map(key => values[key] ?? undefined)) to preserve order and missing-key behavior. Retain amultiGetpath for v1/v2, replace the removed type import, widen the peer range, and test both API paths.