Hi,
So my app (which is a mix of C++ and Objective-C) is still not a universal build since it has a lot of C++ dependencies that need to be recompiled first.
I'm using a NSTask to launch other processes from my app. Unfortunately the subprocess (even when the binary is universal) is launched via Rosetta and not natively (so the same as my app).
What's the best solution to control the architecture of a spawned subprocess?
Thanks.
the subprocess … is launched via Rosetta and not natively
That’s expected. Once you’re in ‘Rosetta mode’, you stay in that mode.
There are a couple of ways to resolve this:
-
Switch to
posix_spawn, which lets you select the architecture usingposix_spawnattr_setarchpref_np. -
Bounce through the
archcommand-line tool.
Personally, I’d probably do the latter (-:
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"