Monday, February 6, 2012

Icon dimensions (0x0) don't meet the the size requirements

Got a weird warning while validating my FontType 1.1 update at the weekend:
iPhone/iPod Touch: Icon dimensions (0x0) don't meet the the size requirements. The icon file must be 57x57 pixels, in .png format
Icon was just fine, so it's unclear what this means. However there are two theories: a) latest Apple iOS update messed up something or b) Apple iTunes Connect server has some issues.

Friday, February 3, 2012

How to Get Magnifying Glass into UITableView Index

If your app contains a list, you might want to considere adding an index bar at right side of the screen. If your list supports search, you might want to add a magnifying glass at top of the index (similar to built-in Contacts application).

Ok, so how do you do that?

Good news is that it's really simple - as soon as you figure it out once. Check Apple iOS SDK for UITableView Class Rerefence and you'll find:

Friday, January 13, 2012

Find NSDictionary in NSArray with Certain Value

Current project got lots of data in NSArrays and NSDictionaries. Nothing against them, extremely useful data structures. Just got to finetune my hammer a bit (since hammer is what I got and thus everything looks like a nail).

So how do you find a certain NSDictionary from NSArray containing a requested key? Two easy ways here:

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?

Friday, January 6, 2012

Dependency Graph Tool for iOS Projects

One of the tools, which I used to use with Symbian C++ projects, was an automated dependency graph generator. Can't recall the name, had totally forgotten anything like it ever existed. Totally happy in my ignorance. Blissful happy-go-lucky cowboy coding.

Until I found this tool: objc_dep.py at GitHub by nst, which does "Graph the import dependancies in an Objective-C project".

Oh the memories! Oh the horrow, when I checked my current projects...

Tuesday, December 27, 2011

How to Autogenerate App Version Number from GIT

Application needs a version number, naturally. It's publicly used to identify, which version customer is using (and reporting bugs about).

However there is a very important technical reason to take good care of version number: if you want to update application, the new version number must be bigger than the old one. Sounds easy, yet again...

Let's check the documentation:

Thursday, December 8, 2011

How to Sort NSDictionary

Let's get this straight: you cannot sort NSDictionary.

Dictionary is a collection of keys and their objects without an order, therefore you cannot change that non-existing order. You can sort only array data types, since they are basically ordered lists.

There are still good news. You can get all keys from any dictionary as an array and sort them. Usually this is enough.