Trying to display a web page in iOS, and I am having trouble implementing WKWebkit.
ViewController.h
@import WebKit;
@interface ViewController : BaseViewController
@property (retain, nonatomic) WKWebView *webView;
@end
ViewController.m
@interface ViewController ()
@property (strong, nonatomic) IBOutlet UIView *containerView;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *fieldViewBottomConstraintY;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *centerCredentialsConstraintY;
@end
@implementation ViewController
@synthesize webView;
-(void) viewDidLoad {
[super viewDidLoad];
webView = [[WKWebView alloc] initWithFrame:[[self view] bounds]];
NSURL *url = [NSURL URLWithString:@"https://www.google.com"];
NSURLRequest *urlReq = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlReq];
[self.view addSubview:webView];
[self setupConfiguration];
// Do any additional setup after loading the view.
}
@end
I'm getting this error:
Class Unavailable: WKWebView before iOS 11.0 (NSCoding support was broken in previous versions)
I understand that this question is not very focused, but I'm on a tight schedule, still getting the hang of objective-c and iOS, and I haven't found a lot of implementable solutions, so I need help in solving this issue. I appreciate any help offered.