gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 15:28:34 28 4
gpt4 key购买 nike

我已经安装了 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 Settings 并点击 组件 -> 模拟器 我没有看到 iOS 14 在列表中:
谁能帮我解决这个问题?

最佳答案

我在 Jenkins 上使用 Xcode 12 beta 构建了类似的问题。当我运行 xcrun simctl 列表 在终端与 Jenkins 用户,我看到

== 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 中找到正确的值

关于ios - Xcode 12 Beta - 找不到模拟器运行时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62875323/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com