Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

I am having trouble with the simulator

I am on the track building an with iOS using swift and am trying to run the simulator for funfacts. Whenever I do so, my view changes and I am getting an error message.

import UIKit

@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

The error seems to say Thread 1: signal SIGABRT

Here is my code if this is helpful

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var funFactsLabel: UILabel!

let factsArray = ["Ants stretch when they wake up in the morning", "Ostritches can run faster than horse." ]

override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view, typically from a nib.
 funFactsLabel.text = factsArray[0]
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}


@IBAction func showFunFact() {

    funFactsLabel.text = factsArray[1]

}

}

2 Answers

you have an exception being thrown. scroll down in the console below where it says

Thread 1: signal SIGABRT

and it should tell you whats throwing the exception. post what you find

Hi Stone, I restarted xcode and I no longer have the issue. I have no idea what caused it but its gone. My simulator doesn't look anything like the one in the video plus every time I run the simulator I have to wait for an entire start up. Maybe they edited the video to speed it up? Anyway, the problem seems to be solved for now. Thank you for responding.