Our DNA is written in Objective-C

Tweeting Away the Crown Jewels

Rarely Tweets are really worth money. But as companies become more social-savvy they find that having users “pay with a tweet” for some benefits combines the viral growth potential of a tweet with the a direct or indirect benefit. When I saw an offer on Steam to buy 2 copies of the highly anticipated game Portal 2 I added 1 + 1 and figured that probably somebody out there might be interested in getting one copy (value €50) for free.

Over the last few days I did my first TweetAway, from Tweeting and Giveaway. Let’s examine the cost versus the benefit, if it turns out that this was worthwhile then we should do it more often in the future. Let’s look at the stats from bit.ly and twittercounter to see what this gained Cocoanetics.

Read more

Rewarding Gifts

Today I felt as if all the sweating over code of the past days finally got rewarded. Multiple times over.

A new iOS update, a Lion DP2 update and an Xcode update – all with minor fixes – were showing that Apple too was focussing on this reward nexus. There was a video of gay Apple employees, that can also be considered a gift to the world. My iPad 2 arrived. I ordered an 11″ Air. Makes us wonder if there is a cosmic significance to April 15th.

Ah yes, this day, 99 years ago, the Titanic chose to hit an iceberg to escape from Celine Dion’s title song for good.

During the day we had heard a rumor that Portal 2 might be lauched today, because somebody had found a page with a countdown. That had us excited and decreased our concentration while we kept returning to the page to see if the countdown had expired yet. In the end there was another practical joke in true Portal tradition: they are promoting a “Potato Sack” bundle where the number of CPUs playing these games serve to speed up the “reboot” of the evil Portal mainframe. Long story short: My raffle continues until the official launch, you can still participate.

Read more

Experiments in Blog Advertising

For the past few months I invited ads of fellow developers onto the Cocoanetics blog. I was quite dissatisfied with the payout from Google Adsense (like $1 per week) and this prompted me to search for additional methods to offset the cost of my hobby. I previously wrote about how you can express your appreciation and that my server bills for $60 per month. This mark continues to be my break even point.

Let me share the results we got with different kinds of banner advertisements and what we learned from this experiment.

Read more

Where to find fixed-staff iOS Developers?

I was given the compliment today that when asking a question on Twitter I would usually give an answer for all other people interested in the topic. I didn’t do that consciously until now, but I want to start this tradition with this article. Also if I was not following the respondents until now, this prompted me to do so.

You know, the situation is dim, we have too many developers attending WWDC and yet not enough to go around letting themselves be hired.

In preparation for a brainstorming on this subject I asked this question: “Looking for some good suggestions where a company looking to hire fixed staff iOS devs would find people. What would you recommend they do?”

Read more

Pieceable Launches Online Demos for Your iOS Apps

Just when I was sitting down to do a quick tutorial I saw a tweet that picquet my interest. Something about “Pieceable Viewer Runs iPhone Apps From Your Browser”. While the text is utter nonsense it was still tempting and so I clicked through.

Much to my amazement I found that this company Pieceable just launched the equivalent of online demos that we iOS developers where eying with jealousy on some Android app store. Just recently we heard that since Android was essentially Java you could basically also run these apps in the browser, provided you had the appropriate frameworks available.

Read more

Cocoanetics Portal 2 Raffle

Fans of this blog and twitter followers alike will have a chance to get a free copy of Portal 2 on Steam. This highly anticipated game will be released on April 19th, round about the time when @Cocoanetics will surpass 2500 followers on Twitter.

When I went to Steam to pre-order my copy I saw an offer to buy two copies and give one away. So I thought that this might be a nice way to say “thank you!” for you being a frequent visitor to my blog and for following me on twitter.

To participate all you need to do is tweet the following text. On April 19th I will have tweetaways select a random winner from all the ones who tweeted the correct phrase.

Portal 2 Giveaway by @cocoanetics (BTW a great source for iOS dev info): http://bit.ly/g5nsKG #raffle

Good Luck!

MyAppSales 1.0.19

The latest HotFix committed to the MyAppSales GitHub repo contain a fix for an AJAX change on iTunes connect.


  • Fixes a problem where only the first daily or weekly report would be downloaded.

The problem started to occur because apple added a javascript function call into the method to switch between days and weeks. Something to do with rate limiting, I think they now disable the download button while the AJAX request is ongoing.

Development of version 2.0 is still ongoing, you can sneak a peak on the development branch. There are a couple of  things to do before I can merge it back into master: changing the charting to DTChartView and doing the summing per app on a background thread.

In the future I am still hoping that the Open Source community will get a bit more involved than it has been. i.e. totally hands off. I’ve open sourced MyAppSales precisely because I was hoping for contributions, but I have yet to see the first.

Splitting a String into Paragraphs … with Blocks

I found myself in need of splitting an NSString into paragraphs. Or more precisely to analyze a string and find the NSRange for each such paragraph. At first I wrote a C-style function that looked for the ‘\n’ in the NSString’s utf8String, but it turns out that this approach has problems with multi-character UTF8 sequences.

For the longest time I shirked from using Blocks, which became part of iOS with iteration 4.0. But since this project will have a minimum deployment target of higher than this, I gained the ability to use a block-based enumeration function to achieve my goal with a record minimum of code.

Read more

Apple and Cocoanetics Reach Licensing Agreement

CUPERTINO, California; VIENNA, Austria —April 1, 2011—Apple® and Cocoanetics.com are jointly announcing today that a licensing agreement has been reached that will allow Apple to distribute the highly acclaimed software components of Cocoanetics.com to registered iOS developers worldwide as sample code. Two specific components for displaying a calendar interface (DTCalendarView) and for displaying charts (DTChartView) will be merged with the upcoming iOS SDK 5.0.

“We wanted to make a joint announcement at WWDC this year, but since the information on this deal has already been leaked it is my pleasure to announce the details of this wonderful partnership.” said Philip Schiller, Apple’s senior vice president of Worldwide Product Marketing. “If you are an iOS or Mac OS X software developer, then you know that you can definitely learn from Cocoanetics.”

Apple is also looking at merging the technology from Cocoanetics.com open source project NSAttributedString+HTML into iOS SDK 5.0, but due to the open source nature of the project there are licensing ramifications that need to be worked around. Lawyers of both companies are working to find a way to make the source code proprietary to Apple while exposing the API as native option to developers.

“The Mac always had this great way to make attributed strings from HTML and while iOS 3.2 brought CoreText to the mobile platform this was the missing link to enable developers to ditch UIWebView once and for all,” said Oliver Drobnik, CEO and chief developer at Cocoanetics.com.

Apple designs Macs, the best personal computers in the world, along with OS X, iLife, iWork and professional software. Apple leads the digital music revolution with its iPods and iTunes online store. Apple has reinvented the mobile phone with its revolutionary iPhone and App Store, and has recently introduced iPad 2 which is defining the future of mobile media and computing devices.

Cocoanetics.com blogs about topics that are of interest to iOS developers worldwide, produces high-quality software components, produces and publishes apps for the App Store and provides consulting and contracting services for clients worldwide. Fashion catalog publishers use Cocoanetics’ iCatalog technology to publish digital versions on iPad.

Press Contacts:
Bill Evans
(408) 974-0610

Oliver Drobnik

Read more

Cloning a Git Repo with Submodules

I was setting up a project with one submodule on my working iMac and was wondering how to do this most quickly. After tweeting the approach I had found, there where quickly some very smart people responding on how to do that better. I found this kind of crowd-sourced incremental improvement exhilarating, so I’m sharing it with you.

Read more