Showing posts with label device. Show all posts
Showing posts with label device. Show all posts

Saturday, January 7, 2012

Always Test in Real - Not Just Crappy - User Device

Memory related defects can be hard to debug, therefore I usually force automatic system "out of memory" notifications. That makes sure I have no other choice, but to handle potential OOM issues from the start. Otherwise the app won't run. Clever, right?

And that's the problem. Potential OOM issues. Did you notice that "potential" keyword?

Thursday, May 26, 2011

How to Run Instruments with Real Device

You can start profiling your application by pressing Command-I (that's i like in India). By default Xcode4 Instruments runs on simulator.

When you want to profile on a real device: select at top left corner Scheme popup menu, "Edit Scheme...", Profile MyTest.app and change Build Configuration from Release to Debug.

Wednesday, March 2, 2011

What to Do When Screen Auto-Lock Doesn't Work During Phonecall

Lesson 1: When iPhone is in headset mode, screensaver doesn't activate and/or screen doesn't go black. So unplug your headphones from the headphones socket... but remember this only effects proximity sensor.

Lesson 2: When you are debugging on hardware, the device is connected with USB cable to laptop. This cable does charging and thus screen won't go black. Unplug the USB cable, too. Now start recalling how debugging on hardware was done before cable connection was invented. Tip: log files!

Lesson 3: Something I've learned much earlier, still good to remember. If you're debugging something audio related (like I was), check ALL volume controls. There's a possibility that something has been muted!

Wednesday, February 2, 2011

Can't Start Debugger. CFSocketSetAddress Returns Error -1


Was debugging an application in real device, when suddenly got an error note about failed network connection. Since this happened before application launch, I got curious.

Why would debugging application in device fail due network error before launch? Why would it fail now, when everything was ok dozens of times just beforehands (yes, I do a lot of quick but short debugging sessions in real device)?