gpt4 book ai didi

ios - 快速错误: Classes implemented in two places but files I don't touch?

转载 作者:行者123 更新时间:2023-11-30 12:06:41 25 4
gpt4 key购买 nike

我正在测试 swifts UIWebView,我在 Storyboard上放置了一个简单的 UIWebview,这是我的 viewController 代码

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!))

} }

不幸的是,我在下面收到此错误,我已将应用程序传输安全设置添加到我的应用程序中,就像类似问题的其他答案所说的那样,但它仍然无法正常工作...

有人可以帮忙吗?

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.

最佳答案

这是 xCode 在模拟真实 iOS 设备时出现的错误,有时会出现此类错误。请检查您的网址是否有效。

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

我对 google URL 使用了相同的代码,它正在工作。

关于ios - 快速错误: Classes implemented in two places but files I don't touch?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46601990/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com