Category Archives: iOS

Recently I've been working on some iOS 8 app extensions, and I've run into a few non-obvious details that might come in handy for anyone else in the same situation. Some of the following relates to bugs still in the system, and so will probably only be relevant for a limited time. Debugging: General The intended approach is simple: when you tell Xcode to run the extension, Xcode will ask you what host app you want to use. That app launches, you trigger your extension on the test device, and Xcode attaches to the extension so you can debug. The problem is that breakpoints often fail to actually pause execution, even if Xcode is attached to the process. Not for everyone, but for some of us. This can lead to paleo-style NSLog-based debugging,…

read more →

After my past travails using iCloud with Core Data, I was both interested and concerned when Apple announced CloudKit at WWDC 2014. In this post I'm going to go over what Apple has planned for CloudKit from the perspective of someone wanting to sync app data via some cloud-based means. "Planned" is a key word here, because it's still to early to say how things work in practice. CloudKit vs. iCloud Core Data CloudKit makes a refreshing change from iCloud Core Data in that there's a lot less magic going on in the framework. Using iCloud to sync Core Data is very slick, in that you can essentially treat changes from the cloud as if they had been made on a different thread. Changes get saved, you get notified, and you merge those changes and…

read more →

At WWDC 2014 Apple introduced Swift, a new programming language for iOS and OS X developers. Objective-C has had a long and distinguished run with Apple, but times change and we move on. In recognition of this, and in reference to the [objC retain]; shirts of days gone by, I set up a Teespring campaign to say goodbye-- gradually-- to Objective-C.

objC-autorelease-orange-Teespring objC-autorelease-blue-Teespring

Why not [objC release];? Swift is the clear way forward, but Objective-C won't be disappearing right away. In this context "autorelease" implies "release later". Objective-C doesn't disappear right now, but just wait until the end of the run loop...

All profits from these shirts will be donated to App Camp For Girls. (This campaign is not affiliated with App Camp For Girls, I just think it's a good idea).

permalink

My Passbook and iBeacon enabled business card was something of a hit at WWDC last week. Some people wanted more detail on how it worked or how to create their own version. This post describes the process, from the perspective of a software developer. If you're not a developer, there are numerous web sites that will help compose Passbook passes, but I can't personally vouch for any. The very basics: A Passbook pass is defined by a JSON file. Put the JSON file and any images the pass uses in a folder, and then use Apple's signpass tool to zip it up and sign it. Now you have a pass. Upload that to a properly-configured server and you can easily share it with others. To set up any kind of pass, you'll need: A "Pass Type ID" Certificate, which…

read more →

I'll be in San Francisco during WWDC next week (though without a ticket). This is the only time of year I ever think about business cards, and this year I decided that paper business cards suck and it was time to do something cooler. Instead I'll have an electronic card distributed via Passbook. Electronic cards are hardly a new idea but (on iOS) they usually depend on both people already having the business card app. With one of those I can't give you my card unless you already have the app or I can convince you to download it. It's the dark side of the network effect. Using Passbook nicely sidesteps this because anyone using an iPhone already has the app (people who don't use an iPhone can have a paper card to stick into their horse's…

read more →