无法将Apple客户端ID添加到Firebase邀请Android的意图 [英] Can not add Apple client ID to Firebase invites intent on Android

查看:205
本文介绍了无法将Apple客户端ID添加到Firebase邀请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:

    1. Register you iOS app in the Firebase Console
    2. Download GoogleServices-Info.plist for iOS app as we download google-services.json for Android
    3. Look in it and found value for the key CLIENT_ID (will be something like this 123456789012-abababababababababababababababab.apps.googleusercontent.com)
    4. 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屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆