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

前端 未结 7 2256
再見小時候
再見小時候 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:13

    Similar problem - using Preferences > Sound > Output different than Logictech USB Headset led to app that executed perfect & played sound w/o problems. Was never a problem outside of the Simulator - code on a device worked fine.

    TL;DR This is an especially gnarly & obtuse problem. I also encountered an issue with an unexpected: No factory registered for id

    After a short wait, it was also followed by several other console-reported errors, including: HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: AQMEIO.cpp:182:AwaitIOCycle: timed out after 15.000s CA_UISoundClient.cpp:244:StartPlaying_block_invoke: CA_UISoundClientBase::StartPlaying: AddRunningClient failed

    error when trying to play sound. Xcode 12.2, Mac OSX Catalina 10.15.7, simulator running iOS 14.2. Code had previously worked on prior versions of the simulator. Always had proper import of AVFoundation & declaration of AVAudioPlayer class property as: var audioPlayer: AVAudioPlayer!

    In my case it seems to be related to audio drivers in Mac OSX. This problem ONLY happened when I had Mac System Preferences > Sound > Output set to my Logitech USB Headset. The code otherwise worked when: played through my LG Monitor, played through my AirPods Pro, and when executing outside the simulator and on a device > my iPhone 11 Pro.

    Spent over an hour trying to diagnose the issue before restarting & noticing audio working when headset wasn't used for output. Switching the Preferences > Sound > Output settings to something other than the Logitech USB headset immediately fixed the problem in all other playback instances.

    Not even sure where to file this issue as an Apple bug, but hoping it helps someone. Am assuming it's an OS-specific issue & not one that'll result in a problem w/the app or code.

提交回复
热议问题