Swift初心者です。
このたび、iOSのSwiftを使って簡単なブラウザを作ってみたのですが、AppDelegate.swift
の
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate
の行で以下のようなエラー文が発生していました。
Thread 1:signal SIGABRT
原因は何でしょうか?
下にviewController.swift
のソースコードを載せておきます。Xcodeはversion 9.0 beta、Swift3です。
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var urlTextField: UITextField!
@IBOutlet weak var browserWebView: UIWebView!
@IBOutlet weak var backButton: UIBarButtonItem!
@IBOutlet weak var forwardButton: UIBarButtonItem!
@IBOutlet weak var reloadButton: UIBarButtonItem!
override func viewDidLoad() {
super.viewDidLoad()
let urlString = "http://dotinstall.com"
let urlRequest = URLRequest(url: URL(string: urlString)!)
self.browserWebView.loadRequest(urlRequest)
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func goBack(_ sender: Any) {
}
@IBAction func goForward(_ sender: Any) {
}
@IBAction func reload(_ sender: Any) {
}
}
以下のようなエラーが発生します。
2017-07-07 11:10:19.864054+0900 MyBrowserApp[74215:10111362] [Snapshotting] Snapshotting a view (0x7ffdade10c70, _UIButtonBarStackView) that has not been rendered at least once requires afterScreenUpdates:YES.
2017-07-07 11:10:22.310946+0900 MyBrowserApp[74215:10111675] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-07-07 11:10:24.343312+0900 MyBrowserApp[74215:10111688] WF: === Starting WebFilter logging for process MyBrowserApp
2017-07-07 11:10:24.343518+0900 MyBrowserApp[74215:10111688] WF: _userSettingsForUser : (null)
2017-07-07 11:10:24.343758+0900 MyBrowserApp[74215:10111688] WF: _WebFilterIsActive returning: NO
2017-07-07 11:10:25.109372+0900 MyBrowserApp[74215:10111682] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-07-07 11:10:25.334517+0900 MyBrowserApp[74215:10111677] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-07-07 11:10:25.445752+0900 MyBrowserApp[74215:10111677] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-07-07 11:10:25.553913+0900 MyBrowserApp[74215:10111676] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates