Ad

Our DNA is written in Swift
Jump

Author Archives rss

Podcast #26 – “iOS Dev Weekly”

Episode 26 for Saturday, February 25. “iOS Dev Weekly”

Daver Verwer lets us peek behind the scenes of the iOS Dev Weekly newsletter, Apple sold more iOS devices in 2011 than Macs every be fore. And we learn what an NSInception is.

Read more

Parsing ASN.1 for Certificates and Pleasure

When figuring out how to work with self-signed certificates and helping somebody debug an SSL problem I did a bit of research regarding the certificates being used on iOS and what functions are available to inspect these.

There are two functions provided to get more information from a SCCertificateRef , one to get a meager description, the other to get the entire certificate, encoded in ASN.1. But there you’re stuck, unless you want to mess with compiling and installing OpenSSL.

Read more

Linguan 1.0.4

This is a hot fix release addressing several issues that users found. You now have a new option to decode unicode sequences with two backslashes on loading strings files or scanning source code. Decoding and Encoding of slash escapes now uses the functions provided by genstrings2.

Read more

Podcast #25 – “Mountain Goat”

Apple releases Xcode 4.3 and previews OS X 10.8 “Mountain Lion”. And how an Open Source initiative got “sherlocked” by Apple.

Read more

Caching Caches

While doing some performance tuning on the iCatalog.framework I stumbled upon a method of about 7 statements where a single line was responsible for more than a third of all CPU time.

This basically was only getting the path to the app’s Library/Caches folder. By itself this statement looks very innocent and I had it in about a dozen places all around the app. But it turns out that if you calling it hundreds or thousands of times then the time it takes to search for the Caches (and Documents) path sums up enormously.

Interestingly it does not seem like Apple implemented any caching for them so they seem to use around the same time all the time. But these values are prime candidates for caching because they won’t change while your app is running. Also the objc function call to get a cached version of the paths is several orders of magnitude faster than determining it in the first place.

Read more

ObjectiveSee Interview

ObjectiveSee is a web site dedicated to interviewing iOS developers. They use the format of a Q&A and they have several intriguing people’s up already: Justin Williams, Nathan Spindel, Keith Blount, Whitney Young, … oh and ME!

Decompressing Files into Memory

As a hobby project I am working on uncovering hidden treasures that exist on all your iOS devices. Hidden, because there is no Objective-C API for them, Existing, because Apple includes a great deal of open source libraries in iOS, compiled as a dynamic library.

What items exist you can see if you check out what dylibs are there to be seen in “Link Binary with Libraries”. Most entries beginning with lib and ending with dylib can be used. Some people have reported getting rejected for adding the static variants of libraries like libxslt or libarchive, but that’s probably because Apple sees these symbols as duplicate to the ones contained in the dynamic libraries.

We previously looked at libxml2 for parsing HTML (and part 2), today we’ll familiarize ourselves with zlib for decompressing .gz and .zip files.

Read more

Podcast #24 – “Ingest This!”

Some Apple announcements for developers, some insight and some show notes.

Please comment, tweet or mail your suggestions on topics that are of interested to iOS (and by extension Cocoa developers in general).

Read more

Fast Folder Nuking on iOS

I got a strange bug report last week for iCatalog. Deleting of outdated catalogs takes too long, if we couldn’t show a HUD with a spinner while the deletion occurs. That was definitely one of these HUUUUU?! moments. I always thought that file deletion is instant on Unix since only an entry in a file table needs to be removed.

I grabbed an iPad 1 and deleted a 160 MB catalog. Only to find that the whole deletion – a simple NSFileManager removeItemAtPath – took 50 seconds. Uhm, no that is far from ideal to be blocking the main thread and interface for that long.

I played around a bit and over the course of the day, with some great help from several GCD experts on twitter, I pieced together a solution that might interest you if you ever have to delete large amounts of files in an instant. Before Cocoa, on Carbon, OSX offered a method called FSPathMoveObjectToTrashAsync, this is sort of the equivalent for iOS.

Read more

GeoCorder 1.3.2

Here’s another maintenance release fixing a crashing bug in the About section.

Changes

  • Fixed: Crash on trying to open usage instructions
  • Added: More detailed explanation of accuracy and filter settings

This update, like the one before it, goes out for the paid version of GeoCorder first. If the issues are resolved once this comes into the store then we’ll update the ad-sponsored version, too.

Update Feb 11th: The update has been approved.