When creating Firebase invite intent I try to add link to iOS app as described in 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" both 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?
To get this client ID you have to do the following:
GoogleServices-Info.plist
for iOS app as we download google-services.json
for Android CLIENT_ID
(will be something like this 123456789012-abababababababababababababababab.apps.googleusercontent.com
) Add it to builder:
intent = new AppInviteInvitation.IntentBuilder(context.getString(R.string.invitation_title)) ............ .setOtherPlatformsTargetApplication( AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS, "123456789012-abababababababababababababababab.apps.googleusercontent.com") .build();
client_id是您从Firebase控制台为iOS应用下载的plist中的一个
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.