firebase / firebase/firebase-js-sdk

FR: Firestore Persistence Support for Expo / React Native

Open
#7,947 23 comments 3 reactions 1 assignee Claimed by @cherylEnkidu View on GitHub
api: firestore feature request
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

iOS 17.2

### Browser Version

React Native

### Firebase SDK Version

10.7.1

### Firebase SDK Product:

Firestore

### Describe your project's tooling

React Native 0.73.2

### Describe the problem

On React Native (v0.73.2), enabling persistence for Firestore fails.

> @firebase/firestore: Firestore (10.7.1): Error using user provided cache. Falling back to memory cache: FirebaseError: [code=unimplemented]: This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.

### Steps and code to reproduce issue

```
npx create-expo-app
yarn add firestore
```

```js
import { initializeApp } from "firebase/app";
import { initializeFirestore, persistentLocalCache } from "firebase/firestore";

const firebaseConfig = {
// config here
};

const app = initializeApp(firebaseConfig);

const firestore = initializeFirestore(app, {
localCache: persistentLocalCache(),
})
```
```
yarn start --ios
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.