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 Build a Simple iPhone App with Swift 2.0 Deploying to a Device Running on Device

Mit Sengupta
Mit Sengupta
13,823 Points

I'm getting an error while trying to run the FunFact on my iPhone 6

It's working fine in the stimulator but whenever I'm trying to run my app on my iPhone 6, I am getting this error : dyld`dyld_fatal_error: -> 0x120069088 <+0>: brk #0x3

And here's the controller code :

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var funFactLabel: UILabel!


    let factModel = FactModel()

    @IBOutlet weak var funFactButton: UIButton!

    override func viewDidLoad() {
        super.viewDidLoad()
        funFactLabel.text = factModel.getRandomFact()
    }

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

    @IBAction func showFunFact() {
        let randomColor = ColorModel().getRandomColor()
        view.backgroundColor = randomColor
        funFactButton.tintColor = randomColor

        funFactLabel.text = factModel.getRandomFact()
    }
}

Can anyone please help me?

Steven Deutsch
Steven Deutsch
21,046 Points

Can you post your view controller code?

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

Hey there,

I have seen this issue being discussed on Treehouse before, let's have a look at this post

As a start, try cleaning your build folder by pressing command-shift-option-k. It seems in the linked case it was a certificate problem, though.

Let me know if that helped.