解决Jenkins分布式编译iOS代码时,出现"User interaction is not allowed"

来源:互联网 发布:java 继承泛型类 编辑:程序博客网 时间:2024/05/16 09:14
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 errorUser 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:
security unlock-keychain  -p "你的用户密码" ~/Library/Keychains/login.keychain

Now the build should pass. Then remove above line, you never need it. Done.
原创粉丝点击