-
Open the FalconMessenger.xcworkspace in Xcode.
-
Change the Bundle Identifier to match your domain.
-
Go to Firebase and create new project.
-
Select "Add Firebase to your iOS app" option, type the bundle Identifier & click continue.
-
Download "GoogleService-Info.plist" file and add to the project. Make sure file name is "GoogleService-Info.plist".
-
Enable reCaptcha:
6.1. Go to your GoogleService-Info.plist;
6.2. Find the key “REVERSED_CLIENT_ID” and copy its value;
6.3. Go to Project/targets/info/URLTypes;
6.4. Paste the Value to URL schemes field;
6.5. Select “Editor” in the “Role“ field. -
Go to Firebase Console, select your project, choose "Authentication" from left menu
-
Select "SIGN-IN METHOD" and enable "Phone" option.
-
Add Firebase storage rules:
service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read, write; } } }
-
Add Firebase Realtime Database Rules:
{ "rules": { ".read": "auth != null", ".write": "auth != null", "users": { ".indexOn": "phoneNumber", "$user_id": { // grants write access to the owner of this user account // whose uid must exactly match the key ($user_id) ".write": "$user_id === auth.uid" } } } }
Note before next step: if you don't have cocoapods installed on your computer, you have to install it first. You can do it by opening the terminal and running "sudo gem install cocoapods" (without quotation marks), then do the step №8. If you already have cocoapods installed, ignore this note.
-
Open the terminal, navigate to project folder and run "pod update" (without quotation marks).
-
Install Firebase Cloud Functions.
Important Note: Cloud functions a responsible for Sending Group messages and fetching Falcon Users. So it's quite important for you to configure everything poperly.
Step-by-Step guide is availible here: https://firebase.google.com/docs/functions/
Video Guide: https://www.youtube.com/watch?v=DYfP-UIKxH0 -
Copy and Paste Cloud functions from provided Index.js file to your own Index.js file.
-
Change in your index.js file DatabeseURL: to Yours
admin.initializeApp ({ credential: admin.credential.applicationDefault(), databaseURL: 'https://your-Databse-URL.firebaseio.com' });
-
Run "Firebase Delpoy" in the terminal from your cloud Functions Directory to configure Cloud Functions.
-
If you do not have paid Apple Developer Account , you might also see this error: "Your development team, "Name", does not support the Push Notifications capability".
To fix this, go to Project->Targets->FalconMessenger->Capabilities and Deselect Push Notifications option