Firebase 邀请显示邀请已发送但尚未收到

2024-03-08

我尝试使用 Firebase 邀请发送邀请。当选择联系人的电子邮件时,Firebase 表示已发送邀请,但从未收到该电子邮件。

在控制台上配置 SHA1 证书。

返回的错误代码始终为 RESULT_OK,并且从 AppInviteInvitation.getInvitationIds 返回的邀请数量是正确的。

SDK 在 gradle 上更新为最新版本 10.0.1,如文档中所述。

创建邀请的代码是:

Intent intent = new AppInviteInvitation.IntentBuilder(title)
                .setMessage(msg)
                .setCallToActionText(callToActionText)
                .setOtherPlatformsTargetApplication(AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS, IOS_CLIENT_ID)
                .build();

有任何想法吗?


我遇到了同样的问题,并且设法解决了它,尽管我不太确定哪个步骤真正有帮助。

值得指出的是,在我的情况下,当我删除方法调用时,电子邮件已完美发送:

.setOtherPlatformsTargetApplication(...)

应用了以下步骤:

  1. Android 和 iOS 项目设置的所有字段均在 Firebase 控制台上填写(包括 App ID 前缀和 App Store ID)。
  2. 为 Firebase Android 项目设置添加了 SHA-256 哈希值(来自调试和发布密钥库):

    keytool -exportcert -keystore path-to-debug-or-production-keystore -list -v
    
  3. Updated google-services.json从 Firebase Android 项目设置下载并添加到应用程序根目录(使用 GoogleServicesJson Build Action for Xamarin)。因此该文件包含以下内容:

    ...
    "appinvite_service": {
      "status": 2,
      "other_platform_oauth_client": [
        {
          "client_id": "1234567890-specified_ios_client_id.apps.googleusercontent.com",
          "client_type": 2,
          "ios_info": {
            "bundle_id": "ios.app.bundle.id",
            "app_store_id": "9876543210"
          }
        },
        ...
      ]
    }
    ...
    

指定的client_id是一样的.setOtherPlatformsTargetApplication(...)方法调用和传入google-services.json

此外,Firebase Invites 之前已针对 iOS 项目进行了调整,但我不认为它对 Android 是否有帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Firebase 邀请显示邀请已发送但尚未收到 的相关文章

随机推荐