S B
S B

Reputation: 8384

How to bundle non-version controlled images in Xcode's Resources folder?

Here are the approaches we tried but did not work

What are the best practices you have followed?

Upvotes: 0

Views: 341

Answers (1)

Ignacio Inglese
Ignacio Inglese

Reputation: 2605

Have you tried adding a Folder Reference instead of a group when adding it to your project and using DropBox to keep that folder up to date with your images ?

As a Folder Reference, it should always reflect the current state of the linked folder without the need to manually add each file as it is downloaded from DB.

After running a quick test, I found that adding Folder References and trying to use the images from there with [UIImage imageNamed:@"fileName.png"] doesn't find the actual image.
You have to actually include the relative path to your Folder Reference, like this:

UIImage * imageFromFolderReference = [UIImage imageNamed:@"FolderReferenceName/fileName.png"];

That seemed to do the trick.

Upvotes: 2

Related Questions