I don't think this is documented, but when I asked about it was told by an Apple employee that this is a result of caching behavior. Copying it to a new location and then back dirties the cache and allows codesign to work. I still think this is a bug that should be fixed (at a minimum provide better messaging), but that Feedback remains open.
Post
Replies
Boosts
Views
Activity
Thanks for you answer. I did my best to follow your advice in filing FB8968653.
The new one is FB8919769, the original (about different copies of the same app) is FB8806330.
https://developer.apple.com/videos/play/wwdc2020/10686/ provides the following code sample:
// Use "sysctl.proc_translated" to check if running in Rosetta
// Returns 1 if running in Rosetta
int processIsTranslated() {
	 int ret = 0;
	 size_t size = sizeof(ret);
	 // Call the sysctl and if successful return the result
	 if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) != -1)
			return ret;
	 // If "sysctl.proc_translated" is not present then must be native
	 if (errno == ENOENT)
			return 0;
	 return -1;
}
I am not the account holder, I am just listed as a Developer on the corporate account, and I have access to the private forum. So I would think it's just a matter of being formally invited to join the "team" in order to get those privileges. (Not being an account holder, I can give instructions on how to invite someone. I presume there's a button somewhere on App Store Connect.)
This session https://developer.apple.com/wwdc20/10686 mentions arm64e. I believe it requires special special boot arguments to work for non-Apple processes. They say that they're not ready for non-Apple developers to adopt it yet.