capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
382 stars 99 forks source link

feat: Enable configuration of offline mode on all platforms #715

Open morzel85 opened 2 weeks ago

morzel85 commented 2 weeks ago

Plugin(s)

Current problem

Currently offline document read is not supported on Web platform. Executing this code:

const { snapshot } = await FirebaseFirestore.getDocument({
  reference: 'someDocPathHere',
});

Gives such error: "FirebaseError: Failed to get document because the client is offline"

Preferred solution

capacitor-firebase should expose configuration for enabling/disabling offline mode on all platforms where Firestore itself can support it.

Alternative options

No response

Additional context

https://github.com/capawesome-team/capacitor-firebase/discussions/713

Before submitting