i have create a new subdirectory in my application bundle. This i have done in the xcode environment.
target -> copy bundle resources
now add a new folder
create folder references for any added folders
how can i check that the folder is created in the application bundle
Thank you
To check the folder/directory has been created inside your application bundle (.app), right click on your .app file and select "Show Package Contents". Now check if folder/directory appears in your .app file.
As a side note, an easier way to add a folder/directory to your .app bundle is to add "Folder" instead of "Group" in your Xcode project. For example, lets say you have a bunch of files inside /HTML directory. Drag and Drop this /HTML directory in your Xcode project. Xcode will present a dialog with options like, "Copy items into destination group's folder (if needed)", "Create groups for any added folders", and "Create folder references for any added folders". Choose "Create folder references for any added folders" in this dialog. As a result, you'll see a blue group folder, instead of the usual yellow group folder for your /HTML directory (in your Xcode project), and Building the .app will create /HTML folder inside your .app bundle.
Hope this helps.
Related
New to this Xcode sh*t(sorry for that, but really pissed off by Xcode)
The thing is I could find there should be a specific file by grep or finder, but in the Xcode project, the file does not exist here:
Here is the result with grep in the project folder
And here is the project hierarchy in Xcode.
They are mismatch!
Can't apple just make this Xcode sh*t right? How could I find this file in Xcode's folder? Thanks
Check if that file exist into Copy Bundle Resources.
Click "Your project name" from Xcode left sidebar then select your main target and go to Build phases tab and inside that go to Copy Bundle Resources and check whether that file exists or not.
I have a working project that builds ok. (Xcode 6.0.1)
There were images added that were at one folder (/Downloads) and were substituted by new ones (/MyDir/MyProject).
At adding files process copy options, group and add to it's targets were selected.
After a copy and paste at Finder from the root project folder to the new project some images contain references at Targets / Build Phases / Copy Bundle Resources to old folder (Downloads) while they are ok at original project.
I've deleted the .git from initial project to make sure it's not a git problem.
Already tried
rm -rf ~/Library/Developer/Xcode/DerivedData/
Any ideas? Thank you
In the rightmost panel, which contains Identity and Type, check to see if the "Location" field is Absolute Path, Relative to Group, or Relative to Project, and set each file accordingly to what it should be. Xcode seems to create new files with creative ideas on how this should be set.
check in your project build phases if there are some missing references and delete the one you don't need
I have a few plist in my project, and I have added them to the target and "Copy bundle resource".
For some reason, they do not get copied to the app package.
I looked into the package content of the app in the simulator, everything but the plist files is copied.
(They are not in sub-directory; they are directly in the Resources group)
I tried cleaning, reinstalling..
Why is that?
Turns out there are some null scripts in my project build rules which block the plist files from being copied over!
Check that the file is copied in the bundle resources by :
1/ Clic your project name in Xcode,
2/ Go to your target name,
3/ Build Phases,
4/ In the "Copy Bundle Resources", check that your plist is added.
If not, add it with the "+" button.
Turns out there are some null scripts in my project build rules which block the plist files from being copied over!
I run Xcode 4.3 on a Mac 10.7.4 (Lion).
I have all my resources (images, audio) for my app on a separate folder (something like a DropBox or a sugar Sync folder installed on root) on my system.
I have written a shell script (in run scripts) to copy the resources i need for the app into the bundle when i compile the code.
Is there a way to view the assets (the images and audio) that have been copied in the build folder by my run script? If so, how would i go about doing this?
Select iOS Device as the build target, and build your application. This will generate the product .app file. Expand Products folder from Project Navigator, and right click yourappname.app and select "Show in Finder". Right click the app in your finder and select "Show Package Contents". You will find all your bundled assets there. Please note that you might not be able to open these images.
In my Xcode project, I have it set to copy all the files I need in the "Copy bundle resources" step and it doesn't link to any extra libraries, yet when I compile the project it copies a number of files that aren't even in the project's file references (a number of .dll files that have nothing to do with this version of the app).
The files may have accidentally been added to the "copy bundle resources" step at one point but were since removed. How can I find out why are these files still being copied and how can I prevent it?
Turns out the files were left over from a build before those files were removed. Trashing the app from the products folder got rid of the extra files.