How to remove or disable address bar in ipad safari? - asp.net-mvc

I have a web application. When I am running my web app on the iPad ... I need to hide or disable the address bar in safari browser with iPad.

This isn't a feature that the Safari web browser on iOS provides websites with. When you see this done in iOS, it's because the application is creating a UIWebView on it's own ViewController. You might be able to scroll the page down on page load, however. This would cause the navigation bar to be "hidden" until the user interacted with it or scrolled up.

Related

iOS PWA standalone: how to force opening in a new window

I have a PWA saved on the home screen, this opens up standardly without search bar nor the bottom buttons (share, tabs, etc..).
So every link gets opened inside the PWA, and that is expected.
I have a problem when showing pdfs as they normally open in Safari with the "share" button and all the bottom bar, but in the PWA they open up without bottom bar and without any share button.
So my idea is to open the PDF link (http://www.mywebsite.com/download/pdf/12345) in a new safari window,.
I tried putting target="_blank" on the PDF link but this did not solve the problem.
I also tried forcing the iOS behavior by opening the app in safari with safari://http://www.mywebsite.com/download/pdf/12345 but with no luck.
How do I open a New Safari window to a link?
OK, the ONLY working solution is to tell iOS you are going onto another domain.
PWA stays in your app frame ONLY if you stay in the same domain.
To open a link within your domain in an EXTERNAL window (or inside the PWA but with Safari standard controls) you have to send it to an external/different domain.
So the PWA is on https://www.mywebsite.com/ and you want to open a PDF with all Safari control buttons, you just create a SUB domain and point the link to it, like https://media.mywebsite.com/download/pdf/12345 at this point the PWA thinks you are on a different domain and does the correct rendering! 🎉
You can try to use window.open(url).
But, remember to put it in an element with onclick event attribute.
For example,
<button class='btn' onclick='window.open("https://www.google.com", "_blank");'>Open Google search</button>
Reference: window.open(url, '_blank'); not working on iMac/Safari
EDIT
You can set a scope in manifest.json to customize where to open an external link.
You can refer https://developers.google.com/web/fundamentals/web-app-manifest on the property scope.

Trigger iOS universal link on browser redirect

I have universal links set up for a native app. E.g. when I tap a link to my website (say https://my.website.com) from an email app, the native app opens automatically. But when I browse some website, which redirects me to https://my.website.com in safari, all I get is a bar at the top, suggesting me to open in the native app. Moreover that bar is only visible if I drag down a bit, so it's not visible immediately. How can it be fixed? how can I make the app auto-open in such case?

What is this iOS view called?

When you click on a url from a native app such as the Twitter or Facebook app, a new panel comes up to display the page. When you X out the panel, you are still in the app at the location from where you launched the url. How is this done as opposed to launching the url in an instance of Safari ?
You can use either WKWebView or SFSafariViewController
SFSafariViewController is now widely used to view websites and it looks just like Safari.app (the user can access his saved passwords/cards, and he can use reader view), the problem is that you don't have any control over it.
WKWebView is a replacement for UIWebView and you will have a better control over it but you'll have to add your own navigation and refresh buttons and title bar.
UIWebView. Here is a link to apples developer reference
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/

How to open url inside the app with Keno Mobile similiar to UIWebView in iOS

I want to open a url that does not exit the app when it is deployed via Cordova / Phone Gap.
UIWebView
Sample UIWebViewImage
I want to do something similar retain the top NavBar of the app, but without the address bar. When I currently visit a url it will open the whole screen into the app, without back/forward buttons or any of the navbar or tabbar navigation.
You need to use the InAppBrowser of PhoneGap.

UIWebView goBack() issues in iOS 5

I'm displaying a UIWebView to display a mobile website. The website uses ajax and internal hash navigation. I have a back button to go back in history.
It works fine on iOS 4 and on iOS for the first time after application launch.
After leaving the UIWebView and coming back to it, the back button does not work properly because of the caching.
Any ideas how we can get the back functionality/history keeping working in iOS5? We have tried several things on the web page, and natively, but no success.
Our current status is that clicking the back button will return to the initial page on the UIWebView, but jump over the intermediate pages.

Resources