简体   繁体   中英

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

I have configured firebase project with dynamic link, I have domain for DL. But when I creating shroten link programmatically then I get an error. This error I receive for target test and debug of project, but same code is using for release app and for it dynamic link works. Each project target have own firebase project and domain. I don't know why works only release version ?

Your project does not own Dynamic Links domain

Try this command line with your bundleID, app_code and API key:

curl -X POST --dump-header - -H "X-Ios-Bundle-Identifier: REPLACE_THIS_WITH_YOUR_BUNDLE_ID” -H "Accept: application/json" -H "Content-Type: application/json" -d "{\\"longDynamicLink\\":\\"https://REPLACE_THIS_WITH_YOUR_APP_CODE.app.goo.gl/?link=https%3A%2F%2Fwww%2Egoogle%2Ecom%3Fq%3Djump\\",\\"suffix\\":{\\"option\\":\\"UNGUESSABLE\\"}}" " https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=REPLACE_THIS_WITH_YOUR_API_KEY

Let me know how it worked.

If this line was able to create short link, than error in iOS code.

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"
}

I think that could be problem in Firebase. Because for release project domain POST work although request have mistake bundle id, additional in result warnings contain one warning with android ID from another Firebase project. I am waiting for response from firebase. Example above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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