App crashes when built using Xcode 14 beta and running on iOS 16.0 with deployment target iOS 13.0

When I use the new Xcode 14 Beta 1 to build and run my app, it crashes at runtime, because it can't find the Swift system libraries. If I raise the deployment target to iOS 16.0 it runs flawlessly. I know first beta, but I'm wondering if there is a fix or how can I tell the simulator to look in the correct place for the libraries. It seems like it does not matter what path I provide in LD_RUNPATH_SEARCH_PATHS

Library not loaded: /usr/lib/swift/libswiftCloudKit.dylib

Referenced from: <C8CD6C46-E376-3DFA-947C-1E0935237691> ~/Library/Developer/CoreSimulator/Devices/1B4680E1-AF12-45E3-871A-278258D0F095/data/Containers/Bundle/Application/C44020CB-D997-4B3E-B4CC-BDAF32A8DA60/MyApp.app/MyApp

Reason: tried: 
'~/Library/Developer/Xcode/DerivedData/MyApp-bknqmionydbbegduadhkzusankxj/Build/Products/Debug-iphonesimulator/libswiftCloudKit.dylib' (no such file), 
'~/Library/Developer/Xcode/DerivedData/MyApp-bknqmionydbbegduadhkzusankxj/Build/Products/Debug-watchsimulator/libswiftCloudKit.dylib' (no such file), 
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection/libswiftCloudKit.dylib' (no such file), 
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftCloudKit.dylib' (no such file), 
'/usr/lib/swift/libswiftCloudKit.dylib' (no such file, no dyld cache), 
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libswiftCloudKit.dylib' (no such file)

Thanks for the tip about raising deployment target. That works for my testing.

App crashes when built using Xcode 14 beta and running on iOS 16.0 with deployment target iOS 13.0
 
 
Q