40

Every time 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.

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Miguel Beltran
  • 2,132
  • 1
  • 23
  • 36

5 Answers5

45

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.

daihovey
  • 3,485
  • 13
  • 66
  • 110
32

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)

enter image description here

Rajesh Loganathan
  • 11,129
  • 4
  • 78
  • 90
dhaya
  • 1,522
  • 13
  • 21
7

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) Symptom 1
  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 Symptom 2

  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.Symptom 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) Solution 1

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

mmorris
  • 4,006
  • 3
  • 27
  • 29
  • 2
    In the future, rather than pasting the same answer on multiple duplicate questions, could you flag them for us to point to one canonical question? Pasted answers trigger warnings for us, which sometimes can lead to these answers being removed. In this case, I closed many of these questions as duplicates, and pointed them here so that we could have one central reference. This prevents information from being scattered in different places on the site. I appreciate the detailed answer, though. – Brad Larson Jan 28 '13 at 18:08
  • @BradLarson Where is the flag option? There are many more like these. Try searching for `xcode red app` `xcode red project`. – mmorris Jan 30 '13 at 02:46
1

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.

cheznead
  • 2,589
  • 7
  • 29
  • 50
0

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.