I'm using an iPhone App that has some important information on it, but I also figured out that it uses a webview. And I'm not sure if it's safe; like; is it over https? What URL is being called?
Is there a way you can find out what Website is being called in the webview? Like you can do inspect element when using Safari from OSX with usb-connected iPhone.
UIWebview works for any url you call it with. If your site is https, the communication will be encrypted. Not all requests on UIWebView are not https. You can't inspect element from iPhone/iPad/Simulator. You can do it in web in the mobile view (by using useragent).
Related
I'm getting back into Xamarin.Forms, and I've discovered a new behavior of iOS 13 Safari on the iPad called "Desktop-Class Browsing." It's covered in detail here:
https://developer.apple.com/videos/play/wwdc2019/203
The problem for me is that I need my Web application to be able to detect if a normal Web browser is viewing it or if it's being viewed by a Xamarin.Forms.WebView. From my Web application, I used to be able to detect a Web view with the user-agent string or with the X-Requested-With header. But if my Web view is running on an iPad on iOS 13, it will enter desktop mode, which yields a desktop Safari user agent a no X-Requested-With header, and I can no longer detect that it is a Web view. This is referenced at 2:56 in the above video.
In a native iOS application, I can apparently use WKWebViewConfiguration to control these desktop-like featuers:
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
I think this is demonstrated at 9:01 in the video in my first link.
How can I use WKWebViewConfiguration with Xamarin.Forms? I see a WebKit.WKWebViewConfiguration class, but how can I utilize it with Xamarin.Forms.WebView?
Unless you follow the steps in this article, your app is using UIWebView instead of a WKWebView
There are several ways of getting access to editing the WKWebViewConfiguration:
You can use a "Custom Renderer" to implement your own WKWebView as shown in this Official Xamarin Forms example, and edit the WKWebViewConfiguration there.
Another possible way that I haven't tried- You can also implement a WKWebView inside your forms using the steps mentioned here. And then just edit that property.
I'm building a mobile app using WKWebView. I register custom url schemes image:// and thumb:// to serve assets from the native part to the web part of the app.
webViewConfiguration.setURLSchemeHandler(handler, forURLScheme: "image")
webViewConfiguration.setURLSchemeHandler(handler, forURLScheme: "thumb")
This approach works well if urls with a custom scheme are used in HTML. For example, <img src="thumb://watermarkly.com/1.jpg" /> works properly - WKWebView invokes my handler and displays the result. However, WKWebView blocks requests if I try to fetch these urls using XMLHttpRequest:
[Warning] The page at https://watermarkly.com/app/watermark/ was allowed to display insecure content from thumb://watermarkly.com/1.jpg.
[Warning] [blocked] The page at https://watermarkly.com/app/watermark/ was not allowed to display insecure content from image://watermarkly.com/1.jpg.
[Error] Not allowed to request resource
[Error] XMLHttpRequest cannot load image://watermarkly.com/1.jpg due to access control checks.
The only difference here is that "thumb:" url was assigned to an img tag, while "image:" url were fetched via XMLHttpRequest. Unfortunately, no other info provided in Safari Developer Tools.
The problem appears on a real devices only - everything works properly in iOS Simulator.
Is there something I need to configure to make it work for XMLHttpRequests as well?
Update
We switched from HTTPS to HTTP to make XHR to solve the problem.
Unfortunately, custom url schemes seems not to work on some iPhones. We have 5 customers with iPhones where nor switching to HTTP, nor sending Access-Control-Allow-Origin header help. We weren't able to identify which setting causes the issue - the problem cannot be reproduced on any of devices we have. Apple reviewer didn't have any complaints as well. Nor XHR, not getting images through urls work on these phones. One of the customers has two phones. Custom url schemes work on one of them and they don't work on the second one at all. He says they are identical and there is no Safari extensions installed. Unfortunately, we weren't able to identify what causes the problem. Beware custom url schemes may not work on some phones.
I have game URL-
https://nogs-gl.nyxinteractive.eu/game/?nogsgameid=70090&nogsoperatorid=268&nogscurrency=eur&nogslang=en_us&nogsmode=demo
URL is running well in my web browser.
I want to display this in my iOS app. Currently, I am doing that so by using native UIWebView but it's displaying the message as
What am I supposed to do for opening the given URL in my application?
iOS does not support Flash. It never has, and it never will. You cannot run flash content on iOS.
My issue is I need to find a way where I can have my action extension run in Safari and open up the website currently being viewed in Safari in my app (my app is a special web browser).
Here's a screenshot:
When the rED extension is clicked, the extension opens up "rED://" which is my custom URL scheme. This launches the app and everything works fine.
However, I want the extension to grab the URL of the webpage being viewed in safari and open that website in my app, so the URL scheme call would look something like "rED://google.com".
What sort of code/methods would I need to implement, and in which .m file would it go in?
Apple provides a method on NSExtensionContext for opening apps via URLs, however that only works for Today extensions (verified by an Apple employee at https://stackoverflow.com/a/24709883/3943258). This technically isn't currently possible.
I am developing an app using Appcelerators Titanium. The app consists of a webview. The webview shows i local page, iframe.html, and this iframe's src is pointed to a remote page.
However, this doesn't work out as i expected since it doesn't seem like the remote page can't store cookies when wrapped in an iframe. It works great on desktop and other devices. This seems to be an issue exclusive to iOS. I need the iframe, and i need cookies. What can i do to solve this?