xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

HandleUniversalLink returning false when link is created manualy #523

Closed RomanPoschl closed 2 years ago

RomanPoschl commented 2 years ago

Hello, I am trying to implement Firebase DynamicLinks to our app. I mostly followed your example.

When I open the app by DynamicLink that I created in Firebase console the method HandleUniversalLink returns true and completion handler is called. But when I try manually created URL as they describe here https://firebase.google.com/docs/dynamic-links/create-manually the completion handler is not called and the method HandleUniversalLink returns false.

On Android, both ways work.

The DynamicLinks.PerformDiagnostics(null) is reporting no errors found. Also, there is no other error in logs from the app or device. I also tried the method DynamicLinks.SharedInstance.FromUniversalLinkUrl(userActivity.WebPageUrl)) But this method is returning null instead of DynamicLink.

I have installed these firebase packages:

RomanPoschl commented 2 years ago

So I find out. The problem is probably because my link parameter in a manually created URL has query parameters.

So I am trying to have link=domain.com/?page=detail. When I look at userActivity.WebPageUrl there is URL decoded, though I have my link parameter encoded. When I try to remove ?page=detail from the link parameter. Then in userActivity.WebPageUrl I see link parameter encoded and method works. So I think, there is some problem with handling the link when it is decoded?

RomanPoschl commented 2 years ago

Hello, I am closing this issue, it was my fault. Looks like the value link property. The URL must be every time URL encoded.