Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding resource files to xcode

I'm trying to add some new resource files to a project which was build by another person on another mac. I think that the project has the provision of the previous person.

Using right click->Add Files to "MyProject" doesn't provide the expected result. After I compile the project, the added file is not visible in the application.

How can I add new resources in my project?

PS: I'm trying to learn Objective-C in a macincloud.com account.

like image 978
dole doug Avatar asked Apr 20 '12 13:04

dole doug


People also ask

Where are resources Xcode?

Click the Build Phases button at the top of the project editosr. Click the disclosure triangle next to the Copy Bundle Resources build phase to see the files in the build phase.

How do I add a file to target membership Xcode?

Select all the . m files in the "Project Editor" ( cmd-1 ), show the "Utilities View" ( opt-cmd-0 ) and click the new target in "Target Membership". Be careful not to select files that do not belong to a project such as .

Where is copy bundle resources in Xcode?

You're in the Build Settings tab, Build Phases is next to it. It will be a list of phases that includes Copy Bundle Resources .


1 Answers

It might be that the file you added was not added to the project build. Click your project > App target > Build Phases And check that the file exists in Compile sources (if it needs to be compiled), otherwise check Copy bundle resources. If the file does not exist there, drag it there and it should be fine, (from what I understand of your question).

EDIT

You can also check wether a file is added to the target by clicking the file and opening the "File Inspector" (View > Utilities > Show File Inspector, or + + 1), and check the Target Membership section.

Example:
Example

like image 132
Paul Peelen Avatar answered Sep 22 '22 14:09

Paul Peelen