Open iOS app from a Safari without "Open in <app>" prompt - javascript

I'm trying to open the app from an HTML page. It's working well, but I need the app to open without asking the permission from the user.
Currently, Safari will ask the user that "Open this page in myapp". I don't want this message box.
How I can remove this message from Safari? I'm using an URI scheme to open the app. It looks something like myApp://domain.

You can't avoid the dialog you mentioned while using Custom URL schemes. This is iOS feature.
Instead you can use Universal Links to open your iOS App without additional dialog. You need to have control over iOS App to make this happens.
To simplify Universal Links setup, you can use one of the companies that can setup most of it for you. I am working in Firebase/Google https://firebase.google.com/docs/dynamic-links/ . Other answer mentioned company that will do this for you as well.

Try branch.io? It works with Android and iOS.

Related

How to close webview all together in React JS

I am making a website in React JS.The website will work like a webview as it will be attached to android/IOS application.
In the website i have a cross button.
On that button press i want to trigger native bridge event which will close whole webview all together.
Let me know how can i achieve same.
Thanks in advance.
Mhmm, android and iOS are creating a special object on window when loading a website in a webview.. in Android it is called window.android, in iOS it's window.webkit and a special userAgent agent which matches like
navigator.userAgent.match("CriOS") === null // detects chrome on iOS
In Android, it is possible to create "callbacks" on this android object which can be called from the websites ReactJS code like:
window.android?.share(content)
In iOS, you can go with messageHandlers and it will look something like this:
window.webkit?.messageHandlers?.showSharing?.postMessage(url)
I cannot show you the native App code for these two examples as i'm the Frontend-Developer in our company and not the App-Developer ^^
But, i would assume that's the way to achieve this. You need a way to call a method directly in your native app code to have the ability to actually close the webview - the website itself cannot achieve this.

How to add web app to user home screen?

As the title says, I would like to show a small popup containing a button at the end of my web site to hint users to add my website to their phone's home screen. I found a tutorial here: https://codelabs.developers.google.com/codelabs/add-to-home-screen/#0, which solved my issue on Android but this way just works just only on Android and https method. I would prefer that this popup must work on Android, iOS, http and https. Would anyone here know how to solve this? Thank you very much for your help.
For Android, the Add To Home Screen prompt requires HTTPS (or localhost), so it's not possible to do it on HTTP.
For Safari on iOS, you can configure the home screen icon & launch appearance with meta tags, but a prompt system is not currently available, so users will need to add the app manually.

Detect whether ios, android or desktop to launch different links?

I m trying to make my website social icon, refer to a link (when clicked) based on the platform being used on. like the following:
if The website is opened on ios phone, ipad... to launch a specific deep link.
if The website is opened on android phone ... to launch a specific deep link.
if The website is opened on desktop pc ... to launch a specific link.
Thank you!
You can use HTTP Header.
See: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
Through the User-Agent field you can get the browser version etc. Other header could be interesting for you, too.

Sencha touch, open weblinks in a new browser window

How can I make all the weblinks in my Sencha touch project open in a new browser window? The problem is that each time someone taps on a link, they are opened in the same embedded browser in which the app is running and there is no way to go back to the app.
For example, if I have a support page hyperlinked via tag in a label, let's say
<a href="support.com>Help me!</a>
When the user taps on Help me, the support page opens in the app itself and there is no way to go back to the app!
EDIT:- I am testing with android device
Try something like
support.com
I think you should have the InAppbrowser cordova/phonegap plugin installed to get it working on this way.

How does google show this special iOS advert?

Hi all sorry if this is repost. I really searched but can't find anything on it.
I always see this special ad when I use google services on my iphone or ipad. This little window animates out looking like a chat box. I can detect iOS device using user agent but how do I make the advert appear like google does? Specifically, try to open google maps.
I would like to use a window like this when users use iOS device to access my website. It is the most elegant way to tell iOS user about your app while not annoying them with some roadblock each time you try to access with iOS device.
Here is an image of what I'm talking about:
You can use this Javascript: http://cubiq.org/add-to-home-screen
I don't know whether this is your expectation, When your page has access from any iOS device, you wanted to bring up that dialog in webpage Right?..If That is the case then just retrieve the os info and make check there and do your presentation as you want.

Categories

Resources