我有一个功能正常的Sprite Kit Game Center排行榜.如果我的游戏不是多人游戏,但是有全球排行榜,是否有必要启用"多人游戏兼容性"?
我尝试这样做:
let soundFilePath = NSBundle.mainBundle().pathForResource("GL006_SNES_Victory_loop.aif", ofType: "GL006_SNES_Victory_loop.aif")
let soundFileURL = NSURL(fileURLWithPath: soundFilePath!)
let player = AVAudioPlayer(contentsOfURL: soundFileURL, fileTypeHint: nil)
player.numberOfLoops = -1 //infinite
player.play()
Run Code Online (Sandbox Code Playgroud)
我把这段代码放在didMoveToView函数中,并且import AVFoundation放在我代码的顶部。我收到错误:
Call can throw, but it is not marked with 'try' and the error is not handled。
先感谢您!
什么是非法配置,我该如何解决?
我有3:
启动屏幕可能不使用IBUIExitPlace Holder的实例.
启动屏幕可能只有一个顶级对象,它必须是UIView或一种UIViewController.
启动屏幕可能不使用IBUIStoryboardEntryPointIndicator的实例.
我正在将我的Swift 2代码转换为Swift 1.2,因此我可以将我的应用程序上传到应用程序商店.
提前致谢!