xcode 4 产品仍为红色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6396749/
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
xcode 4 product still in red
提问by
Possible Duplicate:
.app file appears in red (missing) in new projects with Xcode 4
XCode 4 : Product still appearing in red … myAppName.app under Products ??
XCode 4:产品仍然以红色显示......产品下的 myAppName.app ??
Under XCode Preferences:Locations I see for Build “Place build products in derived data location (recommended)”. “Unique subfolder” list item is checked.
在 XCode Preferences:Locations 下,我看到 Build “将构建产品放置在派生数据位置(推荐)”。选中“唯一子文件夹”列表项。
Going to Folder: ~/Library/Developer/Xcode/DerivedData, I then build fresh and see: myAppName-bqxvzqesjyqjhlgzhainyxexzacq Folder : Build Folder : Products Folder : Debug-iphonesimulator Folder : myApp myApp.app. dSYM
转到文件夹:~/Library/Developer/Xcode/DerivedData,然后我重新构建并查看:myAppName-bqxvzqesjyqjhlgzhainyxexzacq 文件夹:构建文件夹:产品文件夹:Debug-iphonesimulator 文件夹:myApp myApp.app。同步信号
Under Project Settings, I have Application Target = iPhone, so it makes sense that the folder one down from Products Folder starts with the name: Debug-iphonesimulator. I suspect the prefix “Debug” comes from the Code Signing Identity = iPhone Developer, versus iPhone Distribution.
在项目设置下,我有应用程序目标 = iPhone,因此从产品文件夹向下的文件夹以名称开头是有道理的:Debug-iphonesimulator。我怀疑前缀“Debug”来自 Code Signing Identity = iPhone Developer,而不是 iPhone Distribution。
Then, I reset Locations under Preferences to “Place build products in locations specified by targets”
然后,我将首选项下的位置重置为“将构建产品放置在目标指定的位置”
At this point a build Folder appears in my app's Project Folder, which it's supposed to; however, the Debug-iphonesimulator Folder also shows up again in the above Project Folder.
此时,我的应用程序的项目文件夹中出现了一个构建文件夹,它应该是;然而,Debug-iphonesimulator 文件夹也再次出现在上面的项目文件夹中。
To make matters worse, myAppName.app still shows in red ??
更糟糕的是,myAppName.app 仍然显示为红色 ??
回答by MCKapur
Put the app in iOS Device mode, then click Product -> Build For -> Archiving
将应用程序置于 iOS 设备模式,然后单击产品 -> 构建为 -> 存档
This should work
这应该工作
回答by Max MacLeod
You need to build the product in release mode. This could be a duplicate - or at least very similar to the question Xcode product in red when in release mode
您需要在发布模式下构建产品。这可能是重复的 - 或者至少与在发布模式下以红色显示的问题Xcode 产品非常相似