react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.61k stars 458 forks source link

Add support for iOS App Groups #1086

Open bpeltonc opened 2 months ago

bpeltonc commented 2 months ago

Proposal

Currently, the library stores the manifest.json file in a folder that can't be easily found by iOS apps that need access to this file, but target different platforms (e.g. WatchOS, Widget extensions, etc). Apple supports this functionality via App Groups, so the issue is entirely in the way this library interacts with the native APIs and can be fixed. Ideally React Native Async Storage would expose a JavaScript method that creates an App Group and writes data to a file in there.

Alternatives

No response

Implementation Details

No response

Additional Context

No response

NTag commented 1 month ago

Agreed, I also need this feature to share data between two apps I develop. It's a safe Apple feature allowing multiple apps from the same developer to access the same data: https://developer.apple.com/documentation/xcode/configuring-app-groups

I'd be great that async-storage supports it 🙌

jcarioti commented 3 weeks ago

Someone already did it a while back, but it's not been updated or maintained. I don't know if it's still relevant: https://github.com/react-native-async-storage/async-storage/issues/126#issuecomment-697042925