繁体   English   中英

快速地以编程方式创建的firebase动态链接不起作用,没有域

[英]firebase dynamic link created programmatically in swift doesn't work, no domain

我已使用动态链接配置​​了Firebase项目,我拥有DL的域。 但是,当我以编程方式创建收缩链接时,会出现错误。 我收到此错误是为了进行目标测试和项目调试,但是相同的代码用于发布应用程序,因此动态链接有效。 每个项目目标都有自己的Firebase项目和域。 我不知道为什么只能发行版本?

Your project does not own Dynamic Links domain

使用您的bundleID,app_code和API密钥尝试以下命令行:

curl -X POST --dump-header -H“ X-Ios-Bundle-Identifier:REPLACE_THIS_WITH_YOUR_BUNDLE_ID” -H“接受:application / json” -H“内容类型:application / json” -d“ {\\” longDynamicLink \\“:\\” https://REPLACE_THIS_WITH_YOUR_APP_CODE.app.goo.gl/?link = https%3A%2F%2Fwww%2Egoogle%2Ecom%3Fq%3Djump \\“,\\”后缀\\“:{\\” option \\“ :\\“ UNGUESSABLE \\”}}“” https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=REPLACE_THIS_WITH_YOUR_API_KEY

让我知道它是如何工作的。

如果此行能够创建短链接,则iOS代码中将出现错误。

curl -X POST --dump-header - -H "X-Ios-Bundle-Identifier: com.debugbundlefromanotherfirebaseproject.debug" -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"longDynamicLink\":\"https:\/\/RELEASE_DOMAIN.app.goo.gl\/?link=https%3A%2F%2Fwww%2Egoogle%2Ecom%3Fq%3Djump\",\"suffix\":{\"option\":\"UNGUESSABLE\"}}" "https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=API_KEY_RELEASE"
{
  "shortLink": "https://RELEASE_DOMAIN.app.goo.gl/EDKuPWwaXrFzfs4S2",
  "warning": [
    {
      "warningCode": "UNRECOGNIZED_PARAM",
      "warningMessage": "Android app 'android.com.releaseandroidid' lacks SHA256. AppLinks is not enabled for the app. [https://firebase.google.com/docs/dynamic-links/debug#android-sha256-absent]"
    },
    {
      "warningCode": "UNRECOGNIZED_PARAM",
      "warningMessage": "Android app 'android.com.debugeandroididfromanotherfirebaseproject' lacks SHA256. AppLinks is not enabled for the app. [https://firebase.google.com/docs/dynamic-links/debug#android-sha256-absent]"
    }
  ],
  "previewLink": "https://RELEASE_DOMAIN.app.goo.gl/EDKuPWwaXrFzfs4S2?d=1"
}

我认为这可能是Firebase中的问题。 因为对于发布项目域POST工作,尽管请求具有错误的捆绑包ID,所以其他结果警告中包含来自另一个Firebase项目的带有Android ID的警告。 我正在等待Firebase的回应。 上面的例子。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM