IOS Web App open links within web app - ios

I am in the mist of creating a mobile web app and have both meta tags
I have an iphone 5 on 7.0.4
When I click on a regular link like the one below it, opens up a mobile safari window and leaves the webapp. I also tried setting the target to _self and same behavior.
Sign in
I then used my ipad which was on 7.0.3 and it worked as should, not opening mobile safari on links. I think proceeded to update my ipad to 7.0.4 and the same issue as I had on my ipad.
Anyone ran into this issue and or knows a fix ?
Thanks

Since iOS 7.0.4 all links in WebApps open in Safari. As a workaround you can use Javascript:
window.location.href='text.html'
But remember that these steps will not be captured in history (so there is no ability to use Javascript like history.back() ..).
Alternatively, if you are using a menu in your web app, try to combine iframe and Javascript, you can change the content of your iframe with this Javascipt:
document.getElementById("frame").src = new_content.html
This will prevent your WebApp to open up links in Safari and stay in WebApp view.

Related

How to forcefully load desktop site in iFrame in Cordova App?

I want to forcefully load the Desktop View of any website in Cordova App for iPad. I am trying to loading in both iframe and InappBrowser.
By changing User Agent; I tried several methods to change User Agent but no luck. Any idea on this please? If we change user agent will the Apple reject the app while submitting for App Store?
I saw the option in Safari in iPad for 'request desktop site'. Can we do it programmatically in Cordova? or any option in iFrame for this?
Normally the website is redirecting from the Desktop url to mobile site url. So disable redirection is a solution? If so is there any option for that?
Change the iFrame size to pc desktop size and scale to reduce; I tried this but mostly not working.
or is there any other solution.
Thanks
It was working fine before version 4.0.0 of cordova-ios (Different from cordova version).
To be able to do that again a quick fix can be to remove the ios folder created by the new version and adding the old one:
cordova platform rm ios
cordova platform add ios#3
Hope it helps

in an android app how to open an external link in firefox (or user-chosen browser)

I'm using Phonegap + JQuerymobile to develop an Android app.
I wish to open an external link on an external browser (say Firefox, or Chrome; or let the user choose the browser).
How can I achieve this?
I have tried, without achieving desired results:
mylink.com
I also use '_blank', but I don't really see the difference.
Thanks.
UPDATE:
I've done some research, but have not found yet an answwer. I've also checked this questions, but they don't seem to solve my problem:
Links don't open in external browser in JQuery Mobile with PhoneGap: attributes _blank and _system don't seem to make a difference in my app
Open External Page in Popup in jQuery Mobile: this is using an HTML popup
Force iOS app opens external links in safari: this is for iOs apps
Opening links in external device browser with Cordova/jQuery-mobile: again the _system parameter, which doesn't show the list of browser for the user to choose from (not it's my default Chrome browser either)
other google searches
This did the job: using navigator.app.loadUrl()
full example:
(taken from: Opening an url in a new browser window in Android working with PhoneGap)

iOS Guided Access mode breaks HTML <select>

I have a web site built as a web app that contains a single 'select' menu. The menu works fine and the options are displayed when viewed in a browser including Mobile Safari on an iPad.
However viewing the web app with Guided Mode enabled (http://support.apple.com/kb/HT5509?viewlocale=en_US&locale=en_US) which prevents access to some iPad features, the tag stops working and won't open. A regular link using the 'a href' tag still works though.
Does anyone know why this particular tag is not working?
I've run into this same issue. It appears to be an iOS bug.
jQuery Mobile had a bug reported for this issue here: https://github.com/jquery/jquery-mobile/issues/6806
They solved it by coding around it, using hidden divs that are enabled by Javascript (See their custom select menu examples).

Phonegap redirecting to safari

I'm trying to use Phonegap to build an iOS application through github. All I have in my directory is one html file and an image. The html basically redirects them to my website, which is optimized for mobile devices. However, instead of redirecting them in-app, it opens a safari window and tries to load my website in there. How do I get it to load the website in-app?
I think it would be useless to correct youut code, because Apple won't allow you to bring this app into the store. It is not allowed create just a browser. But this may answer your question: Stop iframe redirect/opening mobile safari in phonegap project

Create iOS Home Screen Shortcuts on Chrome for iOS

I have a web app that allows the user to add the web page to his home screen on the iphone.
That functionality exists with Safari.
Now they released the chrome browser for the iphone too. My question is how can I instruct the user to add the web page to his ios home screen. The chrome browser doesnt seem to have that functionality..?
Can I add a shortcut from chrome options so that it would appear on the iphone home page?
For completeness:
https://developer.chrome.com/multidevice/android/installtohomescreen
Does Add to homescreen work on Chrome for iOS?
No.
Can't change the default browser, but try this (found online a while ago). Add a bookmark in Safari called "Open in Chrome" with the following.
javascript:location.href=%22googlechrome%22+location.href.substring(4);
Will open the current page in Chrome. Not as convenient, but maybe someone will find it useful.
Source
Works for me.
The is no API for adding a shortcut to the home screen in iOS, so no third-party browser is capable of providing that functionality.

Resources