无法在模拟器 iOS 8 Xcode 6 中运行应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25806439/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:32:21  来源:igfitidea点击:

Can't run app in the simulator iOS 8 Xcode 6

iphonexcodeios8

提问by myexec

I receive the following error when trying to launch ios app in the iOS8 simulator:

尝试在 iOS8 模拟器中启动 ios 应用程序时收到以下错误:

9/12/14 1:32:02.953 PM com.apple.CoreSimulator.CoreSimulatorService[5355]: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x7fc63f406240 {Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /Users/myexec/Library/Developer/CoreSimulator/Devices/B21BB739-E031-41DA-9FF1-11DA4B4EB7B9/data/Library/Caches/com.apple.mobile.installd.staging/temp.zJ0bBq/extracted/Myapp.app/Frameworks/LiveSDK.framework}

9/12/14 1:32:02.953 PM com.apple.CoreSimulator.CoreSimulatorService[5355]:错误域=LaunchServicesError Code=0“操作无法完成。(LaunchServicesError 错误 0。)” UserInfo=0x7fc63f406240 {Error =PackageInspectionFailed, ErrorDescription=无法从路径 /Users/myexec/Library/Developer/CoreSimulator/Devices/B21BB739-E031-41DA-9FF1-11DA4B4EB7B9/data/Library/Caches/com.apple.mobile 处的包加载 Info.plist。 installd.staging/temp.zJ0bBq/extracted/Myapp.app/Frameworks/LiveSDK.framework}

I can't understand what is wrong. It runs with no problem on iOS 7.1 simulator.

我不明白出了什么问题。它在 iOS 7.1 模拟器上运行没有问题。

采纳答案by Guntis Treulands

Had the exact same problem. Was using shareKit. But I did not need that LiveSDK support. Thus, after hours of trying to find a solution, I simply put "livesdk" in search box (search in workspace) and removed every entry of it. Also - removed LiveSDK files from Sharekit. And problem disappeared. (Hopefully I will never need to add LiveSDK support).

有完全相同的问题。正在使用 shareKit。但我不需要 LiveSDK 支持。因此,经过数小时的尝试寻找解决方案后,我只是将“livesdk”放在搜索框中(在工作区中搜索)并删除了它的每个条目。此外 - 从 Sharekit 中删除了 LiveSDK 文件。问题消失了。(希望我永远不需要添加 LiveSDK 支持)。

回答by dirkoneill

Even after removing ShareKit I was still seeing this issue. What finally fixed it for me was holding down the Option key and then choosing Product > Clean Build Folder

即使在删除 ShareKit 之后,我仍然看到这个问题。最终为我修复的是按住 Option 键,然后选择 Product > Clean Build Folder

回答by gunas

Launch the iphone simulator then go to simulator->reset contents and settings. Then,quit all the application and restart your mac.

启动 iphone 模拟器,然后转到模拟器-> 重置内容和设置。然后,退出所有应用程序并重新启动您的 mac。

回答by Kunal Gupta

Cleaning the build folder resolved the issue for me. I hope it helps someone!

清理构建文件夹为我解决了这个问题。我希望它可以帮助某人!

(While holding down the Alt-key: Product > Clean build folder)

(同时按住 Alt 键:产品 > 清理构建文件夹)

回答by mask8

People who do not want to remove ShareKit or LiveSDK, here is another workaround I did. I could copy(link) the Info.plist for LiveSDK.framework to resolve this issue. What all I did was:

不想删除 ShareKit 或 LiveSDK 的人,这是我做的另一种解决方法。我可以复制(链接)LiveSDK.framework 的 Info.plist 来解决这个问题。我所做的是:

ln -s Pods/ShareKit/Frameworks/LiveSDK.framework/Versions/Current/Resources/Info.plist Pods/ShareKit/Frameworks/LiveSDK.framework/

by the way, I installed ShareKit by CocoaPods.

顺便说一下,我安装了 CocoaPods 的 ShareKit。

回答by rahulchona

I have just went through this issue, and figured out that this issue is related to memory usage.

我刚刚经历了这个问题,并发现这个问题与内存使用有关。

To get rid of this : try following ways:- Clean your project

要摆脱这个:尝试以下方法:- 清理你的项目

  • Restart Simulator and/or Xcode

  • Check your code, if there are some lines of code utilising high memory.

  • Or, your systems start-up memory is almost full: try free up some space.

  • Lastly, if nothing works restart your system. (This worked for me).

  • 重新启动模拟器和/或 Xcode

  • 检查您的代码,是否有一些代码行占用了高内存。

  • 或者,您的系统启动内存几乎已满:尝试释放一些空间。

  • 最后,如果没有任何效果,请重新启动系统。(这对我有用)。

Regards

问候

回答by Lazar Kukolj

For me, I quit the simulator and then built the code again and it worked perfectly

对我来说,我退出模拟器,然后再次构建代码,它运行良好

回答by Zaid Pathan

Try reseting simulator worked for me,

尝试重置对我有用的模拟器,

Simulator > Reset Content and Settings... > Reset

Simulator > Reset Content and Settings... > Reset