Using Core Data with Swift
Mar 16, 2015
Over the past month or so I’ve been diving into Swift, after many years of working with Objective-C on Macs and iOS. It’s been a change but, gradually, I’m learning the Swift way of doing things. On the way I’ve run into a few bumps in the road when dealing with Core Data, and I thought would be useful to share how I got past them.
Xcode Generated Subclasses Considered Harmful This is the main impetus for this post.
Sharing data between iOS apps and app extensions
Nov 20, 2014
Since iOS app extensions run as part of a host application rather than as part of their containing app (i.e. your app’s extensions run in somebody else’s app), data sharing isn’t automatic. Finding standard locations like the documents directory doesn’t work for shared data. In this post I’ll go through the details of how to make it all work.
Along the way I’ll get into how to set up real-time messaging between apps and their extensions.
iOS 8 App Extension Demo
Nov 19, 2014
iOSDevCamp Colorado was a couple of weeks ago and I did a presentation/demo on iOS app extensions. I wanted to focus on how to actually do things, so mostly I worked in Xcode rather than present from slides. But rather than paste code in as I went or (gasp!) try to do it live, I worked from a git repository I had built while developing the demo app. Every time I made a significant change, I’d commit it.
iOS 8 App Extension Development Tips
Oct 3, 2014
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.
CloudKit: Moves like Azure
Jun 17, 2014
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.
[objC autorelease]; t-shirts
Jun 10, 2014
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.
Making your own Passbook Business Card
Jun 9, 2014
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.
Passbook and iBeacon for a 21st Century Business Card
May 30, 2014
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.
Apr 12, 2014
Last year I did a series of posts here where I ran through problems I had encountered with Core Data’s iCloud integration, with various solutions and workarounds I had been able to devise. Then iOS 7 and Mac OS X 10.9 came out with numerous visible (and internal) updates and people started asking me, so, is it any better now? Can we use it?
Since then, the answer has been: I have no frickin’ idea.
Probably Approximately Correct Location for iOS
Oct 28, 2013
If you’re writing an iOS app and you need to know the user’s current location, the answer is straightforward: use Core Location. That fires up device GPS (when available). Apple’s A-GPS combines this with things like local Wifi networks and IP addresses to work out the device’s location. All of this, of course, assuming that the user allows your app to know their location.
That’s great if you actually need nearly-exact location information.