Open app from gmail with my url scheme as a link - ios

I declared a url scheme in my ios app, myapp so that my app will be able to open from another apps like sms and gmail.
For sms app, this works fine. SMS detects myapp:// and shows it as a link. On clicking, it opens my app. But this fails for gmail. When I receive an email with the same url in gmail app. It fails to detect it as a link, which results to unable to open my app.
How can I achieve deep linking my app with gmail as well?
Thank you in advance.

In case of a url scheme the third party app like Gmail would also have to add support for your url scheme. Maybe Universal Links can work in your case? https://developer.apple.com/ios/universal-links/

Related

Problem on Universal link with mail app and gmail app

I've configured a universal via branch.io.
My link seems to be working when presented as https://example.com in a mail or gmail.
However, this doesn't look good and people don't tend to click on plain old links. We're using hypertext reference tags and Button tags to make it bit friendly.
It looks something like this:
Go to App
Problem now we've is that this Go to App link/button doesn't work in native mail or gmail app. Instead of taking us to our app, mail app tries to open this link <a href> in safari. It then takes us to our app's App Store page.
Peculiar thing is If I open gmail in safari to start with and open the link from there then safari seems to understand that this is universal link and it segues into my app.
In summary:
1.Safari can open any link including hypertext reference or button tag
2.Both Mail and gmail app don't support hypertext reference nor button tag but plain old link https://example.com is fine in both the app
Has anybody gone through similar situation ? Appreciate any sort of help.
There are a lot of limitation when you hyperlink a universal link. I would recommend you to use Branch Universal email which allows you a seamless email to app integration. Please see:
https://branch.io/universal-email/
https://docs.branch.io/emails/universal-email
In case you still have any other doubt, reach out to support#branch.io

Google Analytics for Email Tracking when using Universal Links on iOS

I would like to track button clicks in emails using Google Analytics. Let's say I would like the button to have a Universal Link, which when clicked, will open an iOS app directly with no browser redirect. (https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html)
However, if my URL is a Universal Link, i.e. www.xyzxyz.com/openApp?campaign=promo&source=email, and an email recipient clicks the link from their iPhone with the installed app, no call is made to the server, and therefore the click is not tracked.
Has anyone experienced a way of tracking Universal Link clicks?
Universal Links are handled on the frontend by the device without ever interacting with a server if the app is installed. The AASA file is stored on the device at install and allows the device to check whether the link can open the app before passing the link onto safari. If the app is not installed and the link is passed onto Safari then the Google analytics tags will be processed. The only way to accomplish this is to send the GA request from the app if you register that a Universal Link was clicked.
I recommend looking into a deep linking service like Branch. They have a Google analytics data integration that will handle all of this tracking for you.

Firebase Dynamic Links IOS

I have setup firebase for receiving universal links and custom url schemes. I have 2 issues here,
Clicking links on the app like whatsapp opens the browser but not the
app, however, if I get the link to the notes app and open it, it
shows an option of "open in app" after doing this, everytime I open
it in whatsApp it seems to work fine.
When I try to open links via chrome from the email app, it redirects
to the app via custom url scheme, however the problem is that, the
next time I open the app, it tends to repeat the action. Although I
have already handled the custom url scheme previously, I dont know
why its trying to do it again, kinda freaks me away.

How do I create a custom url scheme that will be recognized as a link?

My url scheme looks like "foo://".
This works great when I type into the browser.
The application requires I send this link in an e-mail and the e-mail opens from there. How can I configure the url scheme to be recognized as a link? I tried doing http://foo:// but of course my browser caught that.
One solution is to ping my server http://foo.com/redirect_to_app. If there is a way to do this with the app only I would like to know.
If you put the URL as foo:// in the email body, then that is all you need to do. Of course it requires that the user reads the email using the Mail app on their iOS device and the user must have your app installed on their iOS device as well.
Your foo:// URL will mean nothing if the email is read on a non-iOS device or computer or if the user doesn't have your app installed.
This all assumes that your goal is for one user of your app to send an email to another user of your app and tapping on the link in the email will launch your app on the receiver's iOS device.
There is a way. You need to create a webpage and create redirect code(url scheme) to your app.
Check this out... Check if URL scheme is supported in javascript

Launching app from sms link or email link

I have the requirement to launch an app when an sms or email link is followed. I have already been reading about URL schemes and already test that and it works, but the problem is that if the app is not installed on the device nothing will happen. I need a way to open a web url if the app is not installed, but I couldn't find a way of doing this...
Any idea?
Thanks
It can be done.
The way I would structure it is by having a redirect from a server you control.
You send the user a link that points to your server.
You try to launch your app using the custom URL scheme.
If it fails, you redirect the user to the app store so they can download your app.
Here is an interesting question with several ways to check if the launch attempted via your custom URL was successful.
I would insert a link to the website in SMS body.
Then I would write a script on the website which will either open a download link or open the app
This answer will solve your problem

Resources