离子模拟ios(domain = com.apple.CoreSimulator.SimError,code = 163) [英] ionic emulate ios (domain=com.apple.CoreSimulator.SimError, code=163)

查看:1070
本文介绍了离子模拟ios(domain = com.apple.CoreSimulator.SimError,code = 163)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用命令 ionic emulate ios 来模拟一个带离子的项目。我在mac Sierra上安装了xcode最新版本。但没有工作。这是错误:

I am trying to simulate a project with ionic using the command ionic emulate ios. I have installed xcode last version on mac Sierra. But no work. this is the error:

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-SE, 10.2 simulator


An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown

An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown

Error: ENOENT: no such file or directory, stat '/var/root/Library/Logs/CoreSimulator/4A052961-F773-4156-9D6C-76F137CC761B/system.log'

我找到了这个解决方案( https://forums.developer.apple.com/thread/66665 )但对我没用。

I found this solution(https://forums.developer.apple.com/thread/66665) but no work for me.

推荐答案

https://cordova.apache.org / docs / en / latest / guide / platforms / ios /

在Xcode中打开一个项目
Co用于iOS项目的rdova可以在Xcode中打开。如果您希望使用内置调试/分析工具中的Xcode,或者您正在开发iOS插件,这将非常有用。请注意,在Xcode中打开项目时,建议您不要在IDE中编辑代码。这将编辑项目的平台文件夹(而不是www)中的代码,并且更改可能会被覆盖。相反,编辑www文件夹并通过运行cordova build复制您的更改。

Open a Project within Xcode Cordova for iOS projects can be opened in Xcode. This can be useful if you wish to use Xcode built in debugging/profiling tools or if you are developing iOS plugins. Please note that when opening your project in Xcode, it is recommended that you do NOT edit your code in the IDE. This will edit the code in the platforms folder of your project (not www), and changes are liable to be overwritten. Instead, edit the www folder and copy over your changes by running cordova build.

希望在IDE中编辑其本机代码的插件开发人员应使用--link标志通过cordova插件添加他们的插件到项目。这将链接文件,以便对平台文件夹中的插件文件的更改反映在插件的源文件夹中(反之亦然)。

Plugin developers wishing to edit their native code in the IDE should use the --link flag when adding their plugin to the project via cordova plugin add. This will link the files so that changes to the plugin files in the platforms folder are reflected in your plugin's source folder (and vice versa).

添加ios平台后对于您的项目并使用cordova构建,您可以在Xcode中打开它。双击打开$ {PROJECT_NAME} / platforms / ios / $ {PROJECT_NAME} .xcodeproj文件。屏幕应如下所示:

Once the ios platform is added to your project and built using cordova build, you can open it from within Xcode. Double-click to open the ${PROJECT_NAME}/platforms/ios/${PROJECT_NAME}.xcodeproj file. The screen should look like this:

https://cordova.apache.org/static/img/guide/platforms/ios/helloworld_project.png

然后按照说明部署到模拟器:

Then follow the instructions to deploy to a simulator:

https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#deploying-to-simulator

您将能够更清楚地看到错误。
在我的情况下,这是一个无法匹配的资源文件的问题。我只是删除了它。

You will be able to see errors more clearly. In my case it was the problem of an unmatched resource file. I simply deleted it.

在此之后,我尝试了:

sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config


$ b在终端中$ b

并且能够在模拟器中运行应用程序

in terminal and was able to run the app in a simulator

这篇关于离子模拟ios(domain = com.apple.CoreSimulator.SimError,code = 163)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆