当我运行emulate ios时,我通过ionic sidemenu应用程序得到了以下错误:
Usage of '--family' is deprecated in 3.x. Use --devicetypeid instead.
Usage of '--retina' is deprecated in 3.x. Use --devicetypeid instead.
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out." UserInfo=0x7f91f97358b0 {NSLocalizedDescription=Simulator session timed
黑屏是为模拟器而来
这些是我的mac信息: yosemite 10.10 ios-sim版本3.0.0 cordova版本3.6.3-0.2.13 ionic版本1.2.6-beta1 xcode 6.1
发布于 2014-12-06 19:27:49
我终于找到了一个解决方案来解决这个问题,首先设置你的应用程序:
1- ionic start myAppname标签
2- cd myAppname
3离子平台添加iOS
4离子构建ios
然后在项目目录中创建一个名为emulator.sh或其他名称的文件,并复制以下代码的内容:
echo "Emulating..."
cd ./platforms/ios/build/emulator
var=$(pwd)
ios-sim launch "$var"/*.app
设置脚本权限:$sudo chmod777 emulator.sh
每当您想要模拟您的应用程序时,运行脚本:./emulator.sh
因此,通过使用此脚本,您不需要在Xcode中手动打开项目并运行项目
特别感谢Miroslav
发布于 2014-09-28 15:27:38
https://stackoverflow.com/questions/26014035
复制相似问题