Firebase-ios-sdk: Getting Fatal Error on DynamicLinkComponents.

Created on 8 May 2019  路  7Comments  路  Source: firebase/firebase-ios-sdk

  • Xcode version: 10.1
  • Firebase SDK version: 6.0.0
  • Firebase Component: Firebase/DynamicLinks
  • Component version: 4.0.0

Hi, Thank you for this awesome library, I am stuck at a point when dealing with deep linking, it has been enabled before and was working fine, then God knows how did I got ShortUrl nil, after some RND, I did managed to update pods and then all happens that when instancing DynamicLinkComponents with its initialiser,
let components = DynamicLinkComponents(link: urlLink, domainURIPrefix: AppConstants.kDynamicLink_Domain)!
both urlLink and AppConstants.kDynamicLink_Domain have values in them but still getting app crashed, with Fatal error that nil found while unwrapping.
I have no idea why its happening. but I have seen some other issues which does not relate to mine so I believe its not duplicate.

dynamiclinks

Most helpful comment

It is working fine now with this, "https://marcoapp.page.link" it was my mistake to not look into the documentations, Thanks for your help.

All 7 comments

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

Hi @asn111, can you share the parameters that you're passing into the initializer? The initializer will return nil if the link is not https or the domain URI prefix is not a valid URL.

Thank you for response @morganchen12 , Yes,
for the urlLink i am passing https://marcotest.azurewebsites.net/api/Groups/(groupIDInInt) and for domainURIPrefix its marcoapp.page.link. and it was working fine before with same parameters.

Hi @morganchen12 is there anything i need to change, let me know kindly. its been stuck for two days already, thanks.

@asn111 According to the DynamicLinkComponents(link:domainURIPrefix:) docs the domain URI prefix must start with a valid HTTPS scheme (https://). Do you pass "marcoapp.page.link" or "https://marcoapp.page.link" as domainURIPrefix?

@maksymmalyhin no i am just passing marcoapp.page.link like this but it was also the same when it was working. let me try with https://

It is working fine now with this, "https://marcoapp.page.link" it was my mistake to not look into the documentations, Thanks for your help.

Was this page helpful?
0 / 5 - 0 ratings