Teksty oznaczone: iOS Development

iOS SDK: SpriteKit sound



Recently, I came across a SpriteKit sound bug (iOS 7.0.4) described on stackoverflow.com: Sprite Kit & playing sound leads to app termination. My further investigation and developed solutions answer to this and more issues:

  1. SpriteKit app using [SKAction playSoundFileNamed:] cause crash on app exit or going into background.
  2. Deactivating AVAudioSession in AppDelegate applicationDidEnterBackground: fails with error (no deactivation in effect): Error Domain=NSOSStatusErrorDomain Code=560030580 "The operation couldn’t be completed. (OSStatus error 560030580.)
  3. SpriteKit app using [SKAction playSoundFileNamed:] on AVAudioSession interruption (e.g. call arrived) cannot be reactivated (silence).
  4. How to implement AVAudioPlayer in place of SpriteKit [SKAction playSoundFileNamed:]? (więcej…)