So I have coded myself a way to display the pop-up encouragement to add the app to home screen on iOS for PWA. OK, user does it, when he clicks through the app all is good. However, when he returns to the website, I want to check whether the app has already been added to the home screen. I have found only this so far: https://stackoverflow.com/a/39986409/6470918
This states that basically it is impossible. Did this situation change during the last two years?
Thank you in advance,
Grzegorz
Related
We have a PWA (web app) that the user can add to the homescreen to make it look more like an app. Some users have reported a strange issue that only seems to appear on IOS sometimes when the following step has been made.
Open the app from the homescreen
Use the app for a while
Put it into background
Turn off the screen for a while
Turn the screen back on and put the app to foreground again
The bug is that nothing seems to happen when you click on a select or date input control. First I thought that there was some overlay in the app that was blocking the ui controls but the elements receive focus on click, but not options are shown.
Now it really becomes strange. When I tried to click a little bit under the select input an option was selected. The same thing occured with a time select. If I first clicked on the timeselect input control and then a little bit under, it updated the time.
So, the controls seems to be there but nothing is visible on the screen. I have only been able to reproduce this on my own once but multiple users have been reporting the same thing. The only way to work around the bug is to restart the app.
It seems to be for all native safari controls that shows some kind of modal/popover.
I've did an indepth investigation on this select dropdown problem and posted an issue at bugs.webkit.org: https://bugs.webkit.org/show_bug.cgi?id=238318
It's a problem with dropdowns of several components (such as select, input file/date/month) where either the animation to have the dropdown appear or disappear seems to get stuck. You can sometimes see the dropdown being tiny and very transparent (if you zoom into a screenshot) and sometimes you'll be able to select an option even though you don't see the dropdown.
An app is currently outdated and to avoid the users to use its incorrect results, we decided to suspend this app until we have the algorithm updated.
We have tried the following:
Titanium.Platform.openURL("http://example.net");
This will open the web browser to a URL of our selection. However, in iOS there is a little "go back" link in the top left hand corner, which will lead the user back to the broken app. We want to avoid this. Basically, we want the app to be inactive all the time - whenever the user attempt to activate it, the designated page behind the URL should be shown.
How can we do this?
Why not just temporarily replace the main page of you app with a full screen web view showing the desired URL? The user stays in your app but still can only access the web page you direct them to.
Before anyone marks this question as a duplicate please read the extra section at the bottom that sites differences between this question and other similar questions out there
I'm utilizing Universal Links for my deep linking needs. Two example use cases are:
1.) Safari/Chrome Browser on iPhone with my app installed: When click on a link on my web site on their iPhone I'm deep linking them into my app if installed on their phone.
2.) With my app installed, running my app but using an in-app-UIWebView. My app also has an in-app UIWebView, when you tap a button it deep links them somewhere in the application.
After you deep link into the app, there are two buttons in the navigation bar. A Back button (top left) and a Forward button (top right).
My problem
If the user presses the forward button (top right) it forwards them to my web page and then will forever break my deep linking so that any time in the future when the user clicks on that link to deep link it always goes to my web page instead of deep linking into the app (which was the original intention). How can I prevent this? My concern here is that my app has close buttons in the top right corner and if the user is trying to hit hte close button they could accidentally hit the forward button and forever break deep linking. I've tried clearing my browsers caches, I've tried deleting and re-installing my app. But nothing will "fix" deep linking after it's been permanently disabled by the forward button. The only way I can get it working again is by doing a complete device reset and Erasing all Content and Settings.
Here is an image of the back and forward buttons after deep linking into the application.
Difference between my question and similar questions on SO:
Similar SO question But here they are saying that the user can long-press on the "universal link" and and action sheet pops up asking you to "open in ". I've tried this for above case 1.) and my app isn't showing up in the options. See attached screenshot below. And this doesn't work at all for above case 2.). How do you get a Universal link to work with an iOS WebViewController? Do I have to use the SafariViewController? I don't want to use SafariViewController in my app for this case because I don't want to have that top navigation bar that SafariViewController has.
You're absolutely right: the forward button is horrible UI/UX. It's one of the big flaws with Universal Links identified in this blog post. There is no way to disable the forward button, and once it's triggered, you're screwed.
The easiest way to re-enable Universal Linking behavior after it is turned off is to long-press on the link. But that doesn't work if your link is being disabled by the system based on some other criteria (more details below). Your best bet at getting a clean shot is to paste the Universal Link URL into the stock Notes app and try long-pressing it from there.
To answer a few of your other questions:
Universal Links do work within UIWebView (per Apple's docs). A SafariViewController is not necessary.
Universal Links are disabled at the system level in certain situations. There's a list here, but this the main one that comes to mind as potentially applicable in this situation:
Universal Links will not work with a user driven element click on the same domain. Example: if there is a Universal Link on google.com pointing to a different Universal Link on google.com, it will not open the app.
Your second example image is from Chrome. Universal Links should work (conditionally) in Chrome, but is the link pointing at the same domain as the page you've already loaded? If so, that's why you aren't seeing the Open in [app] option.
You cannot disable the button to open the website, but you can create a path in the other direction: Use a smart banner on the website, and when users tap "Open" (or the localized equivalent), they will be taken back to your app, and this will also reset the default to opening universal links in your app instead of Safari.
While testing universal links on my iOS 9 app, I accidentally tapped "mywebsite.com >" (top right corner). This made the app navigate to the website again. Now I can't seem to make universal linking work again. Seems like iOS has remembered my preference that I would like to see links opened in Safari as opposed to my app.
Has anyone run into this? Is there a way to reset this?
You can long-press on a universal link and it will give you an action sheet with an "Open in 'AppName'" option. Once you select that option it will default to opening the links in your app again.
You need pull down in opened page in safari from email, etc to see button "Open" (this button is system in safari). If tap "open" after
I accidentally tapped "mywebsite.com >"
universal link will work again under the old scheme.The result of this action preserves.
example
#dan is right, long-pressing the hyperlink will give you the option to open with your app again through universal link.
If you have an Apple Smart Banner in place, you can also click on its 'Open' hyperlink to active universal links on your app again.
For a Branch.io deep link the long tap (at least in GMail) does not work and also you can't pull down from safari, it brings you to the App Store immediately.
Instead, copy the link to Notes and then do the long press.
More info here: https://blog.branch.io/3-steps-to-troubleshoot-ios-9-and-ios-10-universal-links/
I'd like know if there's away to run a bit of code only after it's been installed to the home screen on iOS. This is for internal use only so I don't need it to work on other platforms. Just iOS.
Basically, I want to add a few custom icons to iOS devices that do specific things. One will open a PDF and that's the one I'm having a hard time working with.
So, here's the flow...
User goes to URL on their iOS based device, there is nothing to see here, but then they add the URL to their home screen. Once they click on the home screen icon, the page opens and redirects to the a PDF that lives online. The pdf can live online since they will always have wifi.
Any suggestions?