Xcode 12 beta and iOS 14: Weird console logs "objc[5551]: Class ... is implemented in both"
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:
- Locate the runtime where the issue is present using
xcrun simctl list -j runtimes
- In the json object for the runtime you will hopefully find
bundlePath
,runtimeRoot
,identifier
andbuildversion
- Lookup the build version for your MacOS using
sw_vers -buildVersion
- In the
$(bundlePath)/Contents/Resources
directory you will find theupdate_dyld_sim_shared_cache
executable - Call the
update_dyld_sim_shared_cache
. Specify the-root
option as theruntimeRoot
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
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...