What I do for my own projects is I have a second hard drive attached to my Macintosh on which I have installed various (clean) versions of MacOS with no Xcode or extra frameworks hidden in /usr/local/lib, /usr/lib, etc.
That way you can try your app out in a relatively clean environment, and if your app writes lots of files or installs things in System places, it's easy to reinstall MacOS and get a pristine set-up again without messing up your main development hard drives.