Our DNA is written in Objective-C

Decoding Safari’s Pasteboard Format

If you have ever looked at UIPasteboard you might have seen that there are a variety of public types, like colors, images, plain text or URLs. But applications are also free to implement their own types to be put on the pasteboard when the existing types don’t do justice to your content.

One such custom type is being used between Apple’s iOS apps, like mobile Safari, whenever you copy HTML snippets: “Apple Web Archive pasteboard type”. At first glance this looks really secretive because all you can see there is a long string of numbers representing the NSData for it.

Today I am unveiling an Open Source solution to consuming this pasteboard type as well: DTWebArchive. Using this you can let your users copy something from Safari or Mail and pasted it into your app while preserving the rich text. I put this code into a new GitHub repository because even if you don’t dabble with CoreText and NSAttributedStrings+HTML then this project can be very useful to you.

Read more

iWoman 2.0.4

There was a stupid problem before this version that could only be seen by users who where traveling between time zones. Notes that you made for a specific date would disappear when you moved into a different time zone and reappear if you moved back. This taught me that it is a bad idea to use an NSDate for a primary key.

Updating a lower version iWoman will restore all entries that might have disappeared. In very rare circumstances – involving traveling more than 12 time zones – some entries might end up the day before or after the day they were originally entered on.

The second change came from a user request who wanted to see the day number on all days of the cycle view. Previously it would not be shown on fertile days.

Read more

NSAttributedString+HTML Q&A

Over the past few months I have received questions about NSAttributedString+HTML and Rich Text Editing. Here are the Frequently Asked Questions.

I generally abbreviate NSAttributedString+HTML as NSAS+HTML. If your question or app is not in this list please let me know.

Read more

Adding Fading Gradients to UITableView

Jason Jardim asked (4 Months ago):

This is just a screen shot I found with someone posting a similar question.  I am trying to fade out he top/ bottom cells in a tableview. How do I achieve this effect?

First of all, Jason, I am sorry it took so long. I was extremely busy during the past few months but I kept your e-mail at the bottom of my inbox as something that I am really interested in to give a good answer to.

Let me make it up for you by proposing several solutions to your question as well as show one that I find the coolest.

Read more

Hello Mr. Chairman Steve Jobs

Some of the media called it the end of an era when Steve Jobs quit his job as Apple’s CEO. But contrary to the first taste such a statement might leave in your mouth it not at all means that Steve is leaving Apple.

In his open letter he was clear that he still wants to play an important role, but just not on the stressful position of Chief Executive Officer. He’s doing what he should have done all along, but Apple was too much afraid of the negative impact that this might have on the stock price.

So this set of announcements had to wait until a potentially very strong financial quarter – Apple is said to release new hardware this quarter that will positively impact their bottom line. Also, they waited until having more or less become the most valuable company on earth with only Exxon Mobile to rival their market cap. Finally the news releases where made outside of regular trading hours, which again shows that Apple tries to avoid a panic on the stock market.

Read more

Back … and Many News

I spent last week at several beaches in Corsica and when I came back I figured I would want to prolong the silence of not reading e-mails for one more day. And how peaceful that felt, I can only recommend that. Instead I spent Monday in my hammock an continued reading a Clive Cussler novel.

When I returned to my office on Tuesday I found more than 270 unread e-mails in my inbox. It took me around 4 hours to comb through these with a jackhammer and to trim it down to like a dozen or so that I will have to act upon.

Read more

We’ll be back soon

Seems like everybody is taking some time off in August. So we booked a last-minute vacation as well. There will be no e-mail checking until we get back, so please be patient with your requests and wishes.

We’ll be back at your service on August 23rd.

Cocoanetics now with Proper SSL Certificate

Last week I finally gave in and shelled out for a wildcard SSL certificate for *.cocoanetics.com. This means that any address you have been using on this domain via HTTPS has been changed.

Previously you where using a self-signed certificate  which cause several problems, amongst those that you could not directly set up my Subversion repos you have access to in Xcode because you needed to first permanently accept the certificate even though it could not be verified. So you had to do the first checkout in terminal. Once accepted it would work in Xcode too.

Read more

iOS Versions in the Wild

Apple sends a clear message to us developers: “Stop supporting 3.x”. They say that most loudly by omitting Simulator 3.2 from Xcode 4.1 which I painfully noticed when I wanted to debug a 3.2 bug in a component of mine. I had updated everything to Lion and installed Xcode 4.1 because that’s the first version supporting Lion.

So if you are basing your operations on the most current “stable” versions of the OS and Xcode then you cannot support 3.2 without jumping through some extra hoops. So I did some research to find if anybody is actually still using 3.2. Unfortunately Apple forbids ad networks from collecting and publishing device data because that would also show us info about future iOS devices.

So what is the trend and current status? Read on.

Read more

Hardware for Developing and Testing

Devin Snipes asks:

1. When it comes to iOS programming, does it matter what type of machine you have? I’m using a 2010 MacBook Air, and everything feels fine, although I’ve heard from some developers that xcode feels sluggish on 4GB of ram and they must get every Mac that comes out.

2. When compiling and submitting an app for 3.1.3, is it best to test your apps on all devices (i.e first generation devices) or would my iPhone 4 and the simulator do the trick?

Thank you for taking the time to answer my questions. Although I could perform a simple Google search for these questions, I’d prefer to get the answer from a well-known, trusted iOS developer.

It’s early in the morning and I am extraordinarily grumpy. But since you asked nicely I’ll try to give you my opinion.

Read more