Unable to add Apple Client ID in Firebase which offers Android intent

When creating intentions of a Firebase invitation, I try to add a link to an iOS application, as described in the documentation :

intent = new AppInviteInvitation.IntentBuilder(context.getString(R.string.invitation_title)) .setMessage(context.getString(R.string.invitation_message)) .setOtherPlatformsTargetApplication( AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS, "1059710961") .build(); 

"1059710961" and "mobi.appintheair.wifi" cause the same error:

 AppInviteAgent: Create invitations failed due to error code: 3 AppInviteAgent: Target client ID must include non-empty and valid client ID: 1059710961. (APPINVITE_CLIENT_ID_ERROR) 

What is the correct format for this parameter?

+1
source share
2 answers

To get this customer id, you must do the following:

  • Register your iOS application in the Firebase console.
  • Download GoogleServices-Info.plist for the iOS app by downloading google-services.json for Android
  • Look at it and find the value for the key CLIENT_ID (there will be something like this 123456789012-abababababababababababababababab.apps.googleusercontent.com )
  • Add it to the constructor:

     intent = new AppInviteInvitation.IntentBuilder(context.getString(R.string.invitation_title)) ............ .setOtherPlatformsTargetApplication( AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS, "123456789012-abababababababababababababababab.apps.googleusercontent.com") .build(); 
+4
source

client_id is the one you download from the firebase console for an iOS application

+2
source

All Articles