You could try this! This is what I did to help my catalyst app figure out if it was on iPhone, iPad, or Mac
Hope this is helpful.
#if targetEnvironment(macCatalyst)
print("Device: macCatalyst")
#else
if UIDevice.current.model == "iPad" {
print("Device: iPad")
}else{
print("Device: iPhone")
}
#endif