Is there a way to run iOS binary directly on arm64 macOS?

I'm using C without Xcode to develop on iOS, right now my workflow is:
  • build with xcrun -sdk iphonesimulator clang

  • pack into an iOS .app bundle

  • use xcrun simctl commands to copy & run on a simulator

it works good but it'll be real nice if I can directly run the built binary somehow, if i just run it directly it just says

Code Block
% file app
app: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O executable arm_v7] [arm64:Mach-O 64-bit executable arm64]
app (for architecture armv7): Mach-O executable arm_v7
app (for architecture arm64): Mach-O 64-bit executable arm64
% ./app
zsh: killed ./app

as you see directly running does not work.

I see the iOS app downloaded from the macOS app store have the following structure that seem to make them directly runnable:
Code Block
iOSapp.app
├── WrappedBundle -> Wrapper/iOSapp.app
└── Wrapper
├── BundleMetadata.plist
├── iTunesMetadata.plist
└── iOSapp.app

but i failed to find any docs on these
You can't take an app for iOS and run it like this. You need to either build and run it directly from Xcode, or create and distribute an .ipa using the archive workflow in Xcode. With an .ipa file targeted for macOS through app thinning as part of the archive workflow, or a universal .ipa file created through that workflow, you can then double-click on it in Finder and the system will unpack it and install it in the Applications folder.
Is there a way to run iOS binary directly on arm64 macOS?
 
 
Q