firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
822 stars 425 forks source link

FDL deeplink doesn't survive if the app is not open on iOS. #355

Closed sakiraykurt closed 5 years ago

sakiraykurt commented 5 years ago

Please fill in the following fields:

Unity editor version: 2018.3.14 Firebase Unity SDK version: 5.6.1 Firebase plugins in use (Auth, Database, etc.): DynamicLinks, Analytics Additional SDKs you are using (Facebook, AdMob, etc.): Facebook Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac Platform you are targeting (iOS, Android, and/or desktop): iOS

Please describe the issue here:

FDL deeplink doesn't work on ios if the app is not open.

Not work!

  1. Clicking on the link when the app is not open.
  2. App is opened.
  3. Nothing happens.

Work!

  1. Clicking on the link when the app is open in background.
  2. Turning back to the app.
  3. It shows the received link.

All FDL services work great on Android.

I checked these links as well but not solving my problem. firebase-ios-sdk/issues/2666 firebase-ios-sdk/issues/233

Please answer the following, if applicable:

Yes, it doesn't work on the example project for me also.

stewartmiles commented 5 years ago

@sakiraykurt are you able to reproduce the issue with our sample application? Are you sure you ran through all setup steps in the sample readme?

sakiraykurt commented 5 years ago

Actually, It was not working for me then I tried that one more time for missing some points and implementing the configs correctly. It works with sample project now but still doesn't work on my original project. Maybe some plugins conflict with that. I will remove the plugins which I suspect to build.

sakiraykurt commented 5 years ago

Hey @stewartmiles I found the problem which is AppsFlyer Unity SDK on iOS. That conflicts with FDL. Info Link about AppsFlyer.

stewartmiles commented 5 years ago

@sakiraykurt I'm guessing the problem here is likely AppsFlyer breaking our swizzling.

The C++ SDK swizzles these methods on startup when dynamic links is present: https://github.com/firebase/firebase-cpp-sdk/blob/c6a326f52cbdd0247f020123ae1652911b30b0d9/app/src/invites/ios/invites_ios_startup.mm#L128

I recommend opening a bug with AppsFlyer since we interoperate fine with other SDKs that swizzle like Facebook.

asn111 commented 5 years ago

Hellow every one Thank you for this awesome library, but 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 valid values in them but still getting app crashed, with Fatal error that nil found while unwrapping. I have no idea why its happening, I have opened another issue but now one is answering me there.

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