Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I test Firebase Dynamic Links if my app is not in the App Store?

I'd like to be able to open the app and print the parameters when I click on the dynamic link (even though it's not published).

Is there a way to do this?

like image 964
TIMEX Avatar asked Sep 21 '16 00:09

TIMEX


People also ask

Do Firebase dynamic links work on iOS?

In the Firebase console, open the Dynamic Links section. Accept the terms of service if you are prompted to do so. Ensure that your app's App Store ID and your App ID prefix is specified in your app's settings. To view and edit your app's settings, go to your Firebase project's Settings page and select your iOS app.

Are Firebase dynamic links free?

Dynamic Links are smart URLs that allow you to send existing and potential users to any location within your iOS or Android app. They survive the app install process, so even new users see the content they're looking for when they open the app for the first time. Dynamic Links are no-cost forever , for any scale.

How do I find dynamic links?

You can also use Google Analytics in your app to track the performance of your Dynamic Links. The following Analytics events are automatically logged when you open a short or long Dynamic Link in your app. Logged when a user opens the app for the first time via a Dynamic Link.


2 Answers

Yes! In fact, I go through this exact process in the getting started videoS (part 1), (part 2), which I recommend you check out if you haven't yet.

But, generally speaking, you can test the "Open my app if I have it installed" flow simply by clicking on a dynamic link. If your app is installed on the device, it should open up just fine; even if it's not a published app.

If you want to test the non-installed flow, this is pretty easy, too.

  • First, give your Firebase project an app store ID in your project settings. It can be any valid App store ID -- it doesn't have to be for your app.
  • Then generate a new dynamic link.
  • This time, when you click on this new link, it should take you to the app store for the ID you listed above. You don't need to actually install this app -- just making it to the app store listing is good enough.
  • Now, go ahead and reinstall and run your app. If everything is working properly, it should retrieve and display the dynamic link data for you.
like image 120
Todd Kerpelman Avatar answered Sep 18 '22 09:09

Todd Kerpelman


I have faced the same issues, and after spending many hours trying to found a solution, and following the instruction to debug explained by Todd Kerpelman post, I could identify that the firebase has not sent a universal link on the first app launch and has sent the scheme URL with the following structure:

[bundle_id]://google/link/?deep_link_id=[firebase_universal_link] 

After identifying that, I found the dynamicLinkFromCustomSchemeURL method inside of the Firesabe SDK and I could solve my problem on the first app launch by dynamic links.

/**  * @method dynamicLinkFromCustomSchemeURL:  * @abstract Get a Dynamic Link from a custom scheme URL. This method parses URLs with a custom  *     scheme, for instance, "comgoogleapp://google/link?deep_link_id=abc123". It is suggested to  *     call it inside your |UIApplicationDelegate|'s  *     |application:openURL:sourceApplication:annotation| and |application:openURL:options:|  *     methods.  * @param url Custom scheme URL.  * @return Dynamic Link object if the URL is valid and has link parameter, otherwise nil.  */ - (nullable FIRDynamicLink *)dynamicLinkFromCustomSchemeURL:(NSURL *)url     NS_SWIFT_NAME(dynamicLink(fromCustomSchemeURL:));  /**  * @method dynamicLinkFromUniversalLinkURL:completion:  * @abstract Get a Dynamic Link from a universal link URL. This method parses the universal link  *     URLs, for instance,  *     "https://example.page.link?link=https://www.google.com&ibi=com.google.app&ius=comgoogleapp".  *     It is suggested to call it inside your |UIApplicationDelegate|'s  *     |application:continueUserActivity:restorationHandler:| method.  * @param URL Custom scheme URL.  * @param completion A block that handles the outcome of attempting to get a Dynamic Link from a  * universal link URL.  */ - (void)dynamicLinkFromUniversalLinkURL:(NSURL *)url                              completion:(FIRDynamicLinkUniversalLinkHandler)completion     NS_SWIFT_NAME(dynamicLink(fromUniversalLink:completion:));  /**  * @method dynamicLinkFromUniversalLinkURL:  * @abstract Get a Dynamic Link from a universal link URL. This method parses universal link  *     URLs, for instance,  *     "https://example.page.link?link=https://www.google.com&ibi=com.google.app&ius=comgoogleapp".  *     It is suggested to call it inside your |UIApplicationDelegate|'s  *     |application:continueUserActivity:restorationHandler:| method.  * @param url Custom scheme URL.  * @return Dynamic Link object if the URL is valid and has link parameter, otherwise nil.  */ 
like image 31
Renato Machado Filho Avatar answered Sep 22 '22 09:09

Renato Machado Filho