Is it possible to have an iOS webapp call another regular app to open? Works with Mobile Safari. - ipad

I am working with my web developers that are stuck on a problem with a Web-app we are creating.
The webapp works great, you add the website to your home screen on the ipad, open it and use the website within the webapp interface outside of safari.
The issue is that we have one function that doesnt work, where when clicking a URL link within mobile safari, it calls an external app (Optiscan- a qr code reader), and then when scanning the code, then returns you to Mobile safari.
The question is - is there a way to call a URL that will open an external app, from within a webapp? Similar to how it would work from mobile safari?
If so - i am then wondering if an app can be written that calls the webapp to open. For example if i needed the QR code reader to then re-open the web app and pass it the QR code.
-Dana

In iOS, native Apps can define Custom URL Schemes. If you know the scheme of an App, you can simply open it by clicking on a link like Launch Facebook App. This should launch the Facebook App for iOS if installed.
There was a crowd-sourced list of known URL schemes on akosma.com but they seem to have some problems and the list is not available as of writing this. If the URL scheme of the App you need to open is not public, try contacting the developer and ask for it. I'm sure if you ask kindly, he will help you ;-)
Edit: Almost forgot to say, opening Apps like this won't return to your Web-App magically. That's something the developer of said App would have to implement.
Edit 2: I found another website that has many custom URL schemes in it's database: http://handleopenurl.com. It does not have a URL scheme for Optiscan but for other QR Readers, maybe this will help you.

Related

Installing iOS App Directly From Safari Web UI?

I was using a website, and noticed that from my iphone on Safari, I could directly install their app from the Web UI. This was from the top of the page at https://flytap.com/ . I can't find what this is called or how to do it anywhere in the iOS documentation. This only seems to work in Safari.
Does anyone know what they are doing, or how I can do it?
This is done via adding Universal Link support (documentation here).
The banner you are seeing is the Universal Link smart banner (documentation here).
In-short, you should have a website, the website should be SSL enabled, you need to add an apple-app-site-association-file which defines the links your app needs to handle, make changes in your app to handle Universal Links and you should be good to go.
The app you shared has its apple-app-site-association file here. You can view this file for any app that supports Universal Links using the pattern https://<SITE_BASE_URL>/.well-known/apple-app-site-association or https://<SITE_BASE_URL>/apple-app-site-association.

when my app is not intalled, iOS universal link in UIWebView will launch Safari?

From Apple's guide in Support Universal Links:
When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari.
But i'm confused that if my app is not installed,and I tap a universal link of my app in another app's UIWebView,will the system launch Safari app to load my website,or still load it in the UIWebView?
I test some app's universal links when the app is not installed,and they never launch Safari to load the next page ,they still load it in the UIWebView.
I want to konw if it's possible to launch Safari,but not stay in UIWebView.Do I need any configuration in apple-app-site-association file?
Actually I want to trace where my app was installed from by using cookie.I can store a cookie in Safari with informations of the download page,and get the cookie with SFSafariViewController when my app is installed and opened,and present different views according to the cookie.
What you are trying to build is called 'deferred deep linking'. This (plus a lot more) is exactly what we provide at Branch.io. If you want to avoid the headache of configuring it all yourself, give this a look. Apps like Pinterest, Airbnb, and Tinder all use us for this reason.
Apple's documentation is referring to the default behavior with the standalone Safari browser. Handling links inside an app with UIWebView supersedes this, and there is no way to automatically bounce out of the origin app into the main Safari app.
The workaround is to store data on your own backend. As you've discovered, relying on a cookie pass-through on the device itself won't work in many cases.

Facebook App Links don't open my app

I have added my URL scheme to my .plist.
I have manually tested the scheme in Safari and confirmed that it launches my app just fine.
I have generated a hosted app links link that uses the scheme.
Nothing except my own URL was entered when creating the hosted app link.
When I tap the link on my phone (with my app installed) it takes me to a page with the text You have reached an implementation detail. It's pretty obvious that Facebook didn't even try to use the URL that I had provided when creating this hosted app link.
I should add that I have successfully created other hosted app links moments before that managed to redirect to webpages and to appstore, so there's nothing wrong with mobile Safari.
Where to go from here?
Edit: My app is, of course, in development.
I was having the same issue until i updated my app settings in the facebook developer site.
In the image for #1 you enter the prefix (even though it says suffix...) for your url scheme (ex: if you use myapp://testing/here, then enter "myapp" into the field)
make sure #2 is flipped to yes
Facebook iOS Settings
This is an old thread, but after spending some time on this I realized that the https://fb.me/... links only open from within the Facebook app on the device. They will not (and are not intended) to open from a web browser. After posting the link in a Facebook group I was able to successfully open my app with it.

Kiosk App in iOS can we provide any identifer to that app to use from URL scheme.

I wanted, to give some identifier to the app that we create like a kiosk mode in iOS.
i.e. We make add to home screen and it has an icon on home page which browse further.
Is there any way, where I can give some identifier Name to that link of app getting created so that we can get that app access from our Native and we can provide URL Scheme for the same.
Thanks.
iOS will not give access of all the url schemas. You can refer this document where the url schemas for selected application is given :
http://wiki.akosma.com/IPhone_URL_Schemes#Phone
It may be that the only way you can achieve what you want to do is to build an app around an iOS UIWebView. You can then include the camera functionality directly in the app, although there can be issues as a UIWebview doesn't handle things like popups that Safari does.

How do Apple detect if an iphone app is installed when clicking on a pure html link?

I am trying to detect if my ipad app is installed on a device when visiting my website, in order to suggest different action to the visitor.
Thanks to this post :
https://stackoverflow.com/a/8310348/1128754
I found that the "store" application on iphone seems to have achieve to detect if the app is installed on the device. When you click on store links, it launch the app instead of going to the mobile web version.
For example, if you go to :
http://store.apple.com/xc/anythinghere
with an iphone on which apple store app is installed ( http://itunes.apple.com/app/id375380948 )
it automatically start the store app, instead of the web page.
I tried to follow the stack call with mitmproxy but safari doesn't seems to ask query before launching the app.
So, I guess they did custom url scheme recognition, with http:// links.
Do you think it is possible?
This is done with URL protocol handlers:
http://www.iphonedevfaq.com/index.php?title=URL_schemes#URL_Protocol_Handlers
You cannot detect if an app is installed from HTML, but you can launch an app. For example, the popular game "Doodle Jump" can be launched by going to doodlejump://, but if you don't have it installed, the link won't work. As mentioned, this is done with a custom URL scheme and needs to be coded into your app.

Resources