Questions tagged [uiwebview]

A class used to display web content from within an iOS application. Note that UIWebView is deprecated since iOS 8, it is recommended by Apple to use WKWebView instead.

UIWebView is used to render HTML content in iOS () applications (including accompanying CSS and JavaScript). UIWebView is effectively a miniature web browser that you can embed within your app. The user can view a web page (both local or from the Internet) in the app itself instead of launching the separate Safari app. UIWebView is available in iOS 2.0 and later.

Set the delegate property for the UIWebView to an object conforming to the UIWebViewDelegate protocol if you want to track the loading of web content from your app.

Note that UIWebView is deprecated since iOS 8, it is recommended by Apple to use WKWebView instead.

Resources:

10713 questions
76
votes
1 answer

Suppress WKWebView from scaling content to render at same magnification as UIWebView does

Problem Using WKWebView in place of UIWebView, I noticed that the contents of the WKWebView were massively scaled down as compared to my UIWebView. I'd like the WKWebView to stop doing that, and just respect my CSS values literally, the way…
idStar
  • 10,674
  • 9
  • 54
  • 57
75
votes
4 answers

Is it possible to set a cookie manually using sharedHTTPCookieStorage for a UIWebView?

I have webviews inside of an iOS application that require an authentication cookie to be properly authenticated. I'm looking for a way to set a cookie inside of an iOS application's webview without having to make an outbound request to set the…
Mauvis Ledford
  • 40,827
  • 17
  • 81
  • 86
74
votes
3 answers

Xcode 8, iOS 10 - "Starting WebFilter logging for process"

WF: === Starting WebFilter logging for process Test 2016-09-30 08:56:45.458007 Test[616:142557] WF: _userSettingsForUser mobile: { filterBlacklist = ( ); filterWhitelist = ( ); restrictWeb = 1; …
A K M Saleh Sultan
  • 2,403
  • 2
  • 22
  • 28
72
votes
14 answers

Change User Agent in UIWebView

I have a business need to be able to customize the UserAgent for an embedded UIWebView. (For instance, I'd like the server to respond differently if, say, a user is using one version of the app versus another.) Is it possible to customize the…
Steve Murch
72
votes
9 answers

How to Migrate to WKWebView?

I'm trying to understand how to make use of the new WKWebView in iOS8, can't find much information. I've read: http://developer.telerik.com/featured/why-ios-8s-wkwebview-is-a-big-deal-for-hybrid-development/ http://nshipster.com/wkwebkit/ But how…
Daniel Åkesson
  • 1,330
  • 1
  • 12
  • 21
71
votes
7 answers

How to determine UIWebView height based on content, within a variable height UITableView?

I am trying to create a UITableView with variable height rows as explained in the answer to this question My problem is each cell contains a UIWebView with different (statically loaded) content I can't figure out how to calculate the proper height…
frankodwyer
  • 13,948
  • 9
  • 50
  • 70
71
votes
7 answers

The font looks like smaller in WKWebView than in UIWebView

I changed UIWebView to WKWebView, however, with the same html, the font in WKWebView looks like smaller than in UIWebView. I don't want this happen, so is there any way to avoid this change?
无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
69
votes
1 answer

Xcode 8.3 libMobileGestalt MobileGestaltSupport.m:153:

I'm using UIWebView XCode Version 8.3. My console continues to show me this error when I start the app and I do not understand what it means. In my UIViewController there is no code so I do not understand why XCode continues to show me this…
kAiN
  • 2,559
  • 1
  • 26
  • 54
68
votes
9 answers

Clearing UIWebview cache

I have used UIWebview to load a web page using loadRequest: method, when I leave that scene I call [self.webView stopLoading]; and release the webView. In activity monitor on first launch i have seen that the real memory increased by 4MB, and on…
Chandan Shetty SP
  • 5,087
  • 6
  • 42
  • 63
65
votes
5 answers

Using custom fonts in WKWebView

I'm using custom fonts in my app. They are copied to bundle and hardcoded to appName-info.plist. This fonts works perfectly in the whole app and in UIWebView. Im loading htmlString [webView loadHTMLString:htmlString baseURL:nil]; I use this fonts in…
Sashke
  • 659
  • 1
  • 5
  • 4
64
votes
5 answers

UIWebView background color

I am loading an HTML string into a UIWebView in order to be able to view rich text. So far, so good. But I have one small problem: in my Nib file, I set the background attribute to green. However, when it is displayed, the background is white. Then,…
Namhcir
  • 825
  • 3
  • 9
  • 16
63
votes
2 answers

'openURL' was deprecated in iOS 10.0: Please use openURL:options:completionHandler: instead in Swift 3

I have working open webLink url code in Swift3 but when I use it gives me this warning; 'openURL' was deprecated in iOS 10.0: Please use openURL:options:completionHandler: instead How can I resolve it, my code under below. let myUrl =…
SwiftDeveloper
  • 7,244
  • 14
  • 56
  • 85
62
votes
3 answers

How to handle app URLs in a UIWebView?

I recently found that my UIWebView was choking on ITMS links. Specifically, from the UIWebView in my app, if I navigate to a site such as this one and click the "Available on the App Store" link, UIWebView would error out with "Error…
theory
  • 9,178
  • 10
  • 59
  • 129
61
votes
9 answers

iPhone UIWebview: How to force a numeric keyboard? Is it possible?

I'm experimenting with PhoneGap to develop some iPhone apps. PhoneGap basically wraps a UIWebView - it works well. The problem is the my app has several input fields that only take numeric input. I really need to force the numeric keypad instead…
JJ Rohrer
  • 2,671
  • 5
  • 29
  • 37
61
votes
6 answers

Asp.Net Forms Authentication when using iPhone UIWebView

I am writing a Asp.net MVC 2 application that uses Forms Authentication and currently I am having a problem with our iPhone application in regards to the authentication/login over the web. We have developed a simple iPhone app that uses the the…
Brian Y
  • 1,138
  • 1
  • 10
  • 11