Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:53:32+00:00 2026-06-11T05:53:32+00:00

I am not sure whether this is expected or it is bug. I am

  • 0

I am not sure whether this is expected or it is bug.
I am trying to create the same folder structure in disk as that in XCode. I use the following steps to add resource files to my project:

  1. Create a Resources folder under the root folder of the project.
  2. Drag the Resources folder to XCode, which creates a Group for the folder.
  3. Drag my resource files from Finder to the Resources folder in XCode.

And now I can see all the resource files are listed in Build Phrases->Copy Bundle Resources.

The weird thing is that [[NSBundle mainBundle] pathForResource:@"book" ofType:@"epub"] returns a file path that can be located, while [[NSBundle mainBundle] pathForResource:@"book" ofType:@"epub" inDirectory:@"Resources"] returns (null).

From the Build Results window, I notice this line:

CpResource MBookReader/Resources/book.epub /Users/neevek/Library/Developer/Xcode/DerivedData/workspace-fykuaikryknuhxgevcdtspkspptj/Build/Products/Debug-iphonesimulator/MBookReader.app/book.epub
cd /Users/neevek/workspace/xcode_projects/MBookReader
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip /Users/neevek/workspace/xcode_projects/MBookReader/MBookReader/Resources/book.epub /Users/neevek/Library/Developer/Xcode/DerivedData/workspace-fykuaikryknuhxgevcdtspkspptj/Build/Products/Debug-iphonesimulator/MBookReader.app

which shows that Resources/book.epub file is indeed copied to MBookReader.app/(the root directory of the app bundle).

Now Resources is a real folder in disk, why the folder itself is not copied?

PS. I am using XCode 4.3.2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:53:34+00:00Added an answer on June 11, 2026 at 5:53 am

    When adding your Resources folder to Xcode, choose “Create folder references” instead of “Create groups for any added folders” in the sliding window.

    That is, replace the 3 steps in your question with the following ones.

    1. Create a Resources directory under the root directory of the project. Organize your directory structure inside the Resources directory the way you want it to be.
    2. Drag the Resources directory to XCode and select the Create folder references option.

    You’re done. Xcode will copy the contents of your Resources directory recursively into the bundle.

    You might have trouble further down the road when Xcode doesn’t copy a modified file somewhere inside the Resources directory. A clean build usually fixes this. Alternatively, you can remove the .app file before building. This will not cause unmodified source files to rebuild, but will force Xcode to copy all of the resources anew.

    Sample Folder Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure whether this is the origin of the bug I'm trying to
I'm not sure whether this is an issue with my use of cl-who (specifically
I'm not sure whether this is just a bug or an intended feature. Basically,
I am not sure whether this is a bug or if I have totally
I am not sure whether this only happens to me. Basically if I have
I'm not sure whether this question belongs on StackOverflow or SuperUser, but here goes
we're having this toshiba barcode printer. I'm not sure whether this problem is hardware
I'm not sure whether or not this is the appropriate way of doing this,
I am not sure whether I am asking this with the right words, I
I am not sure whether distinct is the right word for this. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.