capacitor-firebase icon indicating copy to clipboard operation
capacitor-firebase copied to clipboard

feat: Enable configuration of offline mode on all platforms

Open morzel85 opened this issue 5 months ago • 0 comments

Plugin(s)

  • [ ] Analytics
  • [ ] App
  • [ ] App Check
  • [ ] Authentication
  • [ ] Crashlytics
  • [X] Cloud Firestore
  • [ ] Cloud Functions
  • [ ] Cloud Messaging
  • [ ] Cloud Storage
  • [ ] Performance
  • [ ] Remote Config

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

  • [X] I have read and followed the feature request guidelines.
  • [X] I have attached links to possibly related issues and discussions.

morzel85 avatar Sep 10 '24 11:09 morzel85