1991-2016—25 years of Art & Logic

Save Time & Energy with libcompression

Save Time & Energy with libcompression

In iOS 9 and macOS 10.11 Apple introduced the libcompression APIs to provide a more standard way of compressing and decompressing data in your apps while offering a selection of algorithms with tradeoffs between compression efficiency, time, and energy requirements. In the past I’ve used third party APIs to compress or decompress ZIP archives given the popularity of the format, but hadn’t considered using other algorithms to either benefit from better compression or energy efficiency. Given that, I decided to take a look at the algorithms offered by libcompression and see how they compare.
(more…)

Searching App Content with Core Spotlight

Searching App Content with Core Spotlight

In the first part of this series of posts about Core Spotlight we looked at how to use the Core Spotlight APIs to index application data, how to search that data using Spotlight, and how to respond when a user selects a search result for your application’s data. In this post we’ll take a look at how easy it can be to search that same index from within your app. The demo app has been updated and is still available on GitHub. (more…)

Indexing App Content with Core Spotlight

Indexing App Content with Core Spotlight

Core Spotlight has been available since iOS 9 but Apple has made some updates in iOS 10 that make it worth another look. In this series of posts I’ll look at how you can use Core Spotlight to index your application data and search that data both from within iOS using Spotlight and from within an app using some of the new Core Spotlight APIs such as CSSearchQuery.

Our Demo App

To demonstrate how to index application data using Core Spotlight I’ve created a basic iOS app that loads and displays information about some airports and heliports around the world. The app loads this data from a CSV file bundled within the app, displays a list of airports, and provides a basic detail view showing the airport on a map along with the type of airport and identification code. The source to the app is available on GitHub. (more…)

Smarter Debugging with Unified Logging & Activity Tracing

Smarter Debugging with Unified Logging & Activity Tracing

pexels-photoWhen developing for macOS, iOS, tvOS, or watchOS to get the best performance or provide a secure solution you often need to develop apps that run asynchronously using tools such as XPC, GCD, and NSOperationQueue. Debugging this type of code can be difficult, especially when data is being passed between queues, threads, or processes.

Logging is an age old technique to help in these situations, but it’s easy to be overwhelmed by the amount of log data and to introduce or mask problems because of the observer effect — the overhead associated with many logging frameworks. I know logging isn’t exactly going to steal the headlines away from Siri integration or watchOS 3, but as a developer it’s a valuable debugging tool and the changes in these APIs look to save some significant time while debugging crashes and squashing bugs.

(more…)

Highlights from the Apple Worldwide Developers Conference 2016 (WWDC16)

Highlights from the Apple Worldwide Developers Conference 2016 (WWDC16)

Apple held WWDC16 in San Francisco earlier this month to introduce new versions of iOS, tvOS, watchOS, and a new version of OS X that’s been rebranded as macOS. These new versions are available to developers now and will be more widely available through Apple’s Public Beta program soon, with final releases this Fall. Alongside the new software, Apple announced some exciting changes coming to the App Store, too: Search Ads and more open and flexible subscriptions. If you have an app for any of Apple’s platforms that could use an update for the new releases or are looking to build something new, now is a great time, so get in touch. Let’s take a look at some of the announcements in more detail. (more…)