Swift 5.1 Error: [plugin] AddInstanceForFactory: No factory registered for id <CFUUID

前端 未结 7 2280
再見小時候
再見小時候 2021-02-12 10:41

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         


        
7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-12 11:12

    I believe the error message is a warning for simulators hence it is not important.

    I think your issue is a bug in your code. Should be something like this:

    let path = Bundle.main.path(forResource: "menu_background", ofType:"mp3") audioPlayer = try AwesomeAudioPlayer(contentsOf: URL(fileURLWithPath: path!)) ---> breakpoint

    Where the forResource is the name of the file and ofType is the extension. You can also use Bundle.main.url which will look like this:

    let path = Bundle.main.url(forResource: "menu_background", withExtension:"mp3") audioPlayer = try AwesomeAudioPlayer(contentsOf: URL(fileURLWithPath: path!)) ---> breakpoint

提交回复
热议问题