I have a simple example program with AVAudioPlayer and am getting this message when I run it. This occurs before .play()
is called:
2019-10-08 12:34:53.093726+1100 PlayNotes2[1587:137643] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000c580e0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
The program works fine, but I'm concerned to be getting this message.
Here is my complete code. It just has one button on the view with the playButtonTap
outlet. Note that the same thing happens if I use the commented out declaration for var audioPlayer
.
import UIKit
import AVFoundation
class ViewController: UIViewController {
let soundFileName = "E_64kb"
// var audioPlayer = AVAudioPlayer()
var audioPlayer: AVAudioPlayer?
override func viewDidLoad() {
super.viewDidLoad()
let sound = Bundle.main.path(forResource: soundFileName, ofType: "mp3")
do {
audioPlayer = try AVAudioPlayer(contentsOf: URL(fileURLWithPath: sound!))
} catch {
print(error)
}
}
@IBAction func playButtonTap(_ sender: Any) {
audioPlayer!.play()
}
}