I'm hoping to get some insight into an issue I've been struggling to wrap my head around for the past few hours. I have a custom UINavigationBar that is being configured in application:DidFinishLaunchingWithOptions
by calling the following method:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"NavBar"] forBarMetrics:UIBarMetricsDefault];
When I run my application in XCode (both in the Simulator and on an actual device that is plugged in to the computer), this works great and my custom background is displayed. However, when I run a release version of the app on TestFlight, the standard light blue navigation bar is showing. After messing with placement of the setBackgroundImage
method with no luck, I have come to believe it has to do with differences in "debug" vs. "release" settings, but I am clueless as to where those settings would cause this navigationBar issue.
Any help or insight into this issue (or how I would go about debugging it) would be greatly appreciated. Thank you in advance!
In the device image names are treated as case sensitive. Also you need to supply it with extension.
So check exact name and extension.
As mentioned in my comments, when you are facing similar issue you should check the name of images and make sure it is not case sensitive. You might have added an image with name
navBar
but you are using asNavBar
in your project. That is the reason for this issue. Simulator is not case sensitive but device is.Either change the code to,