【问题标题】:App Store link not shown in app-invites email应用邀请电子邮件中未显示 App Store 链接
【发布时间】:2016-02-02 15:23:11
【问题描述】:

我正在尝试在我们的应用程序中实现 App Invites,但我无法让 iOS 客户端链接到 App Store。他们总是显示 Play 商店链接。

根据documentation,如果我们在开发者控制台的项目中有多个iOS客户端ID,我们需要调用setOtherPlatformsTargetApplication。问题是,如果我尝试添加我们的 iOS 应用程序客户端 ID,则永远不会发送电子邮件

.setOtherPlatformsTargetApplication(PROJECT_PLATFORM_IOS,
                    "104XXXXXXXXXX-i089XXXXXXXXXXXX.apps.googleusercontent.com")

如果我忽略此调用,则会发送电子邮件但它指向 Play 商店。

无论如何,检查 google-services.json 只会显示一个 iOS 客户端 ID

{
    "project_info": {
        ...
    },
    "client": [
        {
            "client_info": {
                "package_name": "com.mycompany"
            },
            "oauth_client": [
                ...
            ],
            "api_key": [

            ],
            "services": {
                "appinvite_service": {
                    "status": 2,
                    "other_platform_oauth_client": [
                        {
                            "client_id": "XXXXXX-YYYYY.apps.googleusercontent.com",
                            "client_type": 2,
                            "ios_info": {
                                "bundle_id": "com.mycompany.app",
                                "app_store_id": "123456789"
                            }
                        },
                        {
                            "client_id": "XXXXXX-JJJJJJJJ.apps.googleusercontent.com",
                            "client_type": 3
                        }
                    ]
                }
            }
        },
        [
            another client info for the debug package name
        ],
        "client_info": [

        ],
        "ARTIFACT_VERSION": "1"
    }

我不知道我还能尝试什么,欢迎任何想法

我正在为 androidgoogle-services' gradle 插件使用 AS 2.0 preview 9 和 2.0.0-alpha9 版本。另外,正如documentation 中所述,我已将应用插件放在 app/build.gradle

的底部

【问题讨论】:

    标签: android google-app-invites


    【解决方案1】:

    问题是我有 2 个共享相同 Bundle ID 的凭据。

    此外,最近添加的(也是 google-services.json 中列出的唯一一个)没有被使用。一旦我删除它,真正的凭据就会添加到 json 文件中,并且对 setOtherPlatformsTargetApplication 的调用工作得很好。

    【讨论】:

    • 你能分享你的 google-service.json 结构,iOS 应用在哪里工作吗?
    • google-services.json 在问题中,我不必更改结构,只需更改 client_id。无论如何,这已经 9 个月大了,并且邀请处于测试阶段,也许他们已经改变了一些东西。首先,它看起来已经集成到 Firebase 中。我已经在我的应用程序(我不再从事的旧项目)上进行了测试,为电子邮件生成的链接似乎在应用程序上运行良好,但从桌面浏览器打开时却不行。
    猜你喜欢
    • 2022-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-05
    • 1970-01-01
    • 2018-10-18
    • 1970-01-01
    相关资源
    最近更新 更多