One of our small apps runs on phones, a tablet and a Mac. On the Mac it is the iPad build, sitting inside a wrapper bundle in an applications folder. Updating it had become a routine: build the new version, then swap the inner app inside the wrapper for the new one. That night the phones and the tablet updated cleanly. The Mac copy was swapped the same way, its signature passed codesign --verify --deep --strict, and the provisioning profile included this Mac. Then it would not open.

An error that only described the surface

Opening it from the shell failed with “Launchd job spawn failed” (162), the same error seen when the app was last updated on Nov 12. That did not settle much: another wrapper app on the same Mac also failed to open from the shell, with a different error (-10673), so the shell could not tell us whether the app was broken or the shell environment was. A launch through Finder by script finished without an error, but no process appeared and the app never called its server.

Finder could not open it either. The crash report was the first thing that named a cause: SIGKILL, “Code Signature Invalid,” with the reason listed as a launch constraint violation. macOS was killing the app at launch. There was an identical report from Nov 17, so the copy put in place on Nov 12 had apparently not been opening since then. The 162 in the shell was just how that kill looked from outside.

The next step was a comparison. An older archived copy, placed at a new path, opened from Finder. Then the new build, inside a wrapper at a new path, opened too. So the build, the signature and the profile were not the problem. What differed was the location and how it had been filled: an inner app swapped in place inside a wrapper that had been there before.

What changed, and what is still a guess

The fix was to put down a whole new wrapper instead of swapping the inside, and then re-register it with Launch Services using lsregister -f. At 02:33:31 the app launched and its server saw requests answered with 200. On a later check, the process started at 02:33 was still running at 03:20; after quitting it, a fresh launch through Finder also worked, and no new crash report appeared.

Our reading is that replacing only the inner app left the wrapper at that path still tied to the old binary, and macOS refused the new one. That is an interpretation, not a measured fact. Two things changed at once — a new wrapper and a forced re-registration — and we did not test them separately, so we do not know which one mattered. The update procedure now does both: replace the whole wrapper, then re-register. Launches are now checked through Finder, crash reports and server logs, not by trusting what the shell’s open says.

A clean signature check says the files are signed correctly. It does not say the system will agree to run them from where they sit. When an app will not open, find the record of the kill before you trust the error the launcher printed.