Does anyone now how I can fix the error "Fatal error: Unexpectedly found nil while unwrapping an Optional value"?
(And maybe what that means).
Thank you so much!
func updateUI() {
var letters = [String]()
for letter in currentGame.formattedWord {
letters.append(String(letter))
}
let wordWithSpacing = letters.joined(separator: " " )
correctWordLabel.text = currentGame.formattedWord
scoreLabel.text = "Wins: \(totalWins), Losses: \(totalLosses)"
treeImageView.image = UIImage(named: "Tree \(currentGame.incorrectMovesRemaining)")
}
The error displays at the last line (19/20).
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello!
Does anyone know how I can debug the following error: "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"?
And maybe what "nil" even means?
The error displays in the following code (line 18):
var letters = [String]()
for letter in currentGame.formattedWord {
letters.append(String(letter))
}
let wordWithSpacing = letters.joined(separator: " " )
correctWordLabel.text = currentGame.formattedWord
scoreLabel.text = "Wins: \(totalWins), Losses: \(totalLosses)"
treeImageView.image = UIImage(named: "Tree \(currentGame.incorrectMovesRemaining)")
}
Thank you so much!
Hello everyone. I need some help. I just started the "Apple Pie" Project in the how to learn to code swift book. I tried to run the simple app in the iPad simulator. However, there's popping up the bug "...Project requires a provisioning Profile". I don't understand why I need to set up a profile. Until now I was able to run Simulators without any profiles/logins and so. What do I need to do?