Works fine on Simulators but doesn't work for a single penny on real devices

Hi!


I have made an app in Swift - SpriteKit. However it works fine on the all of the simulators, but it doesn't work on a single device.


What is wrong?


It seems to me like it is something with the pictures I am using but I'm not sure.


Shouldn't it work just as good on simulators as on real devices?


Aya, However I need help to get this working!


Cheers!

You'll need to be more specific than "doesn't work."


What are the symptoms? What troubleshooting steps have you taken so far? (breakpoints, debug logging to see if VCs, scenes, images etc. are loaded OK, etc.)

All the images are loading, but when I'm touching my "Start Game" - button it craches. I looked around inside to see if I could find it and I got an error that said the following:

Enquened from _46-[_CUIThemePixelRendition setSharedBlockDat:]_block_invoke(0)


No Idea what it means and I've seached nearly all day on it but I won't find anyone that has the same error.

It's kind of a flappy bird based game and it should have something with the pipes to do couse it is there I found that error above.

At the same line as I created:

let bottomPipe = SKSpriteNode(imageNamed: "Pipes"), it's right there it craches. But I have no idea how to fix it.


I will copy the Whole function that I think the crash was about:



func createPipeSet(timer : NSTimer)

{

pipeSet = SKNode()

let bottomPipe = SKSpriteNode(imageNamed: "Pipes")

let topPipe = SKSpriteNode(imageNamed: "Pipes")

pipeSet.addChild(bottomPipe)

var yPos = CGFloat(arc4random()) % (bottomPipeMaxYPos - bottomPipeMinYPos) + bottomPipeMinYPos

bottomPipe.position = CGPointMake(0, CGFloat(yPos))

bottomPipe.physicsBody = SKPhysicsBody(rectangleOfSize: bottomPipe.size)

bottomPipe.physicsBody?.dynamic = false

bottomPipe.physicsBody?.categoryBitMask = category_pipe

bottomPipe.physicsBody?.contactTestBitMask = category_rocket

bottomPipe.setScale(4)

topPipe.position = CGPointMake(0, bottomPipe.position.y + heightBetweenObstacles)

pipeSet.addChild(topPipe)

topPipe.physicsBody = SKPhysicsBody(rectangleOfSize: topPipe.size)

topPipe.physicsBody?.dynamic = false

topPipe.physicsBody?.categoryBitMask = category_pipe

topPipe.physicsBody?.contactTestBitMask = category_rocket

topPipe.setScale(4)

pipes.append(pipeSet)

pipeSet.zPosition = 4

pipeSet.runAction(moveObstaclesForeverAction)

self.addChild(pipeSet)

pipeSet.position = CGPointMake(pipeXStartPos, CGFloat(yPos))

updateScore()

}

Works fine on Simulators but doesn't work for a single penny on real devices
 
 
Q