这周我无法启动我的模拟器,我尝试了一些文章中的几种解决方案,但它不起作用。我的 MacOS 版本是 OS X 10.10.5 (14F27),我的模拟器是 iOS 8.4。
我从 ~/Library/Logs/CoreSimulator/CoreSimulator.log 抓取日志
Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.SystemConfiguration.PPPController: launch_sim_register_endpoint: 0xfffffecc Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.audio.audiohald: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.FSEvents: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.SystemConfiguration.configd: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service IndigoHIDRegistrationPort: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service PurpleFBTVOutServer: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service PurpleFBServer: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fbb204683f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fbb204683f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb20808710 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error looking up host support port Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Invalid device state" UserInfo=0x7fbb2083b420 {NSLocalizedDescription=Invalid device state} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb2080c350 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb2080c350 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local com.apple.iphonesimulator[8330] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fda2a9020f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb20b0f850 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error looking up host support port Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Invalid device state" UserInfo=0x7fbb20b00e20 {NSLocalizedDescription=Invalid device state}
有人对此有任何想法吗?
我会很感激的!
最后,我在@Jeremy Huddleston Sequoia 的帮助下解决了这个问题。一开始,我在网上尝试了很多解决方案,包括删除/private/tmp 文件夹。所以导致无论我清理多少次重新安装模拟器,它都不起作用。所以要小心这个
最佳答案
这些错误表明 launchd_sim 未加载或未运行,看门狗触发以通知您失败。
如果您在 OS X 10.10.5 中禁用 AMFI,Simulator 运行时将无法使用,它会像这样显示。
但是,在您的情况下,launchd_sim 在启动时崩溃了。崩溃日志表明它在尝试在/private/tmp 中创建其状态目录时遇到错误。
这可能发生在您删除/private/tmp(或错误地重新创建它)时。要创建/private/tmp,请执行以下操作:
sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp
关于ios - 删除/private/tmp 后无法启动 iOS 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32239906/
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我想安装一个带有一些身份验证的私有(private)Rubygem服务器。我希望能够使用公共(public)Ubuntu服务器托管内部gem。我读到了http://docs.rubygems.org/read/chapter/18.但是那个没有身份验证-如我所见。然后我读到了https://github.com/cwninja/geminabox.但是当我使用基本身份验证(他们在他们的Wiki中有)时,它会提示从我的服务器获取源。所以。如何制作带有身份验证的私有(private)Rubygem服务器?这是不可能的吗?谢谢。编辑:Geminabox问题。我尝试“捆绑”以安装新的gem..
我有一个对象has_many应呈现为xml的子对象。这不是问题。我的问题是我创建了一个Hash包含此数据,就像解析器需要它一样。但是rails自动将整个文件包含在.........我需要摆脱type="array"和我该如何处理?我没有在文档中找到任何内容。 最佳答案 我遇到了同样的问题;这是我的XML:我在用这个:entries.to_xml将散列数据转换为XML,但这会将条目的数据包装到中所以我修改了:entries.to_xml(root:"Contacts")但这仍然将转换后的XML包装在“联系人”中,将我的XML代码修改为
查看Ruby的CSV库的文档,我非常确定这是可能且简单的。我只需要使用Ruby删除CSV文件的前三列,但我没有成功运行它。 最佳答案 csv_table=CSV.read(file_path_in,:headers=>true)csv_table.delete("header_name")csv_table.to_csv#=>ThenewCSVinstringformat检查CSV::Table文档:http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV/Table.html
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
是的,我知道最好使用webmock,但我想知道如何在RSpec中模拟此方法:defmethod_to_testurl=URI.parseurireq=Net::HTTP::Post.newurl.pathres=Net::HTTP.start(url.host,url.port)do|http|http.requestreq,foo:1endresend这是RSpec:let(:uri){'http://example.com'}specify'HTTPcall'dohttp=mock:httpNet::HTTP.stub!(:start).and_yieldhttphttp.shou
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳