When you build xcode project with a distribution provision profile in order to push to test flight, you may keep getting the error,
User interaction is not allowed when code signing
You go to the build machine, open terminal and run the job and you will see a security window popup to ask if allow to use the key chain. Select Alway Allow. Since then, run from the terminal will never get the pop-up.
However, you build may still get the error
User interaction is not allowed. Because the build use different terminal environment which has different security setting. You cannot see the pop-up before when the build is running. Bad.
To solve this issue, add one line command in your build script before do code signing:
To solve this issue, add one line command in your build script before do code signing:
security unlock-keychain -p "
你的用户密码
" ~/Library/Keychains/login.keychain
Now the build should pass. Then remove above line, you never need it. Done.