Using Xcode Build to build a framework, mach-o binary and a package separately

I am building an interactive application. My application architecture looks like this:

  1. There will be a LoaderBinary that will load 1 or more shared libraries (.framework in this case). This is also where the entry point from an OS perspective lies.
  2. There will be 1 or more frameworks built. This framework is expected to have large part of my logic as shared code so that multiple flows like the application flow, widget, notifications etc can reuse code by loading this framework itself.

Now, I want to achieve the following:

  1. Building a framework independently - I believe this is doable and works fine too.
  2. Building a mach-o binary - This is what we are not clear if it is allowed or not to build just a mach-o binary ? Yes, there is an option to build a command-line tool but as this is an interactive binary, what should be the path to take ?
  3. Building a macOS bundle (.app) using 1 and 2 - Now, as I have a PRE-BUILT framework and a PRE-BUILT mach-o binary, can I create a application bundle using these ?

Some directions here will help to take this forward - in alignment with both my architecture as well as how Apple Build system works.

Thanks!

Using Xcode Build to build a framework, mach-o binary and a package separately
 
 
Q