One of these methods should work.
objc (BOOL)isiOSAppOnMac {
if (@available(iOS 14.0, *)) {
return NSProcessInfo.processInfo.isiOSAppOnMac;
}
return false;
}
swift
func isiOSAppOnMac() - Bool {
if #available(iOS 14.0, *) {
return ProcessInfo.processInfo.isiOSAppOnMac
}
return false
}