4 ways to thread (iOS and Mac)

Guides | Tutorial By 5 years ago

There are many ways to thread on iOS and Mac, each have their own advantages and disadvantages.

Dynamic Headers in Xcode

Guides | Tutorial By 5 years ago

There have been a few very rare scenarios where I have actually required a dynamic header in a project. I mention Xcode in the title however this technique really applies to nearly any IDE or command line project.

Removing NSLogs for distribution

Guides | Tutorial By 5 years ago

When developing an iOS or Mac app, NSLogs are very handy during development. These are quite useless for an app on an end users phone or computer, so removing every log is often a good idea, especially if you like to log a lot of information. This might sound like a pain, commenting out every NSLog whenever you build for the AppStore? But no, there’s a much simpler solution, coming from our friend the preprocessor macro.

NSDateFormatter format strings

Guides By 5 years ago

Every time I bookmark one of these lists it seems to disappear soon after, so it’s time to make my own (laid out to my liking)

Using ScriptingBridge

Guides | Tutorial By 5 years ago

When interacting with other applications on the Mac, AppleScript is the main option to use. Writing AppleScript to run within an application can be pretty annoying, and there’s no syntax checking unless you write it in AppleScript Editor first and then bring over the code. A good solution is using the ScriptingBridge framework, which will provide you with a class interface to interact directly with a target application. Of course your target application must support Applescript, just as if you were writing the script manually.

NSNotificationCenter for iOS and Mac

Guides | Tutorial By 5 years ago

If you’ve ever needed to have an object with multiple delegates you may have created an array and then added each of your delegates to it. This does work but there’s a simpler way which is much easier to implement. Using the NSNotificationCenter you can have objects subscribe to the events/messages they want to know about and get called whenever that ‘event’ takes place. The Cocoa framework uses this as well, and let’s you subscribe to things such as an app entering the background, changing orientations, when it’s running out of memory and when the keyboard is presented or dismissed.

App Sandbox Kills

Thoughts By 5 years ago

As of June 1st this year all newly submitted apps and versions on the Mac Appstore require sandboxing. Sandboxing means that each app is run inside it’s own quarantined space to make sure the app doesn’t do anything malicious. For a lot of apps this will be sufficient, but for apps that let you do really special stuff this is the thing that kills them.

WWDC 2012, Predictions vs. Reality

News | Thoughts By 5 years ago

Following on from my predictions a couple of months ago, the results are in and the new products/updates have been announced.

WWDC 2012 Predictions

News | Thoughts By 5 years ago

Apple has just announced WWDC 2012 for June 11th – 15th. I’ve been thinking a bit about what they could possibly unveil, here are my predictions of what to expect and what not to expect:

Disabling document locks in OS X Lion

Guides By 5 years ago

In OS X Lion Apple introduced the concept of document versions, the ability to go back in time on documents and view or restore a version from the past. With this they introduced a “Lock” on documents that hadn’t been changed in over a week or so and requires you to unlock the document or duplicate it and save it elsewhere.