Part of the online course that I took from Stanford on iPhone app development involved choosing a final project. My top-level criteria for choosing a project included:
- Incorporate several different iOS technologies.
- Make use of an external web service and API.
- Interaction with an external web site.
What I eventually settled on was a concept for allowing a user to view and edit their iPhone Address Book contacts both within an app as well as in a full web browser.
This functionality is already available as a service now at iCloud.com. My plan was to start with this capability and over time begin to add new functionality (social sharing, etc).
The Contacts2Web app is now available in the App Store. In this document, I will cover some of the details that went into developing the app.
Posted in iOS
Tagged address book, code coverage, core data, core foundation, debugging, google analytics, instruments, iOS, leak, memory allocations, parse, singleton
When I was reviewing iOS memory management in the Apple documentation, I came across the section Use Local Autorelease Pool Blocks to Reduce Peak Memory Footprint
With the introduction of ARC (Automatic Reference Counting) memory management is largely taken care of for you. There are still some cases you need to worry about though, including an increase in your memory footprint caused by creating temporary objects in a loop.
Consider the following code that allows me to populate some test data into the iOS Address Book. Note that I inserted a sleep(4) after each iteration to more clearly show the memory allocation picture in steady state before a new iteration begins.