Firebase is a Google mobile development platform. It speeds up development many of the common development patterns for mobile apps. You can use Firebase in the OutSystems mobile through the following Firebase-based plugins:
To use the Firebase plugins you meet the following requirements:
Adding and using a Firebase plugin
To add a Firebase plugin to your module, follow these steps:
Install the plugin and reference it in your module. See Adding plugins for detailed instructions.
Add the Google services configuration file to the module.
You need to add Google services configuration file only for the first Firebase plugin in your module. The next Firebase plugin you add uses the same configuration files.
In Service Studio, go to Logic > Client Action > your Firebase plugin and use the actions in your logic.
Adding Google services configuration file
An app with a Firebase Plugin requires the plugin configuration files in the app file resources. Follow the steps to add the Firebase configuration to your module:
In Service Studio, go to the Data tab.
Right-click the Resources folder and select Import Resource. The Import Resource dialog opens.
Select the google-services.zip Firebase configuration file and confirm the selection. Service Studio adds the file under the Resources folder.
Select the google-services.zip resource and configure the following:
- In the Deploy Action list, select Deploy to Target Directory.
- In the Target Directory, enter the target directory for your environment.
Repeat steps two and four for each environment, each time using a different configuration and target directory.
Preparing Firebase configuration file
Add the files GoogleService-Info.plist and google-services.json in a zip file and name the zip file google-services.zip.
Generating target directories for configuration files
A Firebase Plugin requires that you supply configuration files in the app file resources. The mobile apps commonly have different identifiers in different environments, so you need to generate target directories for each environment.
To get the target directory, concatenate the app identifier and .firebase. Here are examples for three environments with different app identifiers.
|Environment||App identifier||Target directory|
Use the target directory value in the Target Directory property of the Resource.