(help!) objc[89368] Class VCWeakObjectHolder (help!)

Hi everyone!


Im working on a MapKit project with the latest versions of Swift(4.2) and Xcode(9.4.1). Im working with Pods( alamofire, alamofireImage) right now and can’t seem to get past this error:


objc[89368]: Class VCWeakObjectHolder is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/Frameworks/ViceroyTrace.framework/ViceroyTrace (0x12250f4d0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/AVConference (0x12163be38). One of the two will be used. Which one is undefined.


Ive cleaned the project/build several times and reset the simulator, but have had no luck so far. Additionally, I’ve tried looking throughout the apple forum and stack overflow but I haven’t had any luck so far. If anyone has suggestions on what to do it would be much appreciated!


cheers!

Replies

You should submit a bug report, then ignore the issue. As the message says, "One of the two will be used." So you're fine. 😉

You should submit a bug report, then ignore the issue.

Agreed.

As the message says, "One of the two will be used." So you're fine.

To clarify, this is fine because it only affects the simulator and:

  • Customers don’t run in the simulator

  • Both versions of this class come from the simulator runtime, meaning they’re both built from the same source

If you see this error under other circumstances then it would be more concerning.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I submitted bug #43377301


Debug messages should be off in Apple frameworks (Class VCWeakObjectHolder)


I'm currently fixing bugs in an old code base and I have no idea what this "warning" means.
It shouldn't be displayed to the 3rd party developer. I'm using CoreBluetooth and Objective-C.

I submitted bug #43377301

Thanks.

It shouldn't be displayed to the 3rd party developer.

Agreed. That’s why I concurred with QuinceyMorris saying that you should file a bug.

I have no idea what this "warning" means.

This warning means that two different frameworks in the same process have implemented a class with the same name (in this case

VCWeakObjectHolder
). This is bad, because the Objective-C runtime has a flat namespace, meaning that all class names should be unique (this is why there’s an Objective-C convention of starting your class names with prefix, like
VC
in this case, that helps to avoid such collisions).

The Objective-C runtime resolves this issue by picking one of the implementations at random [1]. If the two implementations are different, that’s bad, because some parts of your process will be expecting one implementation and other parts will be expecting the other.

In this case, however, the implementations are the same. You can tell because they both came from the same simulator runtime, and those simulator runtimes are built by Apple from a consistent source base; so it doesn’t matter which implementation gets chosen. Thus, in this case only, this warning is just noise and you can safely ignore it (other than to file a bug about it).

If this weren’t the case, if there were two very different implementations of this class, that would be a real bug that you’d need to investigate properly.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] It’s not actually random, but you don’t get to control the order so it’s effectively random.