[英]Xcode 4.4 turned my iOS project into a Mac OS X project! How can I fix this?
I've opened an iOS project - with Xcode 4.4.1 - that I hadn't opened for 2 months (ie with Xcode 4.3). 我打开了一个iOS项目 - 使用Xcode 4.4.1 - 我没有打开2个月(即使用Xcode 4.3)。 First, Xcode was crashing constantly right after displaying the project navigator saying something like "Failed to associate working tree" . 首先,Xcode在显示项目导航器之后不断崩溃,说“无法关联工作树” 。
I tried to fix it by removing xcuserdata files and the project.xcworkspace directory as well. 我试图通过删除xcuserdata文件和project.xcworkspace目录来修复它。
Now, Xcode opens without crashing but in the scheme view, it is shown as a Mac OS X project whereas both the project and the target are correctly set to a "Latest iOS" base SDK. 现在,Xcode打开而不会崩溃,但在方案视图中,它显示为Mac OS X项目,而项目和目标都正确设置为“最新iOS”基础SDK。
How can I fix that without having to recreate a project and copy all my source files? 如何在不重新创建项目并复制所有源文件的情况下解决这个问题?
EDIT: i'm using Git with a GitHub remote. 编辑:我正在使用Git与GitHub遥控器。
通过点击当前方案然后“新方案”为ios制定新方案
Roll back using version control. 使用版本控制回滚。 If you post which version control system you are using, somebody will be able to give you the specific command to use. 如果您发布了正在使用的版本控制系统,那么有人将能够为您提供特定的命令。
I had a similar problem with all my Xcode projects. 我的所有Xcode项目都遇到了类似的问题。 Every iOS project got turned into an OS X project without me changing any settings. 每个iOS项目都变成了OS X项目而我没有更改任何设置。 A reinstallation of Xcode fixed it for me. 重新安装Xcode为我修复了它。
只需在目标的Build Settings中将Root SDK设置为iOS即可
SDKROOT = iphoneos
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.