firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.64k stars 1.48k forks source link

FR:app share extension share firestore data with container app in ios #7368

Open chenjiayao opened 3 years ago

chenjiayao commented 3 years ago

Feature proposal

I have a container app use firestore store data, and I want my app share extension read data from firestore when client is offline I read the both firebase and apple doc carefully and find this api appGroupID. so I try config appGroupID in FirebaseApp.configure(). but still failed.

Is there a way to achieve it? This problem has been bothering me for several days

wilhuff commented 3 years ago

Thanks for the feature request. As you can see from the exceptions we throw, Firestore does not support sharing its cache between an extension and the containing app. We have two recommended solutions:

In either case changes in the extension won't be immediately visible to the containing app until the containing app queries for the data and receives the update from the server. This is suboptimal, but this is the best we can do at the moment.

The underlying issue is that Firestore's local database does not support being opened from more than one process. Fixing this is a very complex problem and isn't something we can prioritize at the moment. I'll leave this issue open to indicate this is something we aspire to fix, but there's no timeline to which we can commit.

chenjiayao commented 3 years ago

I see, thank you for taking the time to answer this question for me ~

Yooooomi commented 1 year ago

Hello!

Is there any way to achieve this in 2023? I want my iOS extension to query data when I receive a notification so that when the app is later opened, the cache contains the data queried after receiving the notification earlier.

Thanks a lot for any help, Timothée

ehsannas commented 1 year ago

Hi @Yooooomi , unfortunately we're currently not prioritizing supporting multiple processes accessing the local database.