Xcode - mixed platforms

Has anyone ever created an Xcode project (Swift or ObjC) that was a single project file, but could be compiled for iOS, macOS or AppleTV… or do you have to have platform specific “projects”, and share files contains non-platform specific code?

Cant say I have

EDIT : Does adding a new target to your Xcode project let you fo this ?

if you use iOS SDK for all (Catalyst on macOS), then you can have one project.

That seems to be the approach… just not sure how to implement it… .I can add AppleTV as a target, but it doesn’t show a simulator option

I realize you were trying to help… but knowing it can be done, and knowing the method to achieve it are not the same thing… And I doubt Catalyst would be the only way to add macOS (I want a native app for each, not to mention am not using Catalina)

Well, I do have an Xcode project with multiple targets here and one target is macOS with Mac SDK, a second target for iOS with device and a third with iOS for simulator.
You can just add new target to the project.