2016-06-15 26 views
1

当创建火力地堡邀请意图我尝试添加链接iOS应用中documentation描述:无法添加苹果客户端ID火力地堡邀请意向在Android

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”和“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) 

此参数的正确格式是什么?

回答

4

为了得到这个客户端ID的人在plist中,你必须做到以下几点:

  1. 注册您的iOS应用火力地堡控制台
  2. 下载GoogleServices-Info.plist对于iOS应用,我们下载google-services.json为Android
  3. 穿上它,发现的关键CLIENT_ID值(会是这样123456789012-abababababababababababababababab.apps.googleusercontent.com
  4. 将它添加到建设者:

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

的CLIENT_ID是你从火力控制台下载iOS应用