Crash on "Library not loaded: /usr/lib/swift/libswiftCloudKit.dylib" in WatchOS 9 and iOS 16 simulators when using CloudKit

I found out that for some reason, /Library/Developer/CoreSimulator/Volumes/watchOS_20R5287q/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 9.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftCloudKit.dylib is not a file, but a symlink to /System/Library/Frameworks/CloudKit.framework/CloudKit - which is a folder, not a file, and as a result, any app that uses CloudKit crashes instantly after start on my WatchOS 9 and iOS 16 simulators.

On WatchOS 8.5 and iOS 15.5 sim everything works. Can you confirm if this is a known bug? I tried redownloading the simulators, but the result is same.

Accepted Reply

This is a known issue.

As a workaround, set your minimum deployment target to iOS 16 / tvOS 16 / watchOS 9.

  • I can confirm this workaround provided allows the simulator to run. I also filed a feedback: FB10328082

Add a Comment

Replies

Also filed as FB10058545, but I am hoping that maybe I'm just doing something wrong? I tried adding ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES, that didn't help.

It seems that the problem is that libswiftCloudKit.dylib inside a simulator is wrongly linked (while other *.dylib in a same folder are binaries, not links.)

This is a known issue.

As a workaround, set your minimum deployment target to iOS 16 / tvOS 16 / watchOS 9.

  • I can confirm this workaround provided allows the simulator to run. I also filed a feedback: FB10328082

Add a Comment

Thank you, looking forward to a fix.