I have added an iOS 15+/macCatalyst 15.0+ function to my app and now it is crashing when run on an M1 iMac through Mac Catalyst (Designed for iPad).
I have an availability check around my function however when run on my Mac (macOS 11.6), the code within the availability check still runs, and crashes.
if #available(iOS 15.0, macCatalyst 15.0, *) {
    dataSource.applySnapshotUsingReloadData(fullSnapshot, completion: nil)
} else {
    dataSource.apply(fullSnapshot, animatingDifferences: false)
}
I understand the Designed for iPad mac catalyst runs as iOS, and I can confirm it is running as iOS 14.7 using print(UIDevice.current.systemVersion) so why is it running code that is set to run on iOS 15+ only?
Am I doing my macCatalyst check right?
 
    