0

Whenever I write the code AVAudioSession.sharedInstance() in my SwiftUI app, I get the following error message printed in the console: [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000068f420> F8BB1C28-BAE8-11D6-9C31-00039315CD46.

Is there anything I can do to stop this message from getting printed?

I'm running Xcode version 13.3.1, deployment target iOS 15, on simulator running iOS 15.4

wristbands
  • 1,021
  • 11
  • 22

1 Answers1

0

iOS simulators sometimes have such issues, however this console error might not be present when testen on real device. Try adding AVAudioSession.sharedInstance() as a global variable just after importing AVFoundation. I am basically suggesting the same solution as on this SO answer

Mr.SwiftOak
  • 1,469
  • 3
  • 8
  • 19
  • Thanks for the suggestion; unfortunately that solution doesn't work for me. But you're right that when running my app on a real device the console error is not present. – wristbands Aug 08 '22 at 16:28