2

Everything I say pertains to ios 9 and above. Firebase documentation says:

When a user opens one of your Dynamic Links, if your app isn't yet installed, the user is sent to the Play Store or App Store to install your app (unless you specify otherwise), and your app opens. You can then retrieve the link that was passed to your app and handle the link as appropriate for your app.

I succeeded to install my application by FB-link and to open my installed application by the link. But when I try install and open in single step the application is opened without link passed. That is if my application already installed and I click on the link then the application is opened with link passed. But if application is not installed and I click on FN-link then iOS open AppStore and install the application and then I click on 'open' button and the application is opened without links. I am sorry for my bad English but hope that you are understanding me.

UPDATE

I've seen same similar question and question.

Check points.

  1. Application starts (openURL is executed) by custom schema url (in my case it is same as bundle id)
  2. Application starts (continueUserActivity is executed) by dynamic link.
  3. I tryed to use cellular instead of wi-fi without success.
  4. If application not installed taping on dynamic link open AppStore with my app.
  5. In didFinishLaunchingWithOptions I call [FIRApp configure].

Nothing helped.

I didn't say that I use Xamarin and Xamarin FireBase May be it uses the old version of native FireBase library.

SOLVED!

Xamarin Firebase plugin has been updated and problem have been solved.

Alexey Subbota
  • 938
  • 6
  • 23

2 Answers2

2

Let me suggest how to test the Firebase Dynamic Links on iOS in the case when the iOS App is not installed.

  • Remove the iOS App from iPhone (ensure to use actual device, not Simulator);
  • Generate Firebase Dynamic Link and paste the link to the iOS Notes App;
  • Tap on the link in Notes App;
  • Ensure that you see Interstitial page, where you tap on "Open" button. After this you should be navigated to Apple AppStore;
  • Put breakpoint or NSLog to [UIApplicationDelegate application:openURL:options:] and observe the url value;
  • Install and launch the App using Xcode;
  • Shortly after App is launched you should observe call to the [UIApplicationDelegate application:openURL:options:] with url. Here you will call:

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

If Firebase Dynamic Link is found you should see dynamicLink.url property being non-nil. If Firebase Dynamic Link not found, you will see dynamicLink.url property being nil.

When this scenario working well, you can re-check FDL behavior in Safari, Facebook, Email and other apps.

If App is already installed, then tapping on Firebase Dynamic Link should launch the App with the link. Watch out for [UIApplicationDelegate application:continueUserActivity:restorationHandler:], value userActivity.webpageURL.

Oleksiy Ivanov
  • 2,454
  • 15
  • 21
  • If abstracted from the firebase library should AppStore open my application with openURL or continueUserActivity callback called? – Alexey Subbota Aug 02 '17 at 23:13
  • AppStore will not pass any link to your App. So after App is installed, the User can launch App directly from AppStore by tapping "Open" or from iPhone home screen. In each of the cases no link is passed to the App. Instead, "Firebase Dynamic Links iOS SDK" will retrieve pending dynamic link from the server and call your UIApplicationDelegate method with found link. – Oleksiy Ivanov Aug 02 '17 at 23:16
  • This was a surprise for me! But how does Firebase know what the link was for this device? – Alexey Subbota Aug 03 '17 at 07:33
  • I've done all steps above and nobody called openURL. I believed that [FIRApp configure] may help but it's not. – Alexey Subbota Aug 03 '17 at 08:05
  • @AlexeySubbota Please try suggestions enumerated in this answer https://stackoverflow.com/questions/45415731/firebase-dynamic-links-not-survive-installation/45422973#45422973 If that does not helps, please open Firebase bug, see comment https://stackoverflow.com/questions/45415731/firebase-dynamic-links-not-survive-installation/45422973#comment77814155_45422973 – Oleksiy Ivanov Aug 03 '17 at 18:17
  • Unfortunately, the FB support sent me to stackoverflow, because I use xamarin. – Alexey Subbota Aug 07 '17 at 09:58
  • Just read the support case. I would suggest reaching out to Xamarin FDL plugin developer, who seems to be Xamarin itself. I would be happy to help if there are any issue in iOS FDL setup. I do not have cycles to dig into Xamarin. Another thing you can potentially try: use your Firebase Dynamic Links project information and setup ios_quickstart example for FDL. If this will work then error is most likely in Xamarin plugin and not your data. – Oleksiy Ivanov Aug 08 '17 at 18:24
0

I was able to solve this issue on my end without any code changes, and by simply running pod update and updating to the latest version of Firebase.