Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save favorites so that widgets can read them #709

Open
geosaaga opened this issue Nov 27, 2024 · 2 comments
Open

Save favorites so that widgets can read them #709

geosaaga opened this issue Nov 27, 2024 · 2 comments
Assignees
Labels
Android Issue is for Android version iOS Issue is for iOS version

Comments

@geosaaga
Copy link
Collaborator

geosaaga commented Nov 27, 2024

Widgets need access to favorites defined in the main app. Save favorites to UserDefaults (iOS) and shared preferences (Android) when favorites are modified and when the app is launched.

react-native-mmkv seems to be the best library to implement this

https://github.com/mrousavy/react-native-mmkv

iOS requires that the main app and widget belong to same app group to share settings.

@geosaaga geosaaga self-assigned this Nov 27, 2024
@geosaaga geosaaga added iOS Issue is for iOS version Android Issue is for Android version labels Nov 27, 2024
@geosaaga
Copy link
Collaborator Author

Current widgets read favorites from SQLiteDatabase where react-native-async-storage saves data. Have to keep that working.

@geosaaga
Copy link
Collaborator Author

PR: #712

In the end didn't use react-native-mmkv, because that would have mean bigger changes => integrating mmkv library also to iOS/Android native code.

@geosaaga geosaaga assigned anttival and unassigned geosaaga Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issue is for Android version iOS Issue is for iOS version
Projects
None yet
Development

No branches or pull requests

2 participants