How can I do a conditional check for iPadOS?

How can I do a conditional check for iPadOS ? I would have expected something like:


#if targetEnvironment(iPadOS)
...
#endif

or


#if os(iPadOS)
...

#endif


to work, but none of them do. I know how to do it by checking UIUserInterfaceIdiom, but I really thoguht one of the above would work.