Copyright (c) 2011 Doron Katz. All rights reserved. DoronKatz registered under ABN 68 954 062 611. Apple, the Apple logo, iPod, iPod touch, and iTunes are trademarks of Apple Inc., registered in the U.S. and other countries. iPhone is a trademark of Apple Inc. App Store is a service mark of Apple Inc. Theme by Cory Watilo

Filed under: iPad Dev

How to work with memory management in Objective-C

Working in Objective-C, unlike on the desktop, memory resources can be quite scarce on your favorite mobile platform. which makes it very important to not only guess but actually understand how to manage your memory within your application and code to ensure that the iOS does not 'kill' your application.

The iPhone cannot rely on garbage collection, something prevalent on desktop Objective-C. and indeed in most other object-oriented languages. You instead use reference counting which means you need to consciously be aware of who owns what object, when it should be alive and when it should die. Sounds kinda cruel huh?

Read the rest of this post »

Adding an iAd advertisement to your iPhone app

With the introduction if iOS 4, Apple have also introduced iAds, a mobile advertising platform that aims to convey a new concept of interactive marketing on your smart-device. Through CSS3 and multi-touching, you will get a WebKit-powered framework to deliver optimal user experience right within your app. This layer in fact sits on top of your application, so it won’t use your app-reserved memory, as well as not leaving the app when the user interacts with the ad, but rather displayed on top of it. 

Read the rest of this post »

Understanding iOS 4 Backgrounding and Delegate Messaging @ Dr. Touch

Now that we all are moving our source code gradually to iOS 4 I had to pause and think a bit about where to move which code. A problem that I’m facing frequently when updating a project is that the didFinishLaunching is only called if the app really launches.

That poses a bit of a challenge if you are used to doing things like refreshing images or other files off the internet. An app that is resumed from standby does no longer go through this delegate method. So an app that would always show fresh content upon launch before 4.0 multitasking would no longer load any new content as soon as you build it for 4.0. That’s actually one of the main reasons why I have not yet had time to update MyAppSales to 4.0.

Read the rest of this post »