Recently I found out strange things in using firebase
in expo.
I recently changed by database from real-time database
to firestore
.
First, I felt it was working fine when I developed on ios. However, it did not work in android
, therefore I had to look into issue to solve this problem. However, I didn’t have to do anything in react-native init
project. Felt really wierd for me.
Also, there was another issue which was in firestore
rules. It worked fine in normal react-native init
project either. However, in expo, it didn’t work. It always threw the error when trying to use the firestore security rules. The rules I set was just simple one in the example.
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read: if request.auth != null;
}
}
}
If I get rid of if request.auth != null
and but if true
instead. It just works fine…
Same code in react-native init
project worked fine. I searched on the google and found some same issue.
My question is, why is this happening in expo project
and not in react-native init
project? I thought it was firebase issue
but don’t understand why it is not working properly in expo
.