Author Archive

You are NOT an iPhone developer

After interviewing several iPhone developers here in Bangalore, I am really frustrated. We already have a team of iPhone developers (who are the best) and now we are trying to add a couple more people to the team. But we have not been able to hire even 1 person after more than 40 interviews. And we have interviewed candidates from all types of companies, big (the top 10) and small.

Well, lets get this straight, you are NOT an iPhone developer if:

  • you have no idea why you write “nonatomic” and “retain” in all properties. And you’ve never tried to find out.
  • you cannot tell the difference between release and autorelease
  • you hear the terms “main run loop” or “event loop” for the first time during the interview
  • you think all classes are either views or controllers
  • you have never written code for “applicationDidReceiveMemoryWarning” and “didReceiveMemoryWarning”
  • you do not know if you should release objects you created by through “copy” or “mutableCopy”
  • the terms build configurations and provisioning profiles do not ring a bell
  • you have never even seen the iPhone HIG (Human Interface Guidelines) document
  • you think both “viewDidLoad” and “loadView” are same methods
  • you have never used breakpoints and the debugger
  • you have never used the Instruments Application to monitor memory or network usage
  • you do not know how to read crash logs or how to add symbols to crash logs
  • even after programming for iPhone, you do not know about the Model-View-Controller pattern or the delegate pattern

And in case you are just starting off with iPhone programming, it would be wise to know the basics of both objective-C and the iPhone SDK. Don’t skip reading at least the following:


How we fixed production push notifications not working while sandbox works

We have faced the issue of push notifications working seamlessly over sandbox but never work on production. This has happened more than once.

I still have not investigated the root cause but the following fixes it.

We did not do anything extra or change any code or project build configuration. Here is what we did:

  1. Restored our iPhone/iPod Touch devices by erasing everything and reinstalling the OS. Did not sync the device or restore old data to avoid putting in the provisioning profiles again.
  2. Deleted all certificates and private keys from keychain on the mac (all including the Apple provider certificates)
  3. Removed all provisioning profiles from xcode.
  4. From the developer portal, we deleted the adhoc and dev provisioning profiles
  5. From the developer portal, we revoked the push SSL certificates for both dev and production versions
  6. Then we regenerated the push SSL certificates, both production and dev. Note that we did not download them from the wizard itself at this time.
  7. We then waited for a few minutes (5-10 mins) and then generated the provisioning profile. Not downloaded yet.
  8. We again waited a few minutes (5-10 mins) and then downloaded the certificates (sandbox and production) and the profiles (dev and adhoc)
  9. We then generated the single PEM file from the certificates and the key only for the production version. We did not even install the sandbox version certificates in our keychain.
  10. Then installed the adhoc provisioning profile in xcode and the device
  11. Started the application and tested a push notification
  12. It worked

They key difference is that we generate and download the dev profiles and sandbox certificates but do not use them at all. We only use the production certificates and the adhoc profile. That seems to always work.


iPhone OS backward compatibility, Target and Deployment SDKs and AdWhirl integration

Since many iPhone and iPod Touch users have not upgraded to the iPhone OS 3.0, it makes a lot of sense to enable backward compatibility on applications. But if you want to leverage the latest 3.0 features, you would have to put some extra effort to ensure full backward compatibility.

And if you are also integrating 3rd party libraries (analytics, ad networks etc.), you would have to ensure those also are backward compatible.

Q: How can I ensure that my application works on all iPhone OS versions from OS 2.0 to the latest 3.x version? And I do need to use some 3.0 features like push notifications or the Map Kit functions.

  1. Choose the Base SDK as iPhone Device 3.0. You can do this by right click on project name->Get Info. Then on the General tab, set the “Base SDK for All Configurations”to “iPhone Device 3.0″.
  2. Choose your deployment to be the lowest version you want to support. You can do this by right click on project name->Get Info. Then on the Biold tab, select “All Configurations” for Configuration so that this change is applied to all you configurations. Then look for the “iPhone OS Deployment Target” property under the “Deployment” section. Set that to the correct iPhone OS version. In my case I set it to “iPhone OS 2.0″.
  3. In your code wherever you use any APIs available only in versions later than your deployment target, use them conditionally after checking if they are available. This can be done for both classes and selectors.

Apple’s documentation describes this in further detail. Here is an image from the documentation that describes how the compatibility works based on the configuration:

When using 3rd party APIs and linking to dylib libraries, there might be further problems if the versions are not compatible. When trying ot integrate AdWhirl, we got an error:

Dyld Error Message:
  Library not loaded: /usr/lib/libxml2.2.dylib
  Referenced from: ......
  Reason: Incompatible library version: xxxxx requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0

This happens because iPhone OS version 2.x  and 3.xuse different versions of the library. The simplest way to fix this is to make the linking for the library weak. This can be done by right click on your application under “Targets” and select Get Info. Then on the General tab, under the linked libraries, locate this library and change the linking type from “Required” to “Weak”


Tools for iPhone UI (user interface) design, mockups, wireframes or just a sketch

iphone-mockup.pngWe tried several tools and methods for user interface designing of iPhone applications. We now use a combination of these tools and our choice depends on what best suits the product as well as the customer. The key point is communicating the design clearly to both the customer and developers.

Before going into details, let me just list the iPhone design and mockup (wireframe) tools/methods in no particular order:

  1. Use Interface Builder (Mac only)
  2. Use Balsamiq mockup tool (Mac, windows, linux) – http://www.balsamiq.com (http://www.balsamiq.com/blog/2009/03/01/iphone-controls-new-icons-and-much-more/)
  3. Use Omnigraffle (Mac only) and import an iPhone stencil – (http://www.omnigroup.com/applications/omnigraffle/download/ and http://www.graffletopia.com/search/iphone)
  4. Use paper and a stencil- http://www.designcommission.com/shop/iphone-stencil-kit/
  5. Use a pre-printed sketch paper – http://labs.boulevart.be/index.php/2008/06/05/sketch-paper-for-the-mobile-designer/
  6. Use photoshop and the iPhone PSD – http://www.teehanlax.com/blog/?p=1628
  7. Use Adobe Fireworks – http://blogs.adobe.com/fireworks/2008/08/iphone_gui_as_adobe_fireworks.html and http://www.building43.com/videos/2009/06/23/mockup-iphone-app-adobe-fireworks/
  8. Although not there yet, you can try http://iphonemockup.lkmc.ch/
  9. Use the stencil kit from Yahoo! which is available in a variety of formats – http://developer.yahoo.com/ypatterns/wireframes/
  10. Use the sketchbook available at http://www.mobilesketchbook.com/

Some bonus stuff

Lazy as I am, I decided to write details about each iPhone UI design tool later, so till then please use the list above and explore them.

If I missed your favorite tool, please let me know in comments and I will gladly add it here.


Aw’ Shugs Free version now available

After 10 days in review, Aw’ Shugs Free is now available on the iPhone App Store. The update to the paid version is still under review.

The only difference between the free and paid versions is that the paid version allows users to catch shugs anywhere and not just limited to a range around their current location.

Enjoy!!

Available on the app store


Aw’ Shugs Japanese version now available

We just released the 1.1 update for Aw’ Shugs with complete Japanese support in the application. Here’s what it looks like.

Aw’ Shugs Japanese Screenshot

You can get your copy here from the Apple App Store.



Our shiny new iMac

Just got our new iMac

08112008157.jpg


Starting work on the iPhone and Android platform

We are very excited to be starting work on iPhone and Android projects starting next week.

Though our team has experience with mobile technologies and location based services, we last worked on them in 2002/2003 for the Japanese, US and the Indian market. Things have changed since then.

Location based services were still in their infancy then, and now they are all the rage. Its exciting to get back to the small devices and the challanges they present.

We’ll have fun!!


HTTP/SSL requests from flash in IE when response is XML

If you happen to get an error #2032 when your flash file (running on IE) requests for XML content over an HTTPS connection, its an issue with the headers IE wants. This error does not occur on Firefox, only on IE.

After some searching, thanks to this, we fixed it. Phew.


© Copyright 2009 TechJini Solutions Private Limited. All Rights Reserved
iDream theme by Templates Next | Powered by WordPress