0

I am testing out swifts UIWebView, I have placed a simple UIWebview on my storyboard and this is my viewController code

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var webView: UIWebView!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        let url = URL(string: "https://mywebsitehere.com")
        webView.loadRequest(URLRequest(url: url!))

    } }

Unfortunately I am getting this Error below, I have added App transport security settings to my app like other answers to a similar question have said to do but it still isn't working...

Can anyone help?

objc[946]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x124feecc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x124e056f0). One of the two will be used. Which one is undefined.

Hilalkah
  • 945
  • 15
  • 37

1 Answers1

0

This is bug with xCode while simulating the real iOS device, some time it through such kind of error. Please check whether your url is active or not.

let url = URL(string: "https://google.com")
webView.loadRequest(URLRequest(url: url!)) 

I used the same code with google URL and it is working.

Ajay Singh Mehra
  • 1,313
  • 9
  • 19