- Add Admin Android App in Firebase.
- Add iOS Admin App in Firebase.
- Copy Firebase project ID from the Firebase dashboard > Project Settings page & Paste it inside this file > .firebaserc
Android App will be successfully linked to your Firebase Project (if all the above steps are followed correctly). - Setup Push Notifications
- If you have not setup the userapp yet, SETUP FIRESTORE SECURITY RULES :
Go to Firebase Dashboard > Rules. Replace those default rules with below code:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth!=null; allow read, write: if request.auth==null;
}
match /version/userapp {
allow read, write : if request.auth!=null; allow read, write : if request.auth==null;
}
match /users/{userId} {
allow read, write : if request.auth.uid== userId ;
}
}
}
6. If you have not setup the userapp yet, SETUP FIRESTORE INDEXES :
Go to Firebase Dashboard > Indexes > Composite. Set the indexes the exactly same as shown below.
7. If you have not setup the userapp yet, SETUP STORAGE SECURITY RULES :
Go to Firebase Dashboard > Storage > Rules. Replace those default rules with below code:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
allow read, write: if request.auth == null;
}
}
}