NSInvalidArgumentException',原因:'Resource count cannot be found in the main bundle'

NSInvalidArgumentException', reason: 'Resource count cannot be found in the main bundle'

所以我已经发布了一个 swift/spritekit 游戏。

不幸的是,我收到有关 iPhone 5C 的 运行 iOS 8.1.

崩溃的报告

所以我下载了 iOS 8.1 模拟器并对其进行了测试,果然它在启动画面后崩溃了:(

它抛出这个错误:

 NSInvalidArgumentException', reason: 'Resource count cannot be found in the main bundle'

 *** First throw call stack:

 //stuff

 )
 libc++abi.dylib: terminating with uncaught exception of type NSException

我试过谷歌搜索,但没有返回任何特定信息。 知道是什么原因造成的吗?

在抛出的错误中看到的资源count是一个资源文件:

NSInvalidArgumentException', reason: 'Resource 计数 cannot be found in the main bundle'

iOS 8中,使用playSoundFileNamed加载到SKActions的音频资源,要求文件名中包含文件格式:

let count = SKAction.playSoundFileNamed("count.wav", waitForCompletion: false)

添加 .wav 后,一切正常。

感谢 JP_Mob 在问题的评论部分指出这一点。