iOS AVAudioPlayer Error Domain=NSOSStatusErrorDomain Code=2003334207 “(null)” 问题: func playWav(_ wavName : String){ let wavUrl = Bundle.main.url(forResource: wavName, withExtension: nil)! do{ try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) try AVAudioSession.sharedInstance().setActive(true) let player = try AVAudioPlayer(contentsOf: wavUrl,fileTypeHint:"wav") //error throw player.prepareToPlay() player.play() }catch{ debugPrint(error) } } 123456789101112 func playWav(_ wavName : String){ let wavUrl = Bundle.main.url(forResource: wavName, withExtension: nil)! do{ try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) try AVAudioSession.sharedInstance().setActive(true) let player = try AVAudioPlayer(contentsOf: wavUrl,fileTypeHint:"wav") //error throw player.prepareToPlay() player.play() }catch{ debugPrint(error) } } 解决: 改用 AVAu… Read More
PHP PDO sqlite: Unable to open database 问题: 同样的代码开发环境正常,部署到服务器就不行了 解决: 除数据库文件外 目录也需要写权限,最好把file… Read More
ios 使用Accounts.framework 实现facebook登录 问题: ios 使用Accounts.framework 怎么实现facebook登录 官方framework… Read More
ios AVAudioPlayer(data: d) 报错 NSOSStatusErrorDomain Code=1954115647 问题: AVAudioPlayer(data: d) 1 AVAudioPlayer(data: d) 报错 Error Domain=NS… Read More