40

I have just downloaded Xcode 12 beta 2 and now I'm getting a bunch of weird logs in the console while I'm running my app (these warnings don't appear when using Xcode 11.5).
They look like the following one:

objc[5551]: Class CSAudioFileManager is implemented in both 
/Applications/Xcode-beta.app/Contents/Developer/Platforms/
iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/
Contents/Resources/RuntimeRoot/System/Library/
PrivateFrameworks/SpeakerRecognition.framework/SpeakerRecognition (0x1382890e0) 
and 
/Applications/Xcode-beta.app/Contents/Developer/Platforms/
iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/
Contents/Resources/RuntimeRoot/System/Library/
PrivateFrameworks/CoreSpeech.framework/CoreSpeech (0x13772c7a8).
 One of the two will be used. Which one is undefined.

These kind of logs I'm getting for some other classes like (CSVoiceIdXPCClient, CSNNVADEndpointAnalyzer, CSAudioRecordContext, CSOSTransaction, etc.), too. The app uses CoreData (in combination with CloudKit), FileManager and UserDefaults. If the app runs with Xcode 11.5, the logs aren't shown and for the most of the classes I'm pretty sure, that they aren't used in my code (at least I don't use them intentionally).
Note that the logs just appear when running a simulated device with iOS 14.0. If you choose iPhone 11 Pro (13.5) for example, then the logs don't appear (still with Xcode 12).

So is there a fix for this problem or is it just an error of the current Xcode 12 beta version which will be removed during the release of further Xcode 12 beta versions?

EDIT:
Now objc[5551]... is replaced with objc[6229]...

finebel
  • 2,227
  • 1
  • 9
  • 20
  • CSAudioFileManager .. implemented in both private frameworks for CoreSimulator, which is why it is prefixed with "CS". You can i think safely ignore the warning. I would rather check if both frameworks are part of the final OS version to be sure if this warning would ever appear on a costumers device. – Ol Sen Oct 07 '20 at 23:53
  • 1
    Seems to be related to Firebase for me. If you create am empty project add Firebase as a Swift Package you'll start seeing this warning. – streem Aug 31 '21 at 16:59

4 Answers4

7

I'm having the same logs (Using Xcode Beta 3). I think it might be something with current Xcode 12 beta version.

Edit: Those logs are not appearing anymore to me. Xcode 12.0.1 (12A7300)

Bruno Delgado
  • 594
  • 4
  • 8
  • Good to hear that I'm not the only one with this logs. Hope you are right with your assumption, that it's just a bug in the beta version... – finebel Jul 28 '20 at 19:11
  • me too have this issue, let's wait for the Xcode update :) – Frank Aug 03 '20 at 12:53
  • 20
    Same problem using Xcode12 public release version. How can this be solved? Or at least hide the warning ...... – mac_eric Sep 18 '20 at 15:19
  • I am also seeing same log – Narendar Singh Saini Sep 29 '20 at 12:15
  • 1
    You will want to be sure the framework which was expected will be used at the end. As those logs just appear once when an app is loaded under the circumstance a class is implemented twice on separate frameworks, it will never really spam your log. unless you don't like logs at all. It may be interesting to spot differences between the frameworks implementations to one and the same class to be sure its not making weirdo other unexpected behaviour. – Ol Sen Oct 07 '20 at 23:59
  • 3
    I'm also seeing these king of error messages using Xcode 12.1 – Raoul Nov 06 '20 at 06:40
  • 6
    Xcode Version 12.2 (12B45b) stable release, still gettings these logs. – Argus Dec 08 '20 at 18:22
  • XCode Version 12.3 (12C33) also getting these logs. Please advise. – Nizzam Jan 13 '21 at 02:59
  • same issue, trying to fix from 3 days but no luck. – Abdullah Khan Jan 25 '21 at 08:17
  • Xcode 12.5.1 and just started. Only in the simulator. – app4g Jun 23 '21 at 11:36
  • 1
    Xcode 12.5.1, happened after I integrate `GoogleSignIn` pod and delete my derived data. No idea what consequence cause this but this warning is quite anoying! – Zhou Haibo Jul 26 '21 at 17:48
4

In my case the issue with CoreSpeech and SpeakerRecognition duplicate symbols started appearing after I accidentally deleted the dyld simulator cache in ~/Library/Developer/CoreSimulator/Caches. The cache can be restored in the following way:

  1. Locate the runtime where the issue is present using xcrun simctl list -j runtimes
  2. In the json object for the runtime you will hopefully find bundlePath, runtimeRoot, identifier and buildversion
  3. Lookup the build version for your MacOS using sw_vers -buildVersion
  4. In the $(bundlePath)/Contents/Resources directory you will find the update_dyld_sim_shared_cache executable
  5. Call the update_dyld_sim_shared_cache. Specify the -root option as the runtimeRoot from the runtime json object. Specify the -cache_dir as ~/Library/Developer/CoreSimulator/Caches/dyld/$(mac_os_build_version)/$(identifier).$(buildversion).

If you are running the command on Big Sur 11.3 Beta, Xcode 12.4 and simulator runtime 14.4, the assembled update_dyld_sim_shared_cache call will look like this:

/Applications/Xcode12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/update_dyld_sim_shared_cache -root /Applications/Xcode12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot -cache_dir ~/Library/Developer/CoreSimulator/Caches/dyld/20E5196f/com.apple.CoreSimulator.SimRuntime.iOS-14-4.18D46
Timofey Solonin
  • 1,393
  • 13
  • 20
  • 1
    I tried this and the error still occuring. I ended up removing Xcode entirely and reinstall from scratch again. – app4g Jun 23 '21 at 14:06
2

This problem was solved for me by deleting Xcode 12.5.1 and re-installing it. I see a comment here from myjunk recommending that and yes, it work for me.

I also have the Xcode 13 beta installed on this machine alongside the release version. I built and ran the same project on the Xcode beta where the issues had been seen on Xcode 12.5.1 without problems, and then more importantly returning to Xcode 12.5.1 the problem was still solved. Reinstalling Xcode 12.5.1 did the trick, and it looks like you don't have to worry that also using the beta will necessarily cause them to return...

Duncan Babbage
  • 19,972
  • 4
  • 56
  • 93
-2

Hello I have also had a similar case after I upgraded XCode to 12.5, the way to solve it is:

  1. Close XCode and Simulator if on the running
  2. Remove ~/Library/Developer/CoreSimulator/Caches
  3. Remove ~/Library/Developer/CoreSimulator/Devices
  4. Open XCode, choose your scheme and build project.
  5. If you find duplicate simulator when choose simulator, you can delete any of the simulators you don't want to use.
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140