Moving from different apps per platform to one Universal App

I currently have 3 different apps (one for iPhone, one for iPad and one for Mac, with different bundle ids) published in the App Store and I'm thinking of the possibility to merge them into one, and make that one Universal.

At the moment I have 3 different Xcode targets with some code shared and some unique per platform. This allows me to keep iPhone-only code on the iPhone target, and iPad only code to the iPad, for example.

My question is if I can keep this 3 different targets and create 3 different builds but somehow put them under the same app in AppStoreConnect (I don't know how to do that)?

If the answer is no, I suppose I'd have to take the iPhone app, make it universal, and update my code to use the iPad's one instead. I currently use compiler conditionals like #if IS_IPAD_APP, I wonder if I could do a similar thing to avoid compiling iPhone code or assets into the iPad?

For Mac I believe I can submit a different bundle?

Thank you in advance!

Moving from different apps per platform to one Universal App
 
 
Q