From the author of

From the author of

My earlier article "Building a Basic AppleScriptObjC (Cocoa-AppleScript) Application with Xcode" explained how AppleScriptObjC and Xcode can be used to build robust interface-based applications for the Mac. While that article demonstrated this principle through the creation of a very simple Hello World application, the techniques provided can serve as the basis for building more advanced applications, for real-world scenarios. In this article, we'll build on those techniques to create a functional application that can perform some basic image manipulations, including flipping, rotating, and scaling a chosen image.

If you want to follow along with the tutorial, download a functional copy of the completed application. Of course, it's also a good idea to have a working knowledge of AppleScript and a basic understanding of Objective-C. If you're new to either of these technologies, check out the suggested learning resources at the end of this article.

Creating the AppleScriptObjC Project

Start by launching Xcode, which you can find in the Mac App Store if you don't already have it. If the project template selection window doesn't appear automatically at launch, select File > New > Project to display it. Under OS X > Application, choose the Cocoa-AppleScript Application template and click Next (see Figure 1).

When the options screen appears, enter a product name, such as My Image Processor, and fill in your organization name and company identifier (in reverse URL format; that is, com.mycompany). You can also choose an App Store category, although this is really only necessary for apps you intend to distribute through the Mac App Store. When you're done, click Next (see Figure 2).