Deep linking in React Native apps - a webinar by Jakub Adamczyk from Software Mansion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone does that work i don't think so yeah so welcome uh everyone uh software mentioned webinar and this is our fourth webinar my name is christophe maguera and here with us today is jakob padamchik who works at sofa mansion he's one of our react native experts um and and yeah i'm really excited about this webinar because um yeah it actually touches a really important topic which is deep linking something that really everyone has to struggle with at some point when when building and deploying and react native apps and there are many um different steps that you may get wrong when when setting up deep thinking so starting from the setup and then handling that in within the app integrating with some third-party services so all of that will be explained today i'm really happy about this so i'm sure that this this content of today's webinar is going to be useful to to many of you um so yeah so i'm not going to be talking anymore and we'll just pass the voice to jakub so just give him like a round of virtual applause uh on the chat box and and let's get started thank you okay hi everyone let me just share my presentation run in the blinking iran native webinar i will give you a general overview of it uh my name is jakub adam czech i'm a software engineer at software management i work full-time mobile apps part-time as react native open source contributor and you can find me on twitter and github under handle visible on the screen today's topic is the blinking i will tell you what it is i will try to show some use cases of it i will try to briefly guide you for deep link setup on android ios and javascript i will give you an example on how to handle deep linking in javascript so how to go from links flowing into your app to actually guiding user to specific screen you want to show them oh no i will try to also show you some additional linking services you might encounter and lastly i will try to give you a note on security of deep links what's much to do basically so let's start with what is a deep link i think everyone is using deep linking daily in some form uh we are sending each other links to content all over the internet all the time like links to youtube videos uh links to twitter posts memes etc the list goes on really so a deep link basically is a link that takes you to some kind of content as i probably mentioned most web links are deep links and first example uh will be like a counter example uh let's take software mention.com domain formally this is not a deep link because this is the overall page going further software mentioned that com slash academy this is a deep link we are guiding the user to some kind of content which in this case is academy or software management academy you can have a link like software messaging academy.com slash academy and some query parameters this is also about deep link you can take advantage of query parameters as well uh now that we've mentioned deep links in the web uh let's start talking about the today's topic deep linking in deep links in mobile apps their role is more or less the same as in the web they just link to screens in your native app your mobile app instead of web page typical link for mobile app looks a bit different but the functionality is more or less the same uh one note though you can also use web urls to link to your mobile app but more on that later and as i experience it term deep linking in mobile context is usually used for all the links not only those with specified paths leading somewhere else than a home screen first off i would like to show you how a typical classic mobile update is constructed so my examples will be based on an application that doesn't exist but you can imagine its existence uh imagine there was an application for software mentioned academy it will have a home page with announcements for example like today's webinar we will have a screen with list of webinars it's going to play specific webinar and you probably get the idea so such a deep link for such an app would start with a uri scheme you can create your own ui scheme or create a url screen that is very popular or take someone else's url scheme but mostly you create your own for our app we would like to have for example abbreviation of software mention academy and it starts with swm academy and after that you can possibly add anything you want but i advise you to stick to how it works in the web and how you construct links in the web so after that you can have some arbitral link path for example webinars you can nest those link paths or add path parameters and as well you cannot query parameters uh to give you some examples of that we've go like following the same uh example application that i mentioned uh you can have a home page link it will be just the url scheme you can have a link to list of webinars that will be software mentioned academic course slash webinars you can have a link to concrete webinar taking advantage of path parameter so software mention academycon webinars slash deep linking that would be today's webinar and you can have if we had a long list of webinars uh example one year ahead of us a list of webinars you can open list of webinars with a search term pre-field so you can for that you can take advantage of query parameters uh it was a search term for example styling uh one thing to note uh you can have two applications installed that subscribe to the same url scheme and the behavior differs between android and ios uh so what android does is android asks you i'll let you choose the app you want to open and you can also choose the default one uh on the picture you can see example with opening web urls uh whereas on ios i was choosing it for you uh pre ios 11 as far as i know it was random after ios 11 apple implemented it so that the first application that was installed and that registers for that uri scheme is opened uh the first uh like i mentioned before apply apart from supporting links with custom uri prefix uri scheme you can open your applications with web links uh it is usually a safer method and probably a better one but it requires some additional setup and might you might end up with some quirks so basically you have your website link like softwaremention.com and you will be linked to a webpage or a mobile app depending whether the user has the app installed you need to have the same paths on web and mobile because you don't want to confuse your users [Music] and to give you an example or visualize how it works a user clicks a link if the object is installed user has the mobile app opens to a screen you want it to open if user don't have the app installed you can navigate the user is navigated to web page uh okay uh so android and ios will implement this system on ios it's called universal links and on android the respective system is uplinks uh overall ios is safer because it requires verification that you actually own the domain but it has several quirks android is overall simpler and probably easier to set up speaking of ios quirks you might encounter something like cult in the community phantom banner in safari so to give you to give you an example uh i took airbnb as an example here uh you have installed airbnb app on your mobile device on your iphone and you opened airbnb.com in the safari browser you will be presented with a banner that looks like in the picture that will prompt you to open this link in the application you have installed instead uh of surfing it or searching it uh viewing it on the web apart from that uh you will be presented after you open the app you will be presented with the breadcrumb be the top right corner i'm not sure if in the current ios version it is still existent but at least it was before after you click this breadcrumb in top right corner you will be redirected to the website instead of mobile app and ios will remember that you wanted to view this page screen in the web instead of mobile app and next time you click this link you will be immediately directed to the website uh same happens when you manually open in safari this is the same behavior when you're manually opening in the web it will ios will remember that uh fortunately enough this can be overridden in your settings so we can revive the old behavior so opening in mobile apps in settings okay now we i would like to show you some deep linking use cases some are more more popular ones uh i think this is important to get advantage of the skills uh that we just discussed so first one you can link from within the application itself you can use drag native code like link in open url and it will basically open this url uh you can link to your own app but you can also link to other apps so if you have like two applications that should ideally work together uh you can open the another one to specific page uh with a deep link and i think the latter is more popular and it's pretty handy you can also link from web pages you can embed deep links on a web page and redirect users to the native app if they have one this is probably less popular but there is a possibility for that a very popular use case is linking from social media posts you can run campaigns and direct users straight to the app with help of additional services you can actually try to make potential users install the app and go to the content afterwards i'll cover that later and it's called deferred deep linking and links in campaigns or social media posts is a very popular use case apart from that you can embed deep links in your push uh the best example of that is any messaging app i think you get a message from your someone you know you got a heads-up notification after you click that you are immediately directed to conversation with that person uh apart from that messaging up example you can also run info campaigns for your users to improve their ad engagement uh and similar stuff so when they click it they open the app in the specific place that the campaign is about if you manually send push notifications check how to add links to them because there are differences between platforms one of the platforms as far as i remember uh sends them just as a film in the payload so you have the precautions here uh another popular one uh is links in emails imagine you have a newsletter with new features for your app and you embed a deep link to that feature uh this is a risky one because a user can have an old version so maybe that's not the best example but you can have an arbitrary campaign and you want the users to open your app right away [Music] and it will open for them if they have it installed uh if you take advantage of additional services uh you can as well make the users install the app a very common pattern at least i think very common is using deep links to redirect back to the app after authorization with protocol like of2 i personally use google service called l0 i'm not sure if this is the same protocol but it took advantage of deep linking a special code was passed to the application and then it was exchanged for token keep in mind that you shouldn't pass any vulnerable data through deep links so do not pass user access tokens as a query parameter okay uh we know what it is how to use it uh i would like to now tell you how to set up deep things for your mobile app uh most of this information is based on information you can easily find on the internet so you don't have to meticulously take notes and just listen you can search that on your own i will start with react native or javascript part of your code base so in react native uh when the app is running links are sent to react native in form of events and you can subscribe to them using linking.even listener message and you are subscribing to url events and with the callback you can handle the events so given the url you can navigate the user to your to exact screen you wanted to and perform some side effects as well when the app is not running yeah you can take advantage of linking dot get initial url methods it returns a link that was used to launch the application uh that would be for react native in order to get the links flowing in your your native part of the code base you first have to set up uh the native part of it so starting with android uh i'll first give you a note on a little bit how it works on android uh so when you click a link on android and intel is created something called an intent it's a specific special kind of an event uh and you can subscribe to that intent by specifying an intent filter uh you can register intent filters in an activity or something called broadcast receiver and activity as android documentation described it is a single focused thing a user can do and is it it is one of the main building blocks on android uh like react native apps ones you create with rn in it and don't alter them uh largely usually have one activity which is main activity so knowing that uh in order to subscribe for these links uh we have to create an intent filter for these links it can be set up in android manifest file in your android part of the code base you can place it in a blog with activity declaration if you have more activities you create more intent filters so example internet filter code will look like below the important part is the data part in the data tag you specify what kind of deep link you want to listen to in our example we wanted to open software mentioned academic on slash prefix tiplings for that you specify the scheme uh if you have more activities and more more intent filters you might want to have specific deep links open in specific activities so you can go further and filter just for the webinar's deep link like shown in the example next step that i advise and i think it is important is changing the launch mode what it will do it will prevent reloading drag native states and make sure that you have single instance of your app running what you have to do to change the launch mode you have to change add one property to your activity declaration and it is android called launch mode and you want to choose single task behavior in order to support uplinks in androids you have to set up another intent filter and that instant filter has to be out of verify flag this flag gets rid of a prompt to open in a web browser or your application so that it leads directly to your app instead of letting the user to choose uh the synthetic filter will look like this uh there is the outer verify flag and i highly encourage you to provide all the data tax for all the paths that you want to support and be declarative and open about it so specify only those that you want to support like bound with this out of verify flag is the requirement to host an asset links.json file and you have to host it until that well known slash asset links that jsonpath on your domain uh what it does it actually verifies that you are the owner of the domain or at least you were given permission to open your app when users click on the links registered for the domain uh this file is downloaded on install and other updates so you can alter it uh the user won't have it changed until after the install or update the app and the file looks as below mainly it has a package name so your application identifier and certificate fingerprints that the app was signed with so if someone else has the code for your app but don't have the certificate which you you should protect at all cost the link won't open immediately for them anyway uh so apart from androids i would like to explain a bit on ios setup it might be more steps but they require a little bit less specialized knowledge and it is much more clicking in xcode than actually coding so the first step is registering the url scheme in xcode for that you have to come up with an identifier apple advises reverse dns string so basically something like your app identifier uh in my example i said com com that software mentioned that academy and apart from identifier you have to have url scheme uh so this is that url prefix that you want the links to start with so for example software mention or swm academy like in the examples before apart from this url scheme you have to make sure that you have react linking library in your portfolio by default if you initialize projects after big native 0.60 it should be there but just double make sure you may have an older project uh just to prevent any native errors if it wasn't there perform pod install after you add it so that it is linked with your ios project so next step is a little bit of coding you have to add some code so that the urls passed are sent to the react native in form of events or initial url so you have to open up delegate file the implementation.m file not the header file and at the top you have to import linking manager and you have to override the methods uh it's a method with descriptor open url options xcode will propose it to override it and create the descriptor for you then you have just to provide the body of that method and in the body you want to return the angling react linking manager call this is very similar in the descriptor as the method you are just overriding and you have more services than just the real linking manager so you have some additional services that might might consume your urls uh you want to that in order so you want to open it only in the first one and then the later ones don't receive that url and are not triggered at all so we don't call them uh if the first one uh returns false uh so that it can handle the deep link you are passing that link to another call so you can have some arbitrary service and if it fails you call reg linking manager if you want to support universal links uh it requires additional project setup first of all make sure your application's app id is registered on apple developer portal next you enable associated domains entitlement in your xcode after that head over to the associated domains section in your export project and add your domain that you own with uplinks column prefix it looks like in this screenshot uh there are a few uh domains declared there uh in connection to that what you have to do to verify that you own the domain you have to host an app a file on your domain that's similar to the one we had to do on android it's called apple upside association and it holds it under that well known slash apple upside association domain uh it's an abbreviation of aasa like in the title here uh the short for is used mostly in the community so remember that and what it does is specifies which paths are possible to open in specific app that is permitted to open that domain and this file is fetched on app install and updates so you can't change what paths are accessible in between installs so when you change something you should provide some update for your users uh so they can reinstall the app to have the new asa fetched and branch io has a tool for asa validation if you are not sure if you are doing it okay and it is right like it should be structured you can head over there and check if it is everything is as it should be and on the screenshot on the right this is probably taken from wwdc up apple made actually you can get more examples of ais a files but going to some big companies domains on the path that i just mentioned so well-known apple upside association uh probably companies like twitter will also host their as either apart from asa you have to override another method it's called continue user activity and it's very similar to open url method that we just implemented and similarly like before with more services first come first served you have to make a fall through so first the service then something else and lastly even something else so you have backups for the handlers it looks like in the screenshot xcode will again suggest you how to override it and you return the call or return a boolean value actually apple advises you to use um universal links over url scheme prefix links uh they are advised i'm not sure if they deprecated you like url prefix your skin prefix links but they advise to use universal links and i think this is fair because they are much safer they require you to actually own the domain or be permitted to use the domain okay now i would like to tell you a bit how to handle deep links in your react native code base uh so let's first state the problem uh you got the link into your application and what you have to do with it is perform some navigation and optionally some side effects and in the middle what you have to do to go from the link to some action uh you have to first parse the link to get an idea of what data is behind it and after you know that you have to pattern match it to match the action or and side effects bundle bundled with it that fit this specific data that was sent and i would like to show you a solution that i came up with to solve the above problem and it will be a very simplified example but i used analogous solution or a production for one of our clients and i think it's working pretty well it might not be perfect but it is worth considering it might not fit your use case but consider that one there is more to it than i i will just show you but remember that is just an idea so first i try to clean urls uh you have universal and uri prefix links and you want to make them look and basically be the same so what i usually do is i drop the uri prefix first or just the protocol prefix and domain name and they both look the same like in the example we have webinars and question marks and query parameters in both cases what i do next is the matching usually i can match by the path and drop the query parameters so i choose just the webinars and then i can show it at big switch true statement where i have several cases and my match based on this path like webinars optionally i sometimes also also pattern much on whether it has query parameters or buff parameters at all and lastly when i know where the user wants to go or more or less what the action should be i parse the query parameters i use queue as library for parsing query strings and i parse if there are path parameters i usually parse them manually uh so to give you an example of how that might look like in the code uh you would have some handle url function that takes a string as a parameter a url so first i clean the url dropping that prefix then there's a switch to statement which matches something like if this is the webinars link i check if this starts with webinars if that's the case i check for query parameters and when i have them i usually throw them into the navigate function which for in the index example navigates to webinar screen and i also add to them some default parameters that i want to pass for that you can have a default case so when the link that was passed into the app doesn't fit anything you can fall back to something else and i can't uh cannot forget to mention that there are already solutions you don't have you don't have to implement anything custom for example react navigation has one and how it works is you bind screens with paths so when you declare screens you automatically at the same time assign a path that you want the screen to be opened with it supports path and query parameters that are automatically parsed uh into screen parameters uh i think it is limited when it comes to conditional navigation so for example when you get the link you are immediately navigated somewhere and from there you have to be redirect from the screen after you are navigated to it uh with my solution you can decide before so you end up only in the screen without any redirects the screen you want it to open but react navigation definitely shines when you used on the web so when you use your application and host it on the web as well using great native web for example probably this is the better solution after you have the things implemented it is wise to test them there are a few ways to do that like first one is you can test the manual in cli for android you can open links with uh adb2 and the commands is pretty long you can find it on the internet and it works for simulator or android emulator as well as the device if you have it connected through wifi remotely or through usb cable on ios you can use simctl tool and it works only in the simulator it is a tool for controlling sim uh ios simulator uh you can test manually on device and i have a pattern for that i think this was working really well so you have an html file with list of deep links in your code base it is stored in your repository like i did one you can serve that file locally with any simple http server package from npm and all of your team has access to all the links it can be updated regularly by different team members and qa team can also serve it or you can serve it constantly like from your master branch so everyone can test the diplins in your local network for example uh you can also have them in your roles up as well if you are just a single person working on the app you probably don't have to have them in an html file you can host them in your notes app as well this this will actually uh the result is the same uh to give you an example how much it might look like uh you would have like hd http server package in your dev dependencies uh you can add a script npm script like serve deep links and you do http server and the path that you have your index.html file uh placed and the index.html file with the deep links might look like below so you have only the unordered list uh with list items of some uncontacts with deep links and you can also provide the description so that they don't have to be row just the link and nothing else uh you can run that uh on your local network so you can take your device uh go to the address like one nine two one six eight one one four three column eighty port and the ip address might be different for you it depends how your network is configured but it is live on the same wi-fi wi-fi as your laptop or computer anything you host it on another thing is you can unit test deep links uh for that you have to strive to make the deep linking navigation logic uh easy to test so make it separate and easy to take out of the rest uh less dependencies uh you can write test cases that expect what should happen after the link is passed uh you can check if links are parsed correctly so query parameters and path parameters returned are the correct ones that you anticipated if your handling function has some external dependencies like some contacts whether the user is logged in or not make them easy to mock try to do it as easy to mock in the testing so that you can check different configurations all right so i mentioned something about additional services i would like to cover it now so what you might encounter in our day-to-day work uh is something called mobile measurement platforms uh mmp i stumbled upon this term on the internet and examples of such services is services like branchio alps flyer adjust cochava firebase dynamic links and probably there are much more uh what this services are about is mostly analytics they can track your installs clicks on specific links that you post for example on social media they provide you with attribution functionality so that you know where the user came from for example if the user converted from a facebook ad or a google app or a twitter post and things like this and they provide some custom deep linking solutions or deep linking extensions and what it provides is it can make your users user that don't have the app installed landed on the app store page with your app to be installed and after the user installs the app they provide a feature called deferred deep linking so after the user installs the application uh after you do some kind of onboarding the app launches and stuff like that user registers you can lend the user to the place and you can run the deep link the user clicked so after installing they are landed for example in the webinars deep linking webinar page like today's one just as the in the example that we discussed earlier and what they also provide is link unification so you have something like a shortened link that serves all the platforms not only the mobile ones probably the web and also desktops if that's applicable so going back to universal or uplinks it worked like user clicks the link has the app installed yes uh open deep view in your app if user don't have the app installed you open the web page to their respective sub page with this extended links when the user clicks the link and user has the app installed it works just as it worked with other deep links that we today discussed and if user don't have the app installed it will prompt the user to install it from the app store and later once again ask whether the user has the app installed if yes you will open a db in your app just like if the user had the app installed and if now it will fall back to just a web page i won't tell you how to integrate each and every service because they differ usually very largely the difference are the differences between them are big but i can give you some integration tips uh [Music] i integrated at least two or three services like that and i can tell you that you should be mindful when doing that uh like don't do anything uh without thinking about it uh i advise you to read the docs thoroughly uh follow what they say to not miss anything because if you do that you might find yourself with a bug that that's really really really hard to debug uh i encourage you to understand the code when you are copying and pasting one uh pasting it even the native one uh so when you copy and paste some objective c method call try to read it and try to get the essence of what it does so that in the future when something fails you probably will know where to search for it apart from that check integrations with external services like with email configurations there's something called email service provider so a service that sends email campaigns to your users uh just check whether all the dependencies all the configuration apart from your mobile app is the right is right because the problem might not be with your app itself uh if nothing works try reintegrating the service uh sometimes it helps to just start with a clean sheet and break everything to the ground and build it from ground up and a bummer notice to you some services don't have react native sdk so if you have any influence over which service you use just make sure that the react native sdk exists and if it exists if you have possibility to do that just try to check if they their sdk is uh have some quality in it so that it is not a very bad integration with react native uh so like i mentioned before and there's a security note uh actually there's a security page on facebook docs probably starting with regulated 0.63 some of this or most of this information is also covered there i encourage you to go there and check not only the deep things part but first of all i want to tell you that url schemes have no global registration authority uh so basically you can create an app and with this app you can listen to any url scheme which in fact means that other apps can also hijack your uri scheme so they can create an app so that uh when you have your campaign and you have your deep links when the user clicks these deep links and have this malicious app installed uh it can open in other app so do not pass any sensitive user data for deep links because others can basically steal it and we don't want to do that be careful which links you allow also the same thing [Music] other apps can open the deep links that you created and be mindful how you parse deep links i think there is some kind of an injection vulnerability uh you might use some regular expressions or different things so be careful with that and try to limit and narrow down what you allow to be sent to your application and thank you for your attendance and for listening and right now i will be open to your questions if you have any okay hello uh jasmine asked the limitation with react navigation uh so i think the limitation with rug navigation is at least this is the reason why i propose my solution and why i had to come up with it is i think at least in react navigation version three uh when i was using it like a year ago uh it was not possible to first of all have two two same like for one screen to specify two different paths and i wanted to have that functionality and also have a way to decide before navigating to specific screen i wanted to decide given the link where the user goes depending whether the user is authenticated or not authenticated for example so i wanted to immediately open login screen for users that are not logged in in the application uh oh they are sorted by votes okay let's choose something else okay i'm not sure if we see this but i just started answering uh i can share the deck that's not an issue i can share this so that's a no-brainer so with twitter.com links i think you can't write an app that will open twitter.com links with the verification we did that well known links in order to host something on a domain you actually have to own it in order to change the asa hosted by twitter uh you would have to probably contact twitter and allow them uh make them uh persuade them that you should be allowed to open twitter.com so with universal links at least on ios this is a limitation you can't open uh a universal link for a domain that's not yours i think on android you can do something like this and it will ask you whether to open in twitter or to open in different app or open in web page but i'm not sure maybe if you verify the that you own the uh on the domain so that it will open only in twitter and won't allow anyone else to open the app but i'm not sure what will happen if you install only the fake twitter app and not others uh yeah so if you want to open to google play store or app store uh i think i was implementing something like this uh and i think there are deep links for that there you can search it on stack overflow uh so yeah you can probably redirect them here i'm not sure i can't remember what the uri scheme is for that uh but it was somewhere public you have to just copy and paste some id or path where your app is on app store and it works like that and you can prompt users to update your app okay this one is good and has some votes um is it possible to do the firm deep linking without making use of firebase dynamic links or branch io in particular attributing a sign up to a link that was clicked eg to grant another user a reward if the link they shared led to an install i'm not actually sure about that one uh probably you would have to implement your own service like this is always possible if there are companies doing that you can also do it yourself uh but you can also somehow take advantage of query parameters if that's not something that's secret uh you can probably pass it here and maybe handle it in your application plus store it somewhere on your back end i'm not sure if that answers your question but i'm happy to discuss it with you just message me on twitter okay i'm not sure if this was answered can you repeat one more time what is the reason why you should not use react navigation limitation i really hate long switch something like this so i think i already discussed that but basically you have the ability to decide first and lick next in order instead of linking first and then redirecting the user for this one i'm not sure i haven't used regular navigation version 4. i use real navigation version 4 after free i only updated the 4 so i don't know but probably you can ask somewhere on stack overflow i highly encourage you to do so i know the maintainers are making a great effort to support the community okay uh if i try to share a deep link from my app to telegram mail and so on i see something like my app blog but my app is not clickable because it is not recognized as http link uh depends on platform but i was testing something like this uh make sure that you have it registered uh but other than that it also depends uh by where you post these deep links i think so if telegram doesn't support custom prefixed uri steam deep links then you are doomed you can't open them but remember you can take advantage of universal or uplinks so if you have a web page and an application and a mobile app for that just use them they will be highlighted and if you have the app installed it will open straight in your application uh i'm not sure what i will bust tools for programming in exporting native you always have to consider different solutions based on the problem you are facing let's say i have a key version of my app and a production version each with their own app id is it possible visible to have a different deep links for the different app ids but on android i'm sure that is possible you can have different uri prefix and how you do that is with android flavors i guess you can have different android manifest overrides for different application scheme or application flavor so you have qa app you can use steady app call like uh you can have software mention academy qa or software mentioned academy uh release or something like this okay so that's interesting as i said uh segmented upswire in the past uh have you integrated it if so did you go with the sdk provided by appslier or the device mode destination package that segment offers oh yeah there is something like an integration for a flyer with segments uh i can't remember how we went around that and which one we used i remember i had some issues with either but can't remember what i went with like as before you can hit me in the dm maybe i will remember that or check it somewhere we can discuss this okay so i think it is not possible because deep links are not working like http requests uh you are just clicking a link and you are not saying sending a request anywhere uh at least how i understand it so the limitation is your query parameters i think so it basically is just like you would uh you don't have the post functionality but you already have the get functionality here right like you get the analogy okay so why would a dipling register based on if an android app is killed or backgrounded uh i'm not sure if i don't think that's the case first of all maybe i will try to once again explain something maybe you got confused by the part with react native uh so with a deep link you can launch the app if it is killed and you can also wake it when it is backgrounded so i think when it is backgrounded you would usually use the even listener in react native and when it is killed uh the even listener didn't get a chance to be registered so react native provides a way to go around that and provides a functionality to just see which deep link was used to launch your application i hope that answers your question ah yeah so i'm not sure if that's i understand uh the question here bar are foregrounded push notifications with deep linking handling differently to background notifications uh i think when you click a push notification then the app is killed or backgrounded when the app is scaled it will just like if you clicked the deep link so it opens and you can get initial url bound with it when it's backgrounded maybe the same way but probably you will receive the events if rear native instance was already running and even listener was registered but i would have to check i'm not sure i hope that at least this answer gives you a light in the tunnel to go further and search the answer okay [Applause] why would a dipling register based on even notification is expanded collapsed i don't think that is the case that deep links register based if it's expanded or collapsed i'm not sure what's uh actually expanded and collect notification uh if you can clarify that that would be helpful uh but i think you can have this notification laying for a month and if you click it the deep thing is still here uh if the amp is killed like i said it will open and you can get the initial url used to launch the app or if the app is running you can click and you will get an event so you can continuously receive different events okay i think that's a good one i think i messed it up a little bit in the presentation uh so i mentioned additional services for example branch i own uh or probably so you can have a few calls to different libraries so you can have branch io apps fire if you have some backup in like branchio and upside there's a backup and you can react linking right so different libraries work differently i'm not sure if branch io swallows all the links or not something that you would have to check with them or with their docs i'm not sure how it works with apps layer but usually how it works if branch io swallows the link and returns true or returns yes in objective c uh you you have to assume that this deep link was already handled so you should have an if statement whether this branch io call succeeded and uh or if statement if it failed and call others uh if the previous call fails so you call one and if it fails you have a backup plan in form of appsplayer for example if apps player face to recognize the link or don't take it returns uh no or false boolean then you go for your last chance and try to call react linking uh if it succeeds great uh you can return your function if it doesn't succeed you basically return no uh in this open url function at least that's how i understand it and i think this is the same with facebook sdk uh to open links and i think branch io has that in their box so this is there's an if statement and in this if statement there is a call to branch io sdk and basically then if that fails you go to call the facebook sdk yeah yeah there is something i see someone posted it yeah i think this is something like this hope that answers it all right if you have some more questions uh we are running a bit out of time but you can post it i can answer like two or three questions and just to answer i've seen people asking will this be recorded yes it will be recorded and as paulina mentioned in the chat i will be uploaded to our website but probably there will be delay so you would have to wait a little bit to give us time so that it probably renders i don't know if this platform or someone has to produce it and then it will be uploaded all right i see no new questions uh so i think we can conclude here uh i was really happy to uh have you listening to me speaking about deep thinking uh i'm i'm happy if it answers some of your questions or made you curious curious about it and thank you thank you for your attendance in this webinar and just as in the chat you can always hit us up at software mentions uh twitter account or my twitter account so yeah you can follow up with some questions i will be watching you and if you act me at twitter uh i will try to answer i want to get a chance uh thank you have a good rest of the day or good night depending on your time zone and bye see you on the next webinar maybe not me but someone else
Info
Channel: Software Mansion
Views: 9,007
Rating: undefined out of 5
Keywords:
Id: v1j5gi0SMbM
Channel Id: undefined
Length: 57min 7sec (3427 seconds)
Published: Wed Oct 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.