Post

Replies

Boosts

Views

Activity

Fatal error: Unexpectedly found nil while unwrapping an Optional value
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).
2
1
12k
Dec ’20
Nil unwrapping (Error)
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!
1
0
372
Dec ’20
Project requires a provisioning Profile
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?
0
0
375
Dec ’20