Search
Goodies

Social Networks
Designs I Like
« iTunes Connect changes: Sales and Trends | Main | Integrating Dropbox into Ultimate Password Manager »
Saturday
Sep112010

Discoveries in Xcode Organizer

Recently, I've spent quite some time working on the next release of Ultimate Password Manager. There is times when you create many new builds of an application that you install quickly on the iDevice to test specific area of the application. Xcode allows you to build and archive an application that we can then install via iTunes (too slow process) or via an Xcode's Organizer (faster).

While spending time with Organizer, I made a few discoveries. First, automatic Symbolicating of Crash logs. How many times as a iOS developer you've heard about the need to symbolicate crash reports in order to know where an application crashed. Without symbolicating a crash log, all you get from a crash log is the call stack and a bunch of unresolved addresses values. With symbolicated crash log, many of those values are replaced with actual object  and method names which makes understanding the call stack a lot better.
There is a manual way of symbolicating crash logs but many developer forums are filled with comments about how flaky the process seems to be. With Organizer, when you connect one device used as a development device, you get automatic symbolicated crash logs as soon as you click the Crash logs tab.

The following is an example of a call stack at the time of the application crash. As we can see, the application uPasswords crashed in the Application Delegate, in the SaveDataEncrypted method. 

The other thing I discovered while using Organizer is how much more often applications seems to crash because of lack of memory since my device is on iOS 4.
Also, iDevice like the iPhone is a real computer. A Unix-based computer. Looking at the Console while the device is plugged into the USB port, you get quite a lot of runtime messages in the console.
Here is an excerpt of the console messages while using Facebook application:

Sat Sep 11 09:17:09 iPhoneJF MobileMail[69] : _keybagLockStatusChanged: new state: 0
Sat Sep 11 09:17:10 iPhoneJF kernel[0] : AppleKeyStore:cp_key_store_action(1)
Sat Sep 11 09:17:10 iPhoneJF kernel[0] : AppleKeyStore:Sending lock change
Sat Sep 11 09:17:10 iPhoneJF sandboxd[444] : Skype(70) deny file-write* /Applications/.dat0046.00e
Sat Sep 11 09:17:10 iPhoneJF com.apple.locationd[22] : NOTICE,Time,305903830.541,Function,"kern_return_t _CLDaemonProvideNetworkTime(mach_port_t, CFAbsoluteTime, double)",Time 305903882.00 (timestamped 29156806.50) took 0.00 seconds to arrive; adjusting to 305903882.00
Sat Sep 11 09:17:19 iPhoneJF /usr/libexec/spd[418] : spd:spd_start_dispatch_events:434 Starting to monitor socket events for client [PID=70] and socket [FD=5]
Sat Sep 11 09:17:19 iPhoneJF CommCenter[33] : com.skype.skype is being suspended, invalidating mach ports.
Sat Sep 11 09:17:20 iPhoneJF /var/mobile/Applications/E12AB2E8-CDE7-454A-86B0-C2E652C8FEEE/Facebook.app/Facebook[381] : dnssd_clientstub write_all(7) failed -1/66 32 Broken pipe
Sat Sep 11 09:17:20 iPhoneJF /var/mobile/Applications/E12AB2E8-CDE7-454A-86B0-C2E652C8FEEE/Facebook.app/Facebook[381] : dnssd_clientstub deliver_request ERROR: write_all(7, 66 bytes) failed
Sat Sep 11 09:17:20 iPhoneJF /var/mobile/Applications/E12AB2E8-CDE7-454A-86B0-C2E652C8FEEE/Facebook.app/Facebook[381] : dnssd_clientstub write_all(7) failed -1/28 32 Broken pipe

Looking at those messages, someone could wonder what is the problem with Facebook? We also see that Skype was put in suspended mode while Facebook app was started.

Don't be afraid to look around in Organizer. Try for yourself, start Xcode, then select Organizer in the Window menu and plug your development device. The green light indicate that all pertinent informations has been read by Organizer in order to let you see what is going on in the plugged in  device.

The last thing about Organizer is taking screen capture functionality. While using you're device, you can take a snapshot of the screen. This could be used in order to produce iTunes connect screens for the App Store while submitting the application for approval process. What could be cool though is a way to capture video and create demonstrations of running application. That would be really useful. Meanwhile, I keep using SimCap tool for this purposes. Really well done utility by the way. 

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>