Hey, I just started making an App with XCode, that should be an Extension for a Game, that I play with my Friends. I started programming it (I watched many tutorials), but now I get this Error. After trying two hours to fix it, I found this Forum.
Here is my code from the NamenEintragenViewController.swift-File:
import UIKit
class NamenEintragenViewController: UIViewController {
@IBOutlet weak var TextFieldPlayer1: UITextField!
@IBOutlet weak var TextFieldPlayer2: UITextField!
@IBOutlet weak var TextFieldPlayer3: UITextField!
@IBOutlet weak var TextFieldPlayer4: UITextField!
@IBOutlet weak var TextFieldPlayer5: UITextField!
@IBOutlet weak var TextFieldPlayer6: UITextField!
@IBOutlet weak var NextButton: UIButton!
var namen: Namen?
override func viewDidLoad() {
super.viewDidLoad()
self.namen = Namen()
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
self.namen?.player1 = TextFieldPlayer1.text
let windVC = segue.destination as! WindstossViewController
windVC.namen = self.namen
}
And here the one from the WindstossViewController-File:
import UIKit
class WindstossViewController: UIViewController {
@IBOutlet weak var WindstossLabel: UILabel!
@IBOutlet weak var WindstossPerson: UILabel!
var namen: Namen?
override func viewDidLoad() {
super.viewDidLoad()
self.WindstossPerson.text = "\(namen!.player1 ?? "Fehler")"
}
}
This is the Error I get:
2019-03-02 14:50:16.044096+0100 Schlamperich[41861:1587101] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-03-02 14:50:19.605328+0100 Schlamperich[41861:1587101] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/erikhaarlander/Library/Developer/CoreSimulator/Devices/6CD501B8-ADD3-474D-A689-8C1B85CD1FA9/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-03-02 14:50:19.654877+0100 Schlamperich[41861:1587101] [MC] Reading from private effective user settings.
Could not cast value of type 'Schlamperich.SchlamperichErwachtViewController' (0x109aaf208) to 'Schlamperich.WindstossViewController' (0x109aaf008).
2019-03-02 14:50:24.351602+0100 Schlamperich[41861:1587101] Could not cast value of type 'Schlamperich.SchlamperichErwachtViewController' (0x109aaf208) to 'Schlamperich.WindstossViewController' (0x109aaf008).
(lldb)
Can You please Help Me fixing this?
Thank You
Regards
DerBerliner