简体   繁体   English

XCode - Iphone 项目无法在 iphone 模拟器上运行?

[英]XCode - Iphone project cannot run on iphone simulator?

Something happened to my XCode Project.我的 XCode 项目出了点问题。

On top left side of XCode 4 where you can specify what device/simulator you want to run your app on it does not show any iphone/ipad related target.在 XCode 4 的左上角,您可以指定要在其上运行应用程序的设备/模拟器,它不显示任何与 iphone/ipad 相关的目标。 It shows "My Mac 64-bit"它显示“我的 Mac 64 位”

How can I fix this problem?我该如何解决这个问题?

Thanks谢谢

I figured it out.我想到了。 I had to edit the scheme (Product->Scheme->Edit Scheme...), and for some reason no executable was selected.我不得不编辑方案(产品->方案->编辑方案...),并且由于某种原因没有选择可执行文件。 I chose my app, saved and now I have my simulator and device options back.我选择了我的应用程序,保存了,现在我的模拟器和设备选项回来了。

Restart XCode, see how you go.重启XCode,看你go怎么样。

Often when I use git to pull changes to the XCode4 project file the list in the top seems to lose it's place.通常,当我使用 git 将更改拉到 XCode4 项目文件时,顶部的列表似乎失去了它的位置。 Restarting fixes that issue very time for me.重新启动修复这个问题对我来说非常及时。 Totally annoying.完全烦人。

What worked for me is here: Xcode iOS project only shows "My Mac 64-bit" but not simulator or device对我有用的是: Xcode iOS 项目仅显示“我的 Mac 64 位”,但不显示模拟器或设备

It's the answer posted my Mike Reining which says: Right-click on the xcodeproj file and select "show package contents."这是我的 Mike Reining 发布的答案,上面写着:右键单击 xcodeproj 文件和 select “显示 package 内容。” Now delete everything inside the xcuserdata folder.现在删除 xcuserdata 文件夹中的所有内容。 Voila.瞧。

Make a backup copy of the xcuserdata folder before you delete it.在删除之前制作 xcuserdata 文件夹的备份副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM