6

How to resolve “AddInstanceForFactory: No factory registered for id <CFUUID 0x600001bef9c0>” error?

struct PlayerContentView: View {
var data:datamodel
@State var player = AVQueuePlayer(playerItem: AVPlayerItem(url: Bundle.main.url(forResource: "1", withExtension: "mp4")!))
@State var playerlooper = AVPlayerLooper(player: AVQueuePlayer(playerItem: AVPlayerItem(url: Bundle.main.url(forResource: "1", withExtension: "mp4")!)), templateItem: AVPlayerItem(url: Bundle.main.url(forResource: "1", withExtension: "mp4")!))

var body: some View {
        VStack{
            HStack{
                backButton
                Spacer()
            }.padding()
            .padding(.top)
            PlayerView2(player: $player).cornerRadius(15)
                .frame(width: UIScreen.main.bounds.width - 10, height: UIScreen.main.bounds.height / 1.9, alignment: .center)

        }
        .onAppear {
            
            player = AVQueuePlayer(playerItem: AVPlayerItem(url: Bundle.main.url(forResource: data.exercise[excount].video, withExtension: "mp4")!))
            playerlooper = AVPlayerLooper(player: player, templateItem: AVPlayerItem(url: Bundle.main.url(forResource: data.exercise[excount].video, withExtension: "mp4")!))
                player.pause()
            }
        
fatdrogen
  • 463
  • 3
  • 10

1 Answers1

2

That's just an informational message not an error. AVFoundation started displaying the “AddInstanceForFactory: No factory registered for id” a few versions ago. This message only occurs when an app using AVFoundation runs on a simulator, presumably because simulators aren't manufactured in factories. The message doesn't occur on actual devices.

The message is not an indication of any problem, in my experience. If you have a problem with your app, look for another indication of the problem.

Marcy
  • 4,611
  • 2
  • 34
  • 52
  • Do you therefore conclude that the App Store will **not** reject the submitted App?? –  Jan 22 '23 at 19:00
  • Many reasons exist for an app to get rejected but this message occurs when using AVFoundation on a simulator. That's a normal situation, not an error or reason for rejection. Are you getting the message when testing on an iphone or ipad? – Marcy Jan 22 '23 at 20:56
  • Simulator. I am finishing up the Development. In honesty, I don’t know how to get my preliminary App onto a real Device –  Jan 23 '23 at 00:21
  • There's a bit of setup that you'll need to do. Perhaps this answer will help. https://stackoverflow.com/a/33928777/1816667 – Marcy Jan 23 '23 at 00:29
  • Done. `AVFoundation` error disappeared just as you predicted. **But** an old error cropped up which I eliminated long ago = had to do with Application Scene Manifest = `Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")`. This old error no longer appears on the Simulator, but now it shows on the **real** Apple TV. A **totally brand new error** shows on the **real** Apple TV, but has **never ever** shown on the Simulator. This error = `UITextInputSessionActionAnalytics is nil`. –  Jan 23 '23 at 05:33
  • WRT the old `UIScene` error showing on the **ATV**, the **Simulator** knows about it just because the `info.plist` is stored in the Finder literally next to the .xcodeproject file so it's impossible to miss. **But** *how* does the **ATV** know about it **?** -- the **ATV** obviously doesn't understand `Finder`. So, it's obvious to me that the **ATV** is not given the `Info.plist` file for reasons I do not understand. –  Jan 23 '23 at 05:51
  • And, yes, I had added the `Info.plist` file to my Project Navigator Panel –  Jan 23 '23 at 06:50
  • 1
    Thanks This is a question I asked years ago, I didn't fix this error. but my app works fine after publishing。 – fatdrogen Jan 23 '23 at 10:18
  • @John I'm not well versed in the specifics but the build process puts everything needed by the ATV, including info.plist details, into an executable bundle. – Marcy Jan 23 '23 at 18:03
  • 1
    Thanks. I am convinced that **after** the app is uploaded on the App Store, no user is going to be staring at a Xcode Console. The error will still be there, but clearly **not** fatal. Thanks everybody –  Jan 24 '23 at 20:31
  • @John the message "Application Scene Manifest = Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")" appears to have started in recent iOS versions with many devices. To remove, just add an empty "Scene configuration" under "Application Scene Manifest" in the info.plist. – Marcy Jan 30 '23 at 19:15