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
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
I have found the solution in another stackoverflow thread about AVAudioPlayer, here it is :
If you initialize your AVAudioPlayer
like
var wrongMusicPlayer: AVAudioPlayer = AVAudioPlayer()
OR wrongMusicPlayer = AVAudioPlayer()
in any method then please remove it and just Declare like var wrongMusicPlayer: AVAudioPlayer
!.