firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.46k stars 1.43k forks source link

Dynamic Links don't survive app install on iOS 11.3.1 #1244

Closed richardliveraise closed 6 years ago

richardliveraise commented 6 years ago

Problem:

Dynamic links does not survive app install from app store on iOS 11.3.1

://google/link/?dismiss=1&is_weak_match=1 Note that this works fine on previous iOS versions (11.2 and below) #### Steps to reproduce: 1. Click on Firebase Dynamic Links 2. Browser redirect to app store 3. Install from app store 4. Open the app 5. Dynamic link not passed
morganchen12 commented 6 years ago

Can you share your link handling code?

cc @dmandar

richardliveraise commented 6 years ago

@morganchen12 For sure.

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {

//the url here returns:
//google/link/?match_type=none&match_message=No pre-install link matched for this device.
or     
//google/link/?dismiss=1&is_weak_match=1

    FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];

//dynamicLink.url is nil here.

}

Note that on iOS 11.2 it still works. Not sure if it's the same issue, but check this out: https://github.com/BranchMetrics/ios-branch-deep-linking/issues/830#issuecomment-387562738

richardliveraise commented 6 years ago

@morganchen12 @dmandar Any update on this? Thanks!

morganchen12 commented 6 years ago

No update yet, but we should be able to get to this this week.

dmandar commented 6 years ago

Can you confirm if your links are using the app preview page? (when creating a DL in the console, are you checking the 'Skip the app preview page (not recommended)' option?

richardliveraise commented 6 years ago

@dmandar yes, we're skipping the app preview page. But this works prior to iOS 11.3.1

richardliveraise commented 6 years ago

@morganchen12 @dmandar any update on this? thanks.

morganchen12 commented 6 years ago

Mandar is currently investigating this, but hasn't come back with anything yet.

Internal bug filed at b/79657436.

kbcodelogicx commented 6 years ago

What about the issue ? If this issue persist in every latest OS version then what is the meaning of using Firebase Dynamic link ? And why they are not providing with any solutions to this when this issue is creating so much noise over the internet.

dmandar commented 6 years ago

@kbcodelogicx we are actively investigating this issue and will have an update very soon.

dmandar commented 6 years ago

Update: Can you confirm this is fixed for you in iOS 11.4?

richardliveraise commented 6 years ago

@dmandar @morganchen12 this is fixed on iOS 11.4, but issue still persists on iOS 11.3

morganchen12 commented 6 years ago

@richardliveraise is this iOS 11.3.1, or just iOS 11.3?

richardliveraise commented 6 years ago

@morganchen12 correction, issue is on 11.3.1, I don't have 11.3 device to confirm.

dmandar commented 6 years ago

@richardliveraise that's correct - the issue still persists only on that version - we have a bug fix in the works for it. Also, 11.4 should not exhibit the behavior.

morganchen12 commented 6 years ago

To clarify, this is a server issue, so you won't need an SDK update in order to receive the fix. I'll leave this issue open for the time being until all of the error cases are fixed.

toco1001 commented 6 years ago

+1

toco1001 commented 6 years ago

It's working on iOS11.3, but not iOS11.3.1

fmkpro1984 commented 6 years ago

Hi @morganchen12 , I'm also having this issue and am troubled because iOS 11.3 has currently the majority of iOS userbase. No pressure but do we have any ETA on the server side fix? Thanks in advance...

morganchen12 commented 6 years ago

I unfortunately can't provide an exact ETA, but can hopefully shed some light on what's going on behind this issue.

The bug in matching 11.3.1 devices occurs because Safari doesn't report the full version of 1.3.1 in the user agent. The fix for this is relatively simple, but is only one of three fixes we're making, and I don't know how they'll be prioritized.

I'll update this bug with an ETA once it's available.

shali3 commented 6 years ago

Is it going to be a server side fix?

morganchen12 commented 6 years ago

Yes.

davidwernhart commented 6 years ago

I am trying to implement Firebase Invites on iOS right now, and after an app install I am also always receiving myAppScheme://google/link/?dismiss=1&is_weak_match=1 instead of the deep link. Therefore FIRInvites cannot parse it and it does not work. Is this related to the issue with Dynamic Links? I have one iPhone 6 on iOS 11.4 and one iPhone 5 on 10.3.3 and it does not work on both of them.

Mind you that it does work on android (with the same firebase project) and on iOS when the app is already installed, so this problem is just occuring when the user is first installing the app after receiving an Invite.

morganchen12 commented 6 years ago

@davidwernhart can you file a new issue and include the versions of the Firebase frameworks you're using?

richardliveraise commented 6 years ago

@morganchen12 any update on this? Thanks!

dmandar commented 6 years ago

This should now be fixed on the backend side. Please reopen if you still see issues.

richardliveraise commented 6 years ago

yes, this is fixed on iOS 11.3.1 . Thank you!!

Younghun-Jeong commented 5 years ago

i have 11.4.1 (iPhone7) 3 App Test

MarsVard commented 5 years ago

Is this issue still open? Our app launches deep links perfectly when it is already installed, but the deep links never persist after install.

When debugging we can see the deep link in the logs with a message saying "Deep link does not contain valid required params" but it does say "Link is uniquely matched for this device" at the same time...

Any suggestions?

tamilvelraj commented 5 years ago

Yes, it is not working in iOS 12.0 also.

dmandar commented 5 years ago

The backend issue has been fixed. Can you make sure that the target app has the same bundleID as that contained in your deep link (in case of a shortened link, you can go to the Firebase console to get the long version of the link). Also, do you have the (recommended) app preview page enabled?

dmitry-solomadin commented 5 years ago

Does not work on iOS 12.3 It does work when the preview page is enabled, though.

Banck commented 4 years ago

@dmandar Have the same issue, when preview page is disabled: No pre-install link matched for this device With preview page enabled all is fine. iOS version: 12.3

Seems it happens only with custom domains...

averyvery commented 4 years ago

I believe I'm having the same issue with custom domains + preview + deferred links on Firebase v5.20.2. I'm building my links manually. When I do the following with the preview enabled...

...openUrl in AppDelegate is correctly called with my link URL. However, adding efr=1 to the link (skipping the preview page) and repeating the process, the openUrl is called with "[my bundle ID]://google/link/?dismiss=1&is_weak_match=1" instead.

Reading the docs, I'm not sure if this is intentional or not — is the app preview required to make deferred deep links work?

morganchen12 commented 4 years ago

@averyvery it's not explicitly mentioned as required since DDL can work without it, but app preview does provide more accurate matching of the app installation to the device that tapped on the link. @dmandar can maybe elaborate more.

AppKidd commented 4 years ago

@dmandar When can we expect to see dynamic links working without the preview page and with a forced redirect? This disrupts our app's installation flow as it's one of the main ways users install our app.

CyrilNb commented 4 years ago

Same in our app. It's a shame that's not mentioned at all and we have to browse all internet to find this to finally have a clue about this bug. As many devs, I think the option to skip the app preview is a must-have, and the success of the dynamic link should not depend on it. Especially when you make this feature SKIPPABLE. I really encourage you to make this works without app preview cause it disrupts the installation flow especially with a referral program.

codinglava commented 4 years ago

We also face same issues in our iOS apps. All works fine with *.page.link domains, but when we use a custom domain then Dynamic Links don't survive app install.

In that case it is always “appscheme://google/link/?request_ip_version=IP_V4&match_message=No pre-install link matched for this device.” URL that passed to the “application:openURL:sourceApplication:annotation:” method.

So we just can’t use our brand domains for Dynamic Links, and it harms effectiveness of our campaigns.

Is there any progress of fixing this issue? Or a workaround without enabling a Preview page?

quetool commented 4 years ago

@loobnin did you find any solution or made some progress on this issue?

mickmaccallum commented 4 years ago

I hate to pile on with a +1 but we're still seeing this issue on iOS 13.x as well. Perhaps this issue should be reopened.

morganchen12 commented 4 years ago

@0x7fs, can you open a new issue and try reproducing the issue with the dynamic links quickstart?

quetool commented 4 years ago

@0x7fs could you check for [UIApplicationDelegate application:openURL:options:] function in your AppDelegate? In my case that was my issue, If you do have openURL delegate y your AppDelegate with nothing in it, somehow this is overriding the same method in FirebaseDynamicLinksPlugin.m so you need to delete that one in your AppDelegate.m, like I explain here https://github.com/FirebaseExtended/flutterfire/issues/100#issuecomment-541204778

So this is FirebaseDynamicLinksPlugin.m Captura de Pantalla 2019-10-23 a la(s) 14 25 27

And this is AppDelegate.m Captura de Pantalla 2019-10-23 a la(s) 14 25 45