Sunday, October 21, 2012

Retrospective for Offline LibraryThing Book Catalog Browser

My latest hobby application (non-work, created on personal time) is now waiting for various approvals. Reached the exhaustion point, where it's more important to make a release than add new features - or even search for bugs.

Idea without execution is worthless.

There's online development diary "While Developing" started 22 August 2012, about 2 months ago. So what did I do and did I learn anything? At all? Would I do this again? Ever?

Thursday, October 18, 2012

Dependency Graph Tool for iOS Updated

Recent iOS project was using ShareKit via "git submodule" command, which added a LOT of items into dependency chart generated by objc_dep utility. Additionally I didn't have any control of those files, just used them as they were given.

To make dependency chart usable again, I added a command line parameter to ignore a subdirectory.

Friday, August 31, 2012

While Developing Elsewhere

Just a quick note that a) I've been real busy with a business iPhone app development for a startup (subcontractor work) and b) started documenting one of my recently reactivated hobby projects at

The startup project is scheduled to be released for App Store review later today (!!!) and my part of the project should be done. Ready for next project, whatever and whenever that might be.

Hobby project on the other hand is an offline book catalog browser for LibraryThing website, truly a treasure trove for all book lovers. The app is work-in-progress and not released yet.

Tuesday, June 5, 2012

CoreData and NSCocoaErrorDomain Code 1570

Seems like iOS CoreData doesn't like non-existing values i.e. "nil".

Didn't realize at first that something was wrong, because a) I wasn't very familiar with Coredata, just inherited the code to be upgraded and b) I created my own caching on top of CoreData to compensate some issues with CoreData. Then found this error buried deep into console logs:
CoreData Error Domain=NSCocoaErrorDomain Code=1570 "The operation couldn’t be completed. (Cocoa error 1570.)

Thursday, May 31, 2012

You do not have the required file permissions

We exchange project files over a shared git repo on remote server and somehow I just lost write access to some files:

Error cleaning build folder
You do not have the required file permissions

Thursday, May 24, 2012

Server API change from HTTP to HTTPS

Doing an iOS client for business service, where client communicates with server to read and update certain undisclosured business data. Current development API is using HTTP with dummy test data, but real service will use HTTPS once everything has been validated to be safe and secure.

Client connectivity change from HTTP to HTTPS was done basically by adding (only) this code:

Monday, May 14, 2012

How to Remove Unused Parameter Warning - part 2

I still believe in no-warnings coding policy. Old problem, new solution.

Code warnings are often signs of real problems and have to be checked each and all. Many times you can rewrite the code in a better way, but sometimes that's not possible. For example generic protocol API offers method parameters, which are not needed in certain cases. You get the "Unused Parameter" warning.

What to do?

Saturday, March 31, 2012

How to Create ZIP Archive with Password in Mac

Sending source codes over email, need to apply basic security measures. It's not a top secret project, software has already been released for another platform and the codes are basically just for a fully functional demo app.

No need to send a secret agent carrying encrypted SSD disk embedded inside his skull.

Thursday, March 8, 2012

Font Changes in iOS 5.1 - AppleGothic

Apple iOS 5.1 was released late last evening (local time in Finland), as part of the "new iPad" announcement. Naturally I installed it right away and checked what FontType utility app tells me.

Apple has removed AppleGothic and added two Apple SD Gothic Neo fonts.

Update: I've been told these are Korean fonts, so I generated sample texts in Korean. I believe the text is supposed to mean "On this Day" or something like that.

Other iOS fonts are still same as in iOS 5.0.1 (see also: "New Fonts in iOS 5.0 - and Some Missing").

AppleGothic screenshots below:

Tuesday, February 28, 2012

Could not load the image referenced from a nib in the bundle with identifier

Just make sure your files are where you (your project file) thinks they are.
myApp[12345:678] Could not load the "image.png" image referenced from a nib in the bundle with identifier ""
Check for filenames in red (at left), indicating that somehow some file became unknown. Maybe you were moving files around in Finder, were you? Of course you were, you silly bugger!

Friday, February 24, 2012

Quality Icons for Your Quality App

What is the best way to use your time right now? What is the most profitable way to spend your time right now?

Would guess it's not something like delaying the launch of your latest greatest application just to finetune UITabBar icons by yourself. How much do you lose income in a day by doing that?

Seriously. Some people are good at design, some good at coding, some at graphics. Most are not, but still keep trying to do everything by themselves.

Tuesday, February 14, 2012

FontType 1.1 Release Notes and Future Plans

FontType version 1.1 was released on Apple AppStore on Monday. Official release note contains iOS5 compatibility, font metrics view and undefined fixes under the hood. Apple used 4 hours for the review (according to push notifications via iTC Mobile app), wonder what they were doing.

Biggest change is internal, out-of-sight, thanx to the objc_dep dependency graph tool. As you can see (in this linked article) the version 1.0 architecture was a bit dodgy, me coding at nights half asleep and during 15 minute breaks desperately trying to recall what the frak was I doing between constant context switches.

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: 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...