Continuos Integration is the practice of integrating changes from many people as often as possible. Instead of merging changes once a month and spending time handling merge errors you try integrate every day, perhaps even every hour. Each integration is built and tested on a server. If there are build errors or test failures, you [...]
Continuos Integration for XCode projects
January 31st, 2010 by Christian Hedin — Agile, Testing
Tags: automated testing, hudson, objective-c, tools, tutorial, xcode
Test Driven Development in XCode
January 15th, 2010 by Christian Hedin — Testing
Test Driven Development, or TDD for short, is a simple software development practice where unit tests, small focused test cases, drive the development forward. This is most easily explained by the Three Rules of TDD that dictate the following:
You are not allowed to write any production code [...]
Tags: frameworks, iphone, mac, objective-c, programming, tdd, tools, tutorial
Google Translate and iPhone apps
January 11th, 2010 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
The Cocoa and Cocoa Touch frameworks has a really nice function for acquiring a localized string NSLocalizedString(). Just pass in a key and you are done, for strings that are known at least. Sometimes you are getting unknown strings from a data source not under your control, strings representing just a fraction of the text [...]
Tags: frameworks, iphone, localization, mobile, objective-c, web
Add some polish to iPhone app start up
June 29th, 2009 by Fredrik Olsson — Cocoa, Embedded
First impressions last, and the very first impression your users have of your iPhone application is the start up. First step is to have a nice Default.png, but not many words spilled on that one, it is well covered in Apple’s documentation.
Creating a perfect Default.png is impossible, especially if you have different setup of navigation [...]
Tags: frameworks, iphone, mobile, objective-c, programming
Queued Background Tasks for Cocoa
May 9th, 2009 by Fredrik Olsson — Architecture, Java
The megahertz race is over, and instead we get more execution cores. This means that we as developers must make our applications parallel, in order to take advantage of the new performance. The easiest way to be parallel is to execute tasks in new threads, something that is useful also for lengthy but not resource [...]
Tags: concurrency, design patterns, frameworks, iphone, mac, mobile, network, objective-c, open source, performance, programming
Regular Expressions and Cocoa
May 6th, 2009 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
Regular expressions is a powerful tool for solving many problems related to text. It can be misused as any good tool, but there are moments when they are the best solution for a given problem. At those moments the lack of regular expressions for Cocoa on Mac OS X and Cocoa Touch on iPhone OS [...]
Tags: apple, frameworks, iphone, mac, mobile, objective-c, open source, performance, programming, regex
Adding Sorted Inserts to Cocoa Arrays
March 28th, 2009 by Fredrik Olsson — Architecture, Cocoa, Embedded, Tips & Tricks
NSArray and NSMutableArray have methods for sorting arrays, NSArray returns new sorted arrays and NSMutableArray can be sorted in place. The sort methods comes in three flavours; using a function, using a selector, or using an array of NSSortDescriptor objects.
NSArray admits to sorts being a slow operation, and adds a method pair for comultive sorts [...]
Tags: frameworks, iphone, mobile, objective-c, open source, performance, programming
Bridging the Gap Between Java and Cocoa
March 24th, 2009 by Fredrik Olsson — Architecture, Embedded, Java, Tips & Tricks
Many Java developers are looking at new dynamic languages, such as Groovy and JRuby, mostly because of the freedom and rapid development that a dynamic language allows. Some of my colleagues are also looking at Cocoa and feel daunted at the sight of Objective-C.
Here I will use a small example that is easy and [...]
Tags: design patterns, frameworks, iphone, mobile, objective-c, programming, ruby
UIToolbars in iPhone OS 2.x
March 22nd, 2009 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
The new release of iPhone OS 3.0 adds some nice API:s for managing a contextual toolbar. This is well needed as toolbars in the current iteration of iPhone OS is not only poorly documented, it is also quite hard to do right. So I will go over how to do toolbars the right way, for [...]
Tags: apple, design patterns, frameworks, iphone, mobile, objective-c, open source, programming, tutorial
Proxy Based AOP for Cocoa Touch
March 6th, 2009 by Fredrik Olsson — Embedded, Tips & Tricks
UITabBarController is generally used as is, no subclassing required. It creates a UITabBar and manages a list of UIViewControllers, keeping track of the tab in focus, UI creation and everything nice. UITabBarController has a delegate, the UITabBarControllerDelegate protocol. Unfortunately this is not a superset of the UITabBarDelegate protocol, and UITabBarController already implements the UITabBarDelegate protocol [...]
Tags: aop, frameworks, iphone, objective-c, programming, proxy, reflection
Finding Subview of a Particular Class in Cocoa
February 24th, 2009 by Fredrik Olsson — Embedded, Tips & Tricks
Many of the UIView subclasses in Cocoa, and especially Cocoa Touch are created by combining many different simple views into a more complex view. UITableViewCell is a good example, concisting of almost a dozen subviews, UIImageView for the image, UILabel for the text, etc.
It is often nice to be able to reuse existing functionality when [...]
Tags: frameworks, iphone, mobile, objective-c, programming
UIButton troubles, a better solution
December 17th, 2008 by Fredrik Olsson — Architecture, Embedded, Java, Tips & Tricks
I described in my previous post how you can change the class of a live object instance. The use-case was a workaround for bug in Cocoa Touch’s UIKit. What if I could fix the bug, instead of applying a work around in my sub-class?
Update: Buttons created with UIButtonTypeRoundedRect is a special case returning a private [...]
Tags: design patterns, frameworks, iphone, objective-c, programming
