开发者

.app file appears in red (missing) in new projects with Xcode 4

Every ti开发者_开发百科me I create an Xcode 4 project (iPhone app, cocoa library...) the .app file or the .a file under Products group appears in red (is missing).

Even if I build the project the file stills in red.

All my settings are default.


Try Building and Running on a device, I've noticed the same red text problem, but selected my iPhone and the red text has disappeared.


I have solved the problem with the following process:

  1. Select projectname -> Click project -> Build Setting -> Search "Per-configuration Build Products Path"

  2. Remove the extra string from there.

  3. Finally confirm you have to add $(BUILD_DIR)/$(CONFIGURATION)

.app file appears in red (missing) in new projects with Xcode 4


I too had an issue with red .app files in the Products folder. I tried many of the remedies offered, but none worked. My particular issue may have been different. If you have the same symptoms, my solution might work for you too.

Symptoms

  1. Red .app files in the Products folder in the Navigator area (left section of xcode)

    .app file appears in red (missing) in new projects with Xcode 4

  2. When selecting the .app, the Utility area (right section of xcode) the File inspector view the “Full Path” displays:

    /Users/[user name]/Library/Developer/Xcode/DerivedData//Build/Products/Debug/[app name].app

    .app file appears in red (missing) in new projects with Xcode 4

  3. The app file is located at (note the -iphoneos after Debug):

    /Users/[user name]/Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphoneos/[app name].app

  4. Select the following:

    a. the project in the Navigator area (left section of xcode) (Symptom 4 - A)

    b. the project in the Editor area (middle section of xcode) (Symptom 4 - B)

    c. “Build Settings” tab (Symptom 4 - C)

Search for “Per-configuration Build Products Path” (Symptom 4 - D). The value is build/Debug instead of build/Debug-iphoneos.

.app file appears in red (missing) in new projects with Xcode 4

Solution

  1. Select the following:

    a. the project in the Navigator area (left section of xcode) (Solution 1 - A)

    b. the project in the Editor area (middle section of xcode) (Solution 1 - B)

    c. “Build Settings” tab (Solution 1 - C)

  2. Set the value of “Base SDK” to Latest iOS (iOS 6.0). Actually any of the iOS options should work. (Solution 1 - D)

  3. Set the value of “Architectures” to Standard (armv7, armv7s). (Solution 1 - E)

  4. Set the value of “Supported Platforms” to iOS (Solution 1 - F)

    .app file appears in red (missing) in new projects with Xcode 4

Notice

  1. The value for Per-configuration Build Products Path – Debug is build/Debug-iphoneos (Solution 1 - G)

  2. The .app files are no longer red. (Solution 1 – H)

  3. The “Full Path” for the .app is:

    /Users/[user name]/Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphoneos/[app name].app


It is a bug but a superficial one - it happens when you clean your project. If the file is under the Products folder, those items are only for the purpose of displaying the output of the build process. If you build and run again it should not be red anymore but if it is red, it isn't affecting your app.


Click on Product -> Clean Build Folder and then try again to build app for current selected device. Maybe not from first, but from second time it will build correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜