Since the project is using the UIKit most of the times (iOS, watchOS, tvOS, visionOS, mac catalyst) instead of specifying os check types, we should use #if canImport(UIKit).
So in future if apple added any type of device (such as glasses 😁) and that device can use UIKit, we don't have to change anything (even we don't have to specify any swift version check).
Also this can be removed from package.swift if there is any problem with Xcode 14 (couldn't confirm that):
Since the project is using the UIKit most of the times (iOS, watchOS, tvOS, visionOS, mac catalyst) instead of specifying os check types, we should use
#if canImport(UIKit)
. So in future if apple added any type of device (such as glasses 😁) and that device can use UIKit, we don't have to change anything (even we don't have to specify any swift version check).Also this can be removed from
package.swift
if there is any problem with Xcode 14 (couldn't confirm that):Cheers