Xcode 12 Beta - 找不到模拟器运行时

2024-02-14

我已经安装了 Xcode 12 beta 2。我尝试通过 Mac OS Catalina 上的 Jenkins 运行我们的 xamarin 项目。它失败并出现以下错误。当我从 Mac Visual studio 构建相同的项目时,它成功了,没有任何错误。

SplashViewController.storyboard : error :
 iOS 14.0 (14.0 - 18A5319g) - com.apple.CoreSimulator.SimRuntime.iOS-14-0 (unavailable, failed to open liblaunchsim.dylib) ==> not available:
  Error Domain=com.apple.CoreSimulator.SimError Code=401 "The iOS 14.0 simulator runtime is not available."
  UserInfo={NSLocalizedDescription=The iOS 14.0 simulator runtime is not available.,
   NSUnderlyingError=0x7fef8847b520 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort"
  UserInfo={NSLocalizedFailureReason=XPC error talking to SimLaunchHostService: <error: 0x7fff97d649a0> { count = 1, transaction: 0, voucher = 0x0,_

我也做了xcrun simctl list查看 Xcode 12 beta 的可用运行时模拟器。 它显示以下列表,但在构建时失败。

== 运行时间 ==

iOS 14.0 (14.0 - 18A5319g) -
com.apple.CoreSimulator.SimRuntime.iOS-14-0
tvOS 14.0 (14.0 - 18J5331g) -
com.apple.CoreSimulator.SimRuntime.tvOS-14-0
watchOS 7.0 (7.0 - 18R5327h) -
com.apple.CoreSimulator.SimRuntime.watchOS-7-0

== 设备 ==

当我打开 Xcode 设置并单击组件 -> 模拟器我没有看到iOS 14在列表中:

谁能帮我解决这个问题?


我在 Jenkins 上使用 Xcode 12 beta 构建时也遇到类似的问题。当我跑步时xcrun simctl 列表在詹金斯用户的终端中,我看到

== Runtimes ==
iOS 14.0 (14.0 - 18A5351d) - com.apple.CoreSimulator.SimRuntime.iOS-14-0
tvOS 14.0 (14.0 - 18J5364d) - com.apple.CoreSimulator.SimRuntime.tvOS-14-0
watchOS 7.0 (7.0 - 18R5361c) - com.apple.CoreSimulator.SimRuntime.watchOS-7-0

但是如果我将相同的 simctl 命令由 Jenkins 作业执行,结果是

== Runtimes ==
iOS 14.0 (14.0 - 18A5351d) - com.apple.CoreSimulator.SimRuntime.iOS-14-0 (unavailable, failed to open liblaunch_sim.dylib)
tvOS 14.0 (14.0 - 18J5364d) - com.apple.CoreSimulator.SimRuntime.tvOS-14-0 (unavailable, failed to open liblaunch_sim.dylib)
watchOS 7.0 (7.0 - 18R5361c) - com.apple.CoreSimulator.SimRuntime.watchOS-7-0 (unavailable, failed to open liblaunch_sim.dylib)

虽然我找不到解决方案,但我找到了解决方法。如果我阻止 Jenkins 作为启动守护进程运行并从终端手动启动它,则 Xcode beta 版本可以正常运行。

# Stop Jenkins
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

# Impersonate jenkins user
sudo su - jenkins

# Tell Jenkins where its home dir is located
export JENKINS_HOME=/Users/Shared/Jenkins/Home

# Start Jenkins instance
/Library/Application\ Support/Jenkins/jenkins-runner.sh

以上所有路径均为默认路径。如果您的值恰好不同,您可能会在文件 /Library/LaunchDaemons/org.jenkins-ci.plist 中找到正确的值

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Xcode 12 Beta - 找不到模拟器运行时 的相关文章

随机推荐