I'm not an iOS developer, and know little less about Safari's configuration by apple.
But Please, hear me out.
I have universal links configured, and I understand that if the App is installed, visiting the website with Safari browser will automatically show a phantom banner to open the page in the app. This seems one of the policies apple included in their Universal Link settings.
Image below shows an example of the Phantom banner
My question is: How can I detect the presence of this Apple's Phantom banner through JavaScript?
To be precise, currently, there is no way to detect the Phantom banner if the universal link is enabled in safari.
You cannot remove it through JS also it has no presence in the DOM.
Try integrating a 3rd party plugin like Firebase or Branch.
I tried firebase hoping it can resolve the issue and below is a summary.
It will create a dynamic link to your webpage which is nothing but a wrapper on your deep link.
But with that you will lose the ability to click on your webpage link and open the App, instead, you will have to use the dynamic link to open the App.
The Dynamic link can be on your domain or on a custom domain.
Here is some more information on domain configuration
https://firebase.google.com/docs/dynamic-links/custom-domains
In my case, the ask was to link directly to the website link so this did not help much. But if the ask is to open the App on a link click then it can help as the Apple App Association file will not be on your domain and you will not see the phantom banner.
Related
I'm building a shopping web site which should redirect the user to a spesific application in his device when he click 'submit'.
I'm developing this site with Java Script.
the requirements are:
1) if he uses the site from a computer-the application should not be open.
2) if he uses the site from a device which the application is already installed in- it should be open,
else-playstore ao itunes should be opened in the applicarion page.
now, my problem is with #2- I dont know how to redirect the user to a specific application in his device and automaticly open it.
I dont know the application URL or any API of it.
Is it possible? how?
You could do this using universal links. Here is the link to the documentation provided by Apple themself. There is even an entire video related to this topic on their website, here's the link. I think these documentations are more than enough for even a beginner to adopt a universal link.
So, when I went to https://chromestatus.com/features I noticed in the url bar app it said install app. When I clicked it it install a chrome web app with the website in it. How would I be able to implement this in my website?
I tried going through the source code of the website and didn't find anything useful.
When you hover over it says install. It is the button right next to the bookmark. I don't know if this is an experimental feature since I'm on chrome canary. But I still want to implement it into my website. Is it possible to do it with java script?
I believe it is a Progressive Web App and Chrome is testing the plus button UI for the add to homescreen behaviour.
To do this for your website you'd need a web app manifest and a service worker. See here for more info.
I need to check if app is installed on iPhone or android device, using javascript code only. As i am working on html website.
I have used
window.location="appname://";
but it makes me to open an app.
Thanks in advance.
As stated in the comments there are security and privacy reasons surrounding why you are not able to do what you are asking.
However, #CommonsWare, has already given a workaround to this problem, in a similar question, that has already been asked:
Fortunately, this is not possible, for obvious privacy reasons.
The closest that you can do is in the application, have an activity
that has an for some URL structure, and have a link in
the mobile Web site to a matching URL.
If the user clicks the link and the app is installed, the activity
will be a chooser option for the user.
If the user clicks the link and the app is not installed, or they
choose to stick with their Web browser from the chooser, whatever Web
page exists at that URL will be displayed (E.g., instructions of how
to download the app).
I am making a standalone webapp for a client, and he would be able to access to another website sometimes. So I made a link which open a tab in Safari (quit fullscreen) but then I wish I could return to the standalone app either by a link or by the address bar (without homescreen button which is locked).
Is there any way to make a link that go to a standalone web ? Or using javascript to open in fullscreen app ?
I hope Iwas clear enough, not easy to explain ^^
You can register a custom url scheme that links to your app. Basically, in your app .plist you register a scheme like "myapp", and any link that uses de protocol myapp://xxx would launch your app and pass whatever you add after the // ("xxx" in the previous example).
It's exactly like "mailto:" links, but opening your app instead of the Mail app :)
You can check how to configure your app in XCode looking at this answer: https://stackoverflow.com/a/12784399/201059
As you don't specify what platform you are using for packaging your WebApp, I can't give you further info, but if you were using Cordova/Phonegap you could install a plugin to receive the params after myapp://, so that you could go to a specific page/screen (ex: myapp://customercard?id=1234)
Update, regarding HoffZ's comment below:
When benuuts mentioned that it was a standalone webapp I understood that it was packaged with Cordova or a similar framework. If that it's not the case, unfortunately I'm not aware of any way to return to a fullscreen (pinned to the home screen) webapp.
When posting a link to our web site to someones Facebook wall, the ink file picker stops working when the person uses the Facebook IOS application.
The file picker comes up and works normally, but as soon as you try to submit the image, the error in the attached screenshot appears below appears.
The text is cut off but it is something like "...results to application. Communication iframe...".
All works fine in the android FB application which clearly opens links in an external browser. But with the FB IOS, our web site seems to render inside the FB app through some sort of deep linking magic. It seems clear that this is some sort of cross domain issue that has been recently introduced by changes at FB.
Has anyone come across this? Any workarounds?
This question may be related to this one here:
Opening Up Facebook app outside Facebook
Full message is "Cannot send results to the application. Communication iframe not found.. Please close this window and try again." (should be responsive)
Filepicker isn't able to communicate when it is run inside FB IOS app. A solution might be to force it to display filepicker in the browser.