无法将Apple客户端ID添加到Firebase邀请Android的意图 [英] Can not add Apple client ID to Firebase invites intent on Android
问题描述
在创建Firebase邀请意向时,我尝试按照文档:
$ p $ 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)
。建立();
<1059710961>和mobi.appintheair.wifi都会导致相同的错误:
$ b $ pre $
AppInviteAgent:由于错误代码创建邀请失败:3
AppInviteAgent:目标客户端ID必须包含非空且有效的客户端ID: 1059710961.(APPINVITE_CLIENT_ID_ERROR)
这个参数的格式是什么?
$ b $为了得到这个客户ID,你必须做下面的事情:$ b $ ol <
li>在Firebase控制台中注册iOS应用程序
GoogleServices-Info.plist
c> google-services.json for Android CLIENT_ID
(将会像这样 123456789012-ababababababababababababababab.apps.googleusercontent.com
)将其添加到构建器: p>
intent = new AppInviteInvitation.Inte ntBuilder(context.getString(R.string.invitation_title))
............
.setOtherPlatformsTargetApplication(
AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS,
123456789012-abababababababababababababababab.apps.googleusercontent.com)
.build();
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:
- Register you iOS app in the Firebase Console
- Download
GoogleServices-Info.plist
for iOS app as we downloadgoogle-services.json
for Android - Look in it and found value for the key
CLIENT_ID
(will be something like this123456789012-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();
这篇关于无法将Apple客户端ID添加到Firebase邀请Android的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!