Swift 5.1错误:[插件] AddInstanceForFactory:没有工厂注册ID为< CFUUID [英] Swift 5.1 Error: [plugin] AddInstanceForFactory: No factory registered for id <CFUUID
本文介绍了Swift 5.1错误:[插件] AddInstanceForFactory:没有工厂注册ID为< CFUUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
应用程序崩溃并显示以下错误消息
App crashes with the following error message
2019-10-12 20:01:34.332334-0700 Awesome App[26368:3535170] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002903280> F8BB1C28-BAE8-11D6-9C31-00039315CD46
崩溃时的断点似乎与AVAudioPlayer有关
The breakpoint at crash seems to be related to AVAudioPlayer
let path = Bundle.main.path(forResource: "menu_background.mp3", ofType:nil)!
audioPlayer = try AwesomeAudioPlayer(contentsOf: URL(fileURLWithPath: path)) ---> breakpoint
推荐答案
我在关于AVAudioPlayer的另一个stackoverflow线程中找到了解决方案,这里是:
I have found the solution in another stackoverflow thread about AVAudioPlayer, here it is :
如果像
var wrongMusicPlayer: AVAudioPlayer = AVAudioPlayer()
或wrongMusicPlayer = AVAudioPlayer()
,然后将其删除,然后像var wrongMusicPlayer: AVAudioPlayer
那样声明即可.
var wrongMusicPlayer: AVAudioPlayer = AVAudioPlayer()
OR wrongMusicPlayer = AVAudioPlayer()
in any method then please remove it and just Declare like var wrongMusicPlayer: AVAudioPlayer
!.
这篇关于Swift 5.1错误:[插件] AddInstanceForFactory:没有工厂注册ID为< CFUUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文