Archive for May, 2009

Signing identity problem?

If you face some problems in Xcode when building Code Signed applications (for iPhone), that were not happening before:

  • You can’t build Code-Signed applications anymore? You’ve now got a “Code Sign error”, but you was perfectly able to build 5 minutes ago, and don’t know what did change?
  • Xcode’s Organizer tells you “A valid signing Identity matching this profile could not be found in your keychain”?

You may have a problem with your Keychain Access. Just give a look to the Keychain Access application to make sure the keychain containing your iPhone Developer Program certificates (for me it’s the Session one) is the default one.

This may not solve your problem, in which case I’m very sorry… but it was my problem, and solved it!


Localizing the iPhone app’s name

If you wish to localize your iPhone application’s name (the one which is displayed in the Springboard), you don’t want to localize the Info.plist file. In fact, you want to create an InfoPlist.strings file and localize it! That’s simple 😉

For more details, you can have a look at this tutorial: (thanks to the author, it helped me).

Categories: Cocoa, iPhone SDK Tags: , ,

How to setup the status bar BEFORE launch?

Like me, you’re a bit “perfectionist”? (don’t know if it is correct in English… but you’ll probably understand). Don’t like seeing your iPhone app launching with a grey status bar and then changing to the one you set in – (void)applicationDidFinishLaunching:… ?

The solution is in the Info.plist file! In fact, it is not really, but this is the place you want to make it append. Help can be found:

  • in the sample app “Touches” ;
  • by searching “UIStatusBarHidden” in the documentation, and looking at “Property List Key Reference”.
  • by searching “Info.plist” in the documentation, and looking at “Guidelines for Configuring Applications”.

In short, you can also add the following lines to your Info.plist file:

lines added to plist example

lines added to plist example

Programmaticaly terminating an iPhone app

First, you must know it is not adviced to do so. Apple specifically indicates you should not (in fact, I remember the documentation saying you should not make an “Exit” or “Quit” button). But, in some cases, you will need to do so, so I think you should get my experimentations’ results on this.

After some tests, I can say the following:

  • using the private interface : [[UIApplication sharedApplication] terminate] will cause the app looking like it crashed, BUT it will call – (void)applicationWillTerminate:(UIApplication *)application before doing so;
  • using exit(0); will also terminate the application, but it will look “normal” (the springboard’s icons appears like expected, with the zoom out effect), BUT it won’t call the – (void)applicationWillTerminate:(UIApplication *)application delegate method.

My advice:

  1. Manually call the – (void)applicationWillTerminate:(UIApplication *)application on the delegate.
  2. Call exit(0);.
Categories: Cocoa, iPhone SDK Tags: , , ,

ABPeoplePickerNavigationController’s delegate… and peoplePickerDelegate!

if you wish to use ABPeoplePickerNavigationController (I will not detail its use, if you need to read this, you already know what to do with it), you will read in Apple’s documentation that you have to set it up with a delegate implementing the ABPeoplePickerNavigationControllerDelegate protocol. Beware that the ABPeoplePickerNavigationController is a UINavigationController subclass, so the delegate property is not the one you may search… try else with peoplePickerDelegate, or the delegate’s methods will never get called.

Categories: Cocoa, iPhone SDK Tags: , , ,

iPhone’s (simulator) 2.2.1 firmware available fonts

This may be useful to some developers, so I provide it here. This is a list of font families names (bold) and corresponding font names (plain) available on iPhone OS 2.2.1 (in SDK simulator at least).

Read more…

Categories: Cocoa, iPhone SDK Tags: , ,

UIView may be worth it! …better than CALayer? this may be no surprise…

Just a short post… Since I’m getting on another project (a shorter one, in order to have something done for once), and that project requires to manipulates UIView‘s subclasses, I may think again next time I go on my previous project (the one I was doing when I talked you of CALayer – see previous post Drawing with layers on the iPhone).

Trying to animate my views a little bit, I uncovered one thing that was provided by UIView and that I could not get with CALayer: the ability to delay an animation (which is done by UIView‘s class method setAnimationDelay:).

This is it. I only found this, but I know suspect that I would find more if looking further… So CALayer may seem nice (drawing oriented class, more simple object…), but you may think again before deciding what should be drawn through layers, and what through views.

%d bloggers like this: