I started working on app development tutorials from today and already started facing hard to deal bug. I know it may be easy for pro developers, but not for me.
The simple app I made is - To Do List
Under new project -> Tabbed Application - > Swift -> iPhone This is the code for second view controller,
import UIKit
class SecondViewController: UIViewController {
var toDoItems:[String] = []
@IBOutlet weak var toDoItem: UITextField!
@IBAction func addItem(sender: AnyObject) {
toDoItems.append(toDoItem.text)
println(toDoItems)
}
override func viewDidLoad() {
super.viewDidLoad()
// 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.
}
}
I am sick of this SIGABRT problem. Other people are using the exact same code that I am and there program is working perfectly fine. Not sure why I am having this issue.
I tried the following:
Clear the cache
Restarted the Xcode multiples times
Redid the complete code again saving as a completely different file
I am using the following:
xcode 6.0.1 (6A317)
OS Yosemite
I have a developer account
I had the same exact error and I know it is frustrating, but it is absolutely dumb. The problem is with an outlet. Maybe you deleted the line of code and/or replaced it, but the link still exists.
In your main.storyboard check all the outlets, control+(click on outlet) and check if it is linked to something. Once you correct that it should run with no problems.