Preparation

<aside> 💡 Don’t forget to specify a unique package-id within your Ionic project. This usually represents your company’s domain and will be used in later configurations.

</aside>

Add Android platform

Install the @capacitor/android package and add the Android platform:

npm install @capacitor/android
npx cap add android

Add iOS platform

Install the @capacitor/ios package and add the iOS platform:

npm install @capacitor/ios
npx cap add ios

Android

Add Firebase to your Android app

Once you've registered your Android app within your Firebase projects, click on Download google-services.json

Untitled

<aside> 💡 Make sure the package name is set to the package_id you registered in your Ionic app.

</aside>

Now move the downloaded file to your project folder /android/app.

iOS

Add Firebase to your iOS app

Once you've registered your iOS app within your Firebase projects, click on Download GoogleService-Info.plist

Untitled

Now move the downloaded file to your project folder /ios/App/App.