I'm almost done developing my game and it works perfectly on iOS 8, but I changed the deployment target to iOS 7.1 and tried running it on iOS 7.1 simulator, the game crashes. Any reason why is that? I have used swift as the programming language.
The error is "thread 1:signal SIGABRT"
Edit 1: It seems that it crashes when I add an SKLabelNode. here is the function which adds a score label :
var scoreLabel = SKLabelNode()
func addScoreLabel() {
scoreLabel = SKLabelNode(text: "Score: \(score)")
scoreLabel.fontSize = 25
let xPos = size.width/2 //- gameOverHUD.size.width/5
let yPos = size.height/2 //+ gameOverHUD.size.height/2 - 5
scoreLabel.position = CGPoint(x: xPos, y: yPos)
addChild(scoreLabel)
}
This is the complete error I get in the output console:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SKLabelNode labelNodeWithText:]: unrecognized selector sent to class 0x10f22a3a0'
Edit 2: I was able to fix it. In case anyone is facing the same problem, simply replace the 'scoreLabel = SKLabelNode(text: "Score: (score)")' with scoreLabel.text = "Score: (score)").