[英]Can not add Apple client ID to Firebase invites intent on Android
When creating Firebase invite intent I try to add link to iOS app as described in documentation : 创建Firebase邀请意图时,我尝试按照文档中所述向iOS应用添加链接:
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: “ 1059710961”和“ mobi.appintheair.wifi”都引起相同的错误:
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: 要获取此客户端ID,您必须执行以下操作:
GoogleServices-Info.plist
for iOS app as we download google-services.json
for Android 当我们为Android下载google-services.json
,下载iOS应用的GoogleServices-Info.plist
CLIENT_ID
(will be something like this 123456789012-abababababababababababababababab.apps.googleusercontent.com
) 在其中查找并找到关键CLIENT_ID
值(类似于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中的一个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.