I need to create a build of my macOS app every day at midnight. I would like it to be code signed so people can use it without jumping through hoops. I am asleep at midnight, and I'm too busy to do this manually. I would like to run xcodebuild via launch agent and get a signed application while away from the keyboard. But code signing always fails.
It fails with errors like:
No signing certificate "Mac Development" found: No "Mac Development" signing certificate matching team ID "H7V7XYVQ7D" with a private key was found.
It doesn't fail when I'm watching, which means it must have something to do with the keychain locking itself. I flailed around trying to fix this a while ago with no luck:
- https://github.com/gnachman/iTerm2/commit/f4082825f3dfa52db08d660ec4821ab6c5bca3f * c
- https://github.com/gnachman/iTerm2/commit/4cc902449549995d90da1856068e0f56640d55d1
- https://github.com/gnachman/iTerm2/commit/b84b5739fb2e0d3f89bade68467831891d31f79f
- https://github.com/gnachman/iTerm2/commit/29817cbb00d755c247c7071cfac7a6580f7b13b1
- https://github.com/gnachman/iTerm2/commit/3f33828b5740a764740c98801ff2d12b21d72e7b
- https://github.com/gnachman/iTerm2/commit/f4082825f3dfa52db08d660ec4821ab6c5bca3fc
But nothing works. Is this even possible?