Running xcodebuild from a forked terminal

前端 未结 13 1211
说谎
说谎 2020-12-02 04:20

I\'m trying to setup an automated build server for an iPhone application. I\'d like to be able to have nightly adhoc beta builds so that testers can follow the development.<

13条回答
  •  广开言路
    2020-12-02 04:59

    update for people running into similar issues with Jenkins:

    If you set up your Mac to launch jenkins via LaunchDaemons, you need to make sure to add

    SessionCreate
    
    

    So the whole ci.plist would look like so:

    
    
    
    
     Label
     Jenkins
     UserName
     user
     GroupName
     staff
     ProgramArguments
     
     /usr/bin/java
     -Xmx512m
     -jar
     /path/to/jenkins/jenkins.war
     
     RunAtLoad
     
     KeepAlive
     
     EnvironmentVariables
       
         JENKINS_HOME
         /path/to/jenkins/home
       
     SessionCreate
     
    
    
    

    I've been stuck wit the same issue as many people above have. Specifically I experienced the issue when running from a Jenkins shell script I got the same ** User interaction is not allowed ** error. When running from an ssh shell, my script worked fine.

    The difference that most people have also seen is that if you run security list-keychain you'd get:

    $ security list-keychain
      "/Library/Keychains/System.keychain"
      "/Library/Keychains/System.keychain"
    

    But when running in the ssh shell, I'd get:

    $ security list-keychain
        "/Users/user_account_name/Library/Keychains/login.keychain"
        "/Library/Keychains/System.keychain"
    

    And most people will have all their keys/certs etc. in the user account keychain. Like some folks suggested it's easy to make a new key chain that is distinct from the user key chain, and reseve it for your XCode signing stuff. I ended up putting mine here: /Library/Keychains/sysiphone.keychain

    I think the issue is that for my setup (and possibly for yours too), you're running in a different security preference domain (system vs. user). Finally -- here is how I got my sysiphone.keychain to show up:

    $ sudo security list-keychains -d system -s "/Library/Keychains/sysiphone.keychain"
    Password: *****
    $ security list-keychains -d system
        "/Library/Keychains/sysiphone.keychain"
    

    ... and magically things started to build in Jenkins. Wow... that was about 4 hours down the drain for me. Sigh.

提交回复
热议问题