I am developing an application, where I need to open a full-screen WebView over my existing XAML page.
Now I've added a AppBar over this WebView. The requirement is that, appBar button click should navigate me to different application Page.
e.g. WebView is opened on MainPage.xaml and on clicking the AppBar button added on this webView I have to navigate to SeconsPage.XAML
I am not able to do this now and seeing an exception thrown by COntrol_webview,exe
Can I do such navigation? If Yes, pleas help me to find out what I am I missing?
Thanks in advance!!
go for a native app - it saves you a lot of trouble. Filip Skakun already described the first crazy thing about the webview (with the webviewbrush).
if not, you can use the script notification to communicate back and forth between your webapp and your store app. here's a good link: http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx
Related
I have a iOS app that wraps a website. When the user clicks a link in the wrapped website, I want to trap the event in my app and be able to get information about the link that was clicked. Is this something that can be done in Swift?
I'm relatively new to iOS app development and I'm working on an app that has been around for a while.
The short answer is "Yes". There are a couple of views that you can use in iOS to display web content. One such view is WKWebView.
If you look at the documentation at that link, close to the bottom of the page you will find a header for "Managing Navigation Through your Web Content".
What you do is create a WKNavigationDelegate that you attach to your WKWebView. That delegate is notified when the user wants to navigate through the web content (for example, when they click on a link) and lets your application code participate in the navigation process. It can allow navigation, deny navigation, find out when it starts and stop, things of that nature.
I am using an online builder for my app(ApperyDotIo, JQM framework). My application works fine with one exception. I have an in-app link to my website. The link in the iOS app, the link takes me to the page but since the iPhone doesn't have a "back" button I can't go back to the app. Looks like you have to close the app and then reopen it to get back into the app.
I tried to set the link to not open in the same window and vice versa.
Any easy work around?
Links and back buttons in Android apps work fine.
Thank you
You can consider using the inAppBrowser: https://docs.appery.io/docs/cordova-jquerymobile-inappbrowser
It will allow you to open the website in the child window of the application (with the "close" button) or in the native browser, without opening the website as application page.
I've used Vuejs and Framework7 in my PWA. I want to open a remote PDF file in my PWA and also it's important to me that users be able to back to my PWA after opening PDF. I did this using :
window.open(pdf_url, "_blank");
And it works fine for iOS > 12 and after opening pdf file there is an "OK" button for closing pdf.
But for example in iOS 11.3 there is no button and user has to use home button to close PWA.
I tried to solve problem using iframe but I can show only first page of the pdf.
Is there any way to fix this issue?
You can resolve this issue by doing some tricks (for any device without back button):
if you use iframe, you can set height manualy with overflow scroll, and I think this will resolve issue (dependence of style or lib dependency, so that may be not work).
you can add back button to your navbar, or Toolbar to let user click on it to back to previous page. (I prefer this solution).
you can render pdf in popup nested of normal html page, and then you can customize popup component by handling back button, or handling close by dropback overlay.
I use second and third point in real project and its work fine...
This is sample close button code used in popup:
'<p>'+ i18nextHelper.i18next.t('Exit From PDF') +'</p>'
Note: You can also customize height page for pdf page only, and add normal button bellow it, or by add absolute positioning button above PDF, but I think if you use second or third point will be best.
Good luck.
There seem te be some subtle differences in the Implementation or configuration between WBWebView and Safari (and SFSafariViewController) that renders a part of the Website I want to display unusable.
Here is what I am trying to do:
Basically all that is needed is an "App" that just opens a specific website in fullscreen mode, so no chrome, URLs or additional navigaton buttons are present. The Website works fine on Safari on iOS (and every other (modern) browser on desktop or mobile) but the menu does not when embedded in the App.
All I did was creating a new single view Application in Xcode, drop in a WKWebView and have it load the URL. The part of the page not working is this menu component that is used throughout the site: http://tympanus.net/codrops/2013/04/19/responsive-multi-level-menu/ So basically the user has no way to navigate. While debugging the website it seems like when I push the menu button the menu does not expand like it should because the changed css classes dont get picked up correctly. If I manually toggle the css classes on the menu-element it gets displayed correctly. It makes me wonder if there are some additonal constraints related to WKWebView?
Can anyone tell me if there are any settings or configurations I can alter that allow the website in WKWebView to behave exactly the same as it would under Safari?
As far as I understand SFSafariViewController I always get the browser toolbar and navigational elements which I dont want to have in the app, so that is not an option- or is there a way to get rid of that?
Any help or pointers would be greatly appreciated :)
Is there anyway to view the source of a web page on mobile Safari in iPad via the home screen app button? because this obviously hides the address bar etc..
No you can't view source in Mobile Safari full-stop.
EDIT
Have you checked out the remote debugging tools that are out there? Whilst you won't necessarily be abel to view full-screen web app source on the device itself, you may then be able to view the source on the control device. For example, weinre
Another solution is that if you are a developer you can install firebug light on your page .
It will make the dev. much easier ... you only have acccess to (CONSOLE - HTML - CSS - SCRIPT - DOM)
More info here :
https://getfirebug.com/firebuglite#Install
Yes you can, nitro html and WebInspector are both apps that allow you to view and in the case of nitro html edit the source html of a webpage
I am able to view the source of a web page (though it looks pretty ugly) on my iphone. I found a tip on the net. Pretty simple.
Go to any webpage
Tap add bookmark
In the name section add anything you like
In the address field add this:
javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
That is it. Now open the site you want to see the source of.
Go to bookmarks and tap the one you created. It will open the source in a new tab.
Tell me if it worked for you :)