I tried that exact code and it worked fine. It could be because the player was not defined in the correct place. Make sure that player is not defined in the func didMoveToView. If it is, it should be defined right after the bracket of the SKScene.
class GameScene: SKScene {
let bird = SKSpriteNode(imageNamed: "sprite_1")
override func didMoveToView(view: SKView) {
/* Setup your scene here */
self.physicsWorld.gravity = CGVectorMake(0.0, -5.0)
bird.xScale = 2; bird.yScale = 2
bird.position = CGPoint(x: self.frame.size.width/2.75, y: self.frame.size.height/2)
bird.physicsBody = SKPhysicsBody(rectangleOfSize: bird.size)
self.addChild(bird)
}
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
/* Called when a touch begins */
for touch: AnyObject in touches {
bird.physicsBody?.applyImpulse(CGVectorMake(0, 100))
}
}
See how the player (bird for me) is not declared in the didMoveToView func.
I found this page while looking up how to apply impulses, so your post was useful to me. I hope that this can help you.