Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are my info.plist and .pch files red?

I created a spriteKit Game and later on changed the name of my Project within Xcode. From then on, my .pch and .plist files are red. I will show you an image:

enter image description here

The app runs fine and builds correctly. I'm not sure if this is a bad thing so that's why I asked. Please tell me how to fix this.

like image 705
Steve Sahayadarlin Avatar asked Jul 27 '14 22:07

Steve Sahayadarlin


People also ask

What does red mean in Xcode?

If files marked in red, they are "not found" by Xcode. You either moved or deleted them within File Finder, outside Xcode. Delete the red marked files within XCode, then add them again to XCode.

Why is Folder red in Xcode?

It means they are not found on disk where your project believes they should be. Control-click and Show In Finder to see the folder location to locate the file and drag it back in to the project, and delete the bad reference.

Why is my target red in Xcode?

Xcode shows only the . app built for the device in the Products folder. So if you clean the product and then build for Simulator, it will still be red. If you build for the device, Xcode will show it and "show in finder" also works.

What is info plist used for?

The Info. plist file contains critical information about the configuration of an iOS mobile app—such as iOS versions that are supported and device compatibility—which the operating system uses to interact with the app. This file is automatically created when the mobile app is compiled.


1 Answers

One can open the File Inspector to check a file's absolute path to make sure it is correct.

For team members collaborating via version controls like git, also make sure the plist's path is not pushed up to repository as absolute path including e.g. the user's mac usernames.

like image 64
CodeBrew Avatar answered Oct 24 '22 20:10

CodeBrew