xcode – 手动安装在模拟器中的应用程序在加载时崩溃

我正在使用xcrun simctl安装启动MyPath / MyApp.app在iOS模拟器( Xcode 7,iOS 9)上安装MyApp.

这是按预期工作,应用程序安装在模拟器上.

但是,手动启动应用程序或使用xcrun simctl启动启动com.company.MyApp失败.退回错误

An error was encountered processing the command
(domain=FBSOpenApplicationErrorDomain,code=1): The operation Couldn’t
be completed. (FBSOpenApplicationErrorDomain error 1.)

该应用程序从Xcode导出(请注意,从Xcode运行应用程序或从其源代码重新构建应用程序不是有责任的解决方案).

这不是应用程序特定的,因为任何以这种方式安装的应用程序都会出现相同的错误.

系统日志报告相同的错误,但有一些其他信息.

com.apple.CoreSimulator.SimDevice.CA35ED48-DDAA-4CF0-8C69-C206CC55A6EB.launchd_sim[4200]
(UIKitApplication:com.company.MyApp[0xe9ec][4281]): Program specified
by service does not contain one of the requested architectures: R

SpringBoard[4217]: Unable to get pid for
‘UIKitApplication:com.company.MyApp[0xe9ec]’: No such process (err 3)

SpringBoard[4217]: Bootstrapping Failed for

SpringBoard[4217]: Application
‘UIKitApplication:com.company.MyApp[0xe9ec]’ exited voluntarily.

SpringBoard[4217]: CGContextSaveGState: invalid context 0x0. If you
want to see the backtrace,please set CG_CONTEXT_SHOW_BACKTRACE
environmental variable.

SpringBoard[4217]: CGContextTranslateCTM: invalid context 0x0. If you
want to see the backtrace,please set CG_CONTEXT_SHOW_BACKTRACE
environmental variable.

SpringBoard[4217]: CGContextRestoreGState: invalid context 0x0. If you
want to see the backtrace,please set CG_CONTEXT_SHOW_BACKTRACE
environmental variable.

SpringBoard[4217]: CGContextSaveGState: invalid context 0x0. If you
want to see the backtrace,please set CG_CONTEXT_SHOW_BACKTRACE
environmental variable.

com.apple.CoreSimulator.SimDevice.CA35ED48-DDAA-4CF0-8C69-C206CC55A6EB.launchd_sim[4200]
(UIKitApplication:com.company.MyApp[0xc82f][4282]): Program specified
by service does not contain one of the requested architectures: R

SpringBoard[4217]: Unable to get pid for
‘UIKitApplication:com.company.MyApp[0xc82f]’: No such process (err 3)

SpringBoard[4217]: Bootstrapping Failed for

SpringBoard[4217]: Application
‘UIKitApplication:com.company.MyApp[0xc82f]’ exited voluntarily.

架构误差变化. R,f等

造成这个问题的原因是什么?我该怎么解决

解决方法

我也有同样的问题,但是使用Xamarin.在Visual Studio中,我通过转到iOS项目属性和“iOS Build”,将“支持的架构”从“i386”更改为“i386 x86_64”.

希望你可以适应XCode.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...