That's exactly what I did, and it fixed the compilation problems. But to make sure what I'm fixing for iOS15 doesn't break iOS14, I installed iOS14.5 runtime in Xcode 13, and that's where the problem occurs.
I can successfully compile the app, but at runtime, the 14.5 simulator crashes with:
dyld: Library not loaded: /System/Library/Frameworks/_CoreData_CloudKit.framework/_CoreData_CloudKit
Referenced from: /Users/andrei/Library/Developer/CoreSimulator/Devices/8554B734-4894-4DD0-A8FA-6C20983F3A49/data/Containers/Bundle/Application/29E251FD-B330-4B30-B3B8-22A86C2961A8/XXX.app/XXX
Reason: image not found
(lldb)
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: