Problems: My UIImage Doesn't Display on a Device!
One of the more frustrating problems that you can run into when developing for the iPhone is having everything work great on the simulator, but then fail when you load it onto a real device. One of the more common problems that shows up is when a UIImage that displayed on the simulator is missing on the iPhone.
Some folks trying to use the SplashScreen library have had this precise problem.
The problem is usually one of case. Your Macintosh is (probably) built on a case-independent file system. That means that if you try to load "Splash.png" when the filename is really "splash.png", it'll work fine.
Your iPhone is not case-independent, and thus it will fail to find the same file.
So, if you're unable to see a picture on an actual device, check the case of your file name first.
Errors: No provisioned iPhone OS device is connected
ReplyDeleteI was frustrated by the "No provisioned iPhone OS device is connected" a couple of times before I figured out how to resolve it, so I thought I'd briefly mention it here for everyone else's benefit.
The error, of course, suggests that you don't have an provisioned iPhone connected. It shows up when you try and compile to your actual device. You might see it for two "real" reasons: because you forgot to connect your iPhone, or because one of your certificates has expired and you need to go back through the procedure to reprovision your iPhone.
However I see it much more frequently (at least once a month) just because my iPhone has gotten into some bad state. The last two times it happened were when: I upgraded to the newest version of iTunes; and when I interupted an iTunes sync in process because I was eager to get to compiling my program.
Fortunately, the answer is (usually) pretty simple: Take your iPhone out of its dock and reboot it, first holding down both the sleep/wake button (that's the one at the top) and home button (the one at the front bottom) to turn it off, then holding down the sleep/wake button to turn it back on. You should see the little Apple symbol as it boots up.
If you're still having problems, you may want to close down Xcode and Interface Builder as well, since I've seen them get into funny states on occasion too ... though not in the last couple of releases of the software. Rebooting the iPhone alone usually does the job.
As another bit of advice, I've found that the "Organizer" in Xcode does the best job of showing you your iPhone's state. If it's got a little green light, then all is well, which is really encouraging to see if you've been struggling to get your iPhone compilation working.