xcode 模拟器安装应用程序失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5111937/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Simulator Failed to Install Application
提问by TowBoat911
I've been working on my app over the past few days and I've always been able to simulate it. Today, I compiled and ran, got no errors or warnings, but on the bottom of XCode there is a message saying
过去几天我一直在开发我的应用程序,而且我总是能够模拟它。今天,我编译并运行,没有错误或警告,但在 XCode 底部有一条消息说
> Error From Debugger: Failed to launch
> simulated application: iOS Simulator
> failed to install application
This is the Internal error window that pops up after trying to "build and go" once again,
这是再次尝试“构建并运行”后弹出的内部错误窗口,
File: /SourceCache/IndigoDebuggingPlugin/IndigoDebuggingPlugin-44/iPhoneSimulatorDevice/XCiPhoneSimulatorDevice.m Line: 341 Object: Method: _launchSimulatedExecutable:
Assertion failed: nil == _currentSimulatorSession
文件:/SourceCache/IndigoDebuggingPlugin/IndigoDebuggingPlugin-44/iPhoneSimulatorDevice/XCiPhoneSimulatorDevice.m 行:341 对象:方法:_launchSimulatedExecutable:
断言失败:nil == _currentSimulatorSession
I looked for help around the internet and I've tried deleting my build folder manually, cleaning and building, and I've just recently completely reinstalled XCode and the whole SDK.
我在互联网上寻求帮助,我尝试手动删除我的构建文件夹,清理和构建,我最近刚刚完全重新安装了 XCode 和整个 SDK。
Also when quitting XCode with this project open, it gives me this in an error message:
此外,在打开此项目的情况下退出 XCode 时,它会在错误消息中给我以下信息:
Failed to close project
Reason: ASSERTION FAILURE in /SourceCache/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient-18/Source/DTiPhoneSimulatorSession.m:147 Details: requestEndWithTimeout: called on failed session. Object:
Method: -requestEndWithTimeout: Thread: {name = (null), num = 1} Backtrace: 0 0x00043888 -[DTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsFoundation) 1 0x00043518 _DTAssertionFailureHandler (in DevToolsFoundation) 2 0x1e06f807 -[DTiPhoneSimulatorSession requestEndWithTimeout:] (in iPhoneSimulatorRemoteClient) 3 0x1d8a5ca9 4 0x00826b95 -[PBXDebugSessionModule stopLaunchSession] (in DevToolsInterface) 5 0x008243c8 -[PBXDebugSessionModule closeModule] (in DevToolsInterface) 6 0x9973017d -[NSArray makeObjectsPerformSelector:] (in CoreFoundation) 7 0x0077f6ea -[PBXModule closeModule] (in DevToolsInterface) 8 0x9973017d -[NSArray makeObjectsPerformSelector:] (in CoreFoundation) 9 0x0077f6ea -[PBXModule closeModule] (in DevToolsInterface) 10 0x9973017d -[NSArray makeObjectsPerformSelector:] (in CoreFoundation) 11 0x0099a188 -[XCPerspectivesSpecification closeAllModules] (in DevToolsInterface) 12 0x9973017d -[NSArray makeObjectsPerformSelector:] (in CoreFoundation) 13 0x0076468e -[PBXProjectDocument mainModuleShouldClose:] (in DevToolsInterface) 14 0x00998bf6 -[XCPerspectiveModule windowShouldClose:] (in DevToolsInterface) 15 0x000099a1 16 0x00007297 17 0x95b8d522 -[NSApplication _docController:shouldTerminate:] (in AppKit) 18 0x95b8d048 -[NSDocumentController(NSInternal) _continueTerminationHavingClosedAllDocuments:context:] (in AppKit) 19 0x95b8ce26 -[NSDocumentController(NSInternal) _shouldTerminateWithDelegate:shouldTerminateSelector:] (in AppKit) 20 0x95b8c6ff -[NSApplication _shouldTerminate] (in AppKit) 21 0x95b8c271 -[NSApplication te
关闭项目失败
原因:断言失败 /SourceCache/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient-18/Source/DTiPhoneSimulatorSession.m:147 详细信息:requestEndWithTimeout:调用失败的会话。目的:
方法:-requestEndWithTimeout:线程:{name = (null), num = 1} Backtrace: 0 0x00043888 -[DTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsFoundation) 1 0x00043518 DevToolsFoundation) 0x1e06f807 - [DTiPhoneSimulatorSession requestEndWithTimeout:](在iPhoneSimulatorRemoteClient)3 0x1d8a5ca9 4 0x00826b95 - [PBXDebugSessionModule stopLaunchSession](在DevToolsInterface)5 0x008243c8 - [PBXDebugSessionModule closeModule](在DevToolsInterface)6 0x9973017d - [NSArray的makeObjectsPerformSelector:](在的CoreFoundation)7 0x0077f6ea - [PBXModule closeModule](在 DevToolsInterface 中)8 0x9973017d -[NSArray makeObjectsPerformSelector:] (在 CoreFoundation 中) 9 0x0077f6ea -[PBXModule closeModule] (在 DevToolsInterface 中) 10 0x9973017d -[NSArray makeObjectsPerformSelector:] (在 CoreFoundation 中) 11 0x0099a188 -[XCPerspectives9DevTools10000xCPerspectives20DevToolsInterface 中的关闭 (DevToolsInterface) 10 0x9973017d -[NSArray makeObjectsPerformSelector:] )13 0x0076468e - [PBXProjectDocument mainModuleShouldClose:](在DevToolsInterface)14 0x00998bf6 - [XCPerspectiveModule windowShouldClose:](在DevToolsInterface)15 0x000099a1 16 0x00007297 17 0x95b8d522 - [的NSApplication _docController:shouldTerminate:](在AppKit框架)18 0x95b8d048 - [NSDocumentController(NSInternal ) _continueTerminationHavingClosedAllDocuments:context:] (在 AppKit 中) 19 0x95b8ce26 -[NSDocumentController(NSInternal) _shouldTerminateWithDelegate:shouldTerminateSelector:](在 AppKit 中)20 0x95b8c6ff -[NSApplication _shouldTerminate](在 AppKit 中)21 0x95b8c271 -[NSApplication te
I have no idea what to do next, any help would be appreciated.
我不知道接下来要做什么,任何帮助将不胜感激。
回答by tobinjim
I was encountering this when trying to test my app in the simulator. Xcode 5, app is for iOS 5.1 up through current iOS 7.0.2 -- Xcode could build and run on the iOS 7 simulator, but would fail to install the app on the iOS 6.1 simulator. My steps to fix this were
我在模拟器中测试我的应用程序时遇到了这个问题。Xcode 5,应用程序适用于 iOS 5.1 到当前的 iOS 7.0.2 -- Xcode 可以在 iOS 7 模拟器上构建和运行,但无法在 iOS 6.1 模拟器上安装应用程序。我解决这个问题的步骤是
- Search stackoverflow and read all the comments on this question;
- Have the iOS Simulator show the system log and watch the log when Xcode tried to build and run on the iOS 6.1 simulator;
- Notice this important message in the log:
installd[1106]: 0xb0115000 delta_copy: Problem copying package delta
- Go to iOS Simulator and delete the iOS 7 version of the app from the "device" (long press on app icon followed by clicking on the (X) removal tab),
- Build and run successfully with the simulator.
- 搜索 stackoverflow 并阅读有关此问题的所有评论;
- 当 Xcode 尝试在 iOS 6.1 模拟器上构建和运行时,让 iOS 模拟器显示系统日志并查看日志;
- 请注意日志中的这条重要消息:
installd[1106]: 0xb0115000 delta_copy: Problem copying package delta
- 转到 iOS 模拟器并从“设备”中删除 iOS 7 版本的应用程序(长按应用程序图标,然后单击 (X) 删除选项卡),
- 使用模拟器构建并成功运行。
回答by Khaled Annajar
In the simulator application choose ios simulator menu then choose reset Content and settings. This should do.
在模拟器应用程序中选择 ios 模拟器菜单,然后选择重置内容和设置。这个应该可以。
回答by Catalina P
I had the same problem, and after a couple of hours I looked at the Info.plist file as plain text. For some reason, the CFBundleIdentifier value was changed, having the text of some code signing error appended to it. I removed that and everything went back to normal. I hope this will help someone.
我遇到了同样的问题,几个小时后,我将 Info.plist 文件视为纯文本。出于某种原因,CFBundleIdentifier 值已更改,附加了一些代码签名错误的文本。我删除了它,一切都恢复正常。我希望这会帮助某人。
回答by Michael T.
I had this happen before.
我以前也遇到过这种情况。
Turned out that my target was copying the main info.plist file into the bundle resources. When I unchecked the info.plist, everything worked fine.
原来我的目标是将主要的 info.plist 文件复制到包资源中。当我取消选中 info.plist 时,一切正常。
That said, I think there are many things that will cause this problem.
也就是说,我认为有很多事情会导致这个问题。
回答by Locke
I was having the same issue and turned out that @Michael was right.
我遇到了同样的问题,结果@Michael 是对的。
I recently recreated my Xcode project (Now I'm using Xcode 5.1) and added Info.plist and localized resources (like en.proj) to the 'Resources' group, and that was the problem.
我最近重新创建了我的 Xcode 项目(现在我使用的是 Xcode 5.1)并将 Info.plist 和本地化资源(如 en.proj)添加到“资源”组,这就是问题所在。
I followed other instructions like resetting Simulator contents and settings, setting shot BundleId, removing apps but the problem happened again and again. I had to delete my app every time I run the app and it was very annoying.
我按照其他说明进行操作,例如重置模拟器内容和设置、设置镜头 BundleId、删除应用程序,但问题一次又一次地发生。每次运行应用程序时,我都必须删除我的应用程序,这非常烦人。
Just removing those files from 'Resources' solved the problem.
只需从“资源”中删除这些文件即可解决问题。