I’ve got an app, which works plenty good. I’ve duplicated the target, so I have 2 very similar apps with slightly different functionality – it’s not a lite app, but the same kind of principal.
I’ve copied a lot of the graphics and added them into the project. I can add the images to my .xib files and I see them fine, but when I run my code, using conditional statements to programatically update image views to use the new images, it don’t work!
The code runs but what I see in the app is an empty image view. So it changes the source of the image view, but doesn’t actually show the help.
#ifdef OTHER_VERSION
[self.imgTitle setImage:[UIImage imageNamed:@"differentImage"]];
#endif
I know the #ifdef OTHER_VERSION code works, because it is changing the functionality of my app later on, it’s only the images that I’m having a problem with.
Do I need to update the project or something, or add the images specifically to the new target?
UPDATE:
I just noticed this:
Could not load the “differentImage.png” image referenced from a nib in the bundle with identifier “com.domain.SecondApp”
The image definitely exists in the project, is the image somehow associated only with the original app I copied from, “com.domain.FirstApp”
Select your target on the left in Xcode. On the right, click on Build Phases. Expand “Copy Bundle Resources” and ensure all of your images (and other resources) are listed there.