Post

Replies

Boosts

Views

Activity

Reply to Xcode 12 Beta Simulator Runtime not available
I'm assuming that this "Known Issue" from Xcode 12.2 release notes is the same as the issue we are discussing here. Known Issues Simulators may not be available when running command-line tools like simctl or xcodebuild from a non-root LaunchDaemon, or when launching as a different user from the current user (for example, with sudo or launchctl). (62188195) https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-release-notes
Nov ’20
Reply to Xcode 12 Beta Simulator Runtime not available
Same problem here when building on Jenkins CI. The jenkins node is launched through a launchd daemon. /Library/LaunchDaemons/org.jenkins-ci.node.jnlp.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> &#9;&#9;&#9;&#9;<key>KeepAlive</key> &#9;&#9;&#9;&#9;<true/> &#9;&#9;&#9;&#9;<key>Label</key> &#9;&#9;&#9;&#9;<string>org.jenkins-ci.node.jnlp</string> &#9;&#9;&#9;&#9;<key>ProgramArguments</key> &#9;&#9;&#9;&#9;<array> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<string>/bin/bash</string> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<string>/Users/user/jenkins/node.jnlp.sh</string> &#9;&#9;&#9;&#9;</array> &#9;&#9;&#9;&#9;<key>RunAtLoad</key> &#9;&#9;&#9;&#9;<true/> &#9;&#9;&#9;&#9;<key>SessionCreate</key> &#9;&#9;&#9;&#9;<true/> &#9;&#9;&#9;&#9;<key>StandardErrorPath</key> &#9;&#9;&#9;&#9;<string>/Users/user/jenkins/org.jenkins-ci.node.jnlp.stdout.log</string> &#9;&#9;&#9;&#9;<key>StandardOutPath</key> &#9;&#9;&#9;&#9;<string>/Users/user/jenkins/org.jenkins-ci.node.jnlp.stderr.log</string> &#9;&#9;&#9;&#9;<key>UserName</key> &#9;&#9;&#9;&#9;<string>user</string> &#9;&#9;&#9;&#9;<key>WorkingDirectory</key> &#9;&#9;&#9;&#9;<string>/Users/user/jenkins</string> </dict> </plist> Loading this as root gives us the failure as previous posters (Unable to open liblaunch_sim.dylib): sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.node.jnlp.plist But instead loading without sudo when running as the user specified by UserName everything passes: launchctl load /Library/LaunchDaemons/org.jenkins-ci.node.jnlp.plist Though my understanding is that the UserName key will run the script as the same user as my second example. I just don't have enough understanding of launchd to figure out how to solve the issue...
Sep ’20