Does Xcode include miscellaneous files in the project folder when building - ios

I keep some miscellaneous files in the folder for my project, files not actually involved in the build. I was wondering, however, wether Xcode will include these in the build. I need to make sure these files aren't taking up space and slowing down builds. Do these files have any effect?

Xcode will only include files that have been added to the projects copy bundle resources build phase.
You can see these files by selecting your project , click on the target , the select the build phases tab, and click on the Copy Bundle Resources.

Related

There are missing files when I archived from custom build configuration

We have different build configurations in our project, like the release, debug, sandbox, etc. The interesting case is when I archived from the release or debug build configuration, all archive files extracted as expected as shown in Image 1, but If I change build configuration to sandbox, some files and folders are missing as shown in Image 2.
Although we created custom build configurations by duplicating from debug or release, the archive doesn't contain all files or folders like in Image 1.
We use carthage(for internal network) and cocoapods(for others) as a dependency manager.
I tried many suggestions but couldn't find a solution.
Like,
setting skip install to NO in build settings,
removing all archive and derived data files, clean and re-archive,
giving the archive folder to read & write permission
Thank you all
If you're using Carthage for internal frameworks you should have same custom build configurations for them, too. Otherwise, it will bootstrap with Release configuration automatically which won't generate SwiftSupport files etc.
You also can avoid this by adding below before archiving in your custom configurations.
carthage bootstrap --configuration Debug
You should make sure that those files are included in Build Phases -> Copy Bundle Resources

Copy an existing Xcode project results in files with wrong references

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

How can I see the asstes copied to the build folder on Xcode 4.3?

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.

Xcode copying unnecessary files into target

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.

Looking for an Xcode build script to copy files between targets

Does anyone have a script that can copy files from one target to another, during the build process?
I have a project with one target that builds an app and another target that builds a library. The library needs to contain a large subset of the files from the app and I want to avoid manually copying them over.
In the build phase of an XCode 4.x project you can add a build phase to either copy files or just run a script (that does your copying for you)
See this SO question adding-external-scripts-to-xcode4, for additional details

Resources