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!

The setup you’re proposing is probably feasible but I’d definitely considering it to be ‘fighting the framework’ (well, fighting the developer tool). Is there a specific reason you need to build the app’s executable separately from the app bundle? Why not build the executable from source? That is, merge steps 2 and 3?

That’s how most Xcode projects work and it’s very much the well trodden path. And that means that certain Xcode functionality expects things to work this way. For example, if you tried to do this by creating a generic bundle target and placing your pre-built executable in that bundle, you’ll miss out on a bunch of cool app-specific functionality, most notable the stuff in the Signing & Capabilities editor.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

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