Test-drive the Demo

We recommend you have a look at the demo application, which can be found in the folder “samples/demo”. Open the project in Xcode and build it — everything should work out of the box. Have a look around to get a feeling of what can be done with Sparrow!

Xcode Step 1: Set up a Source Tree Variable

Before you dig into your own project, you have to prepare Xcode. We recommend to link Sparrow to your application via an Xcode project reference, as this makes it easy to update Sparrow later. Don’t worry, this has to be done only once.

In the Xcode preferences, tab: “Source Trees”, create a new Source Tree variable.

Create SPARROW_SRC and let it point to /path_to_sparrow/sparrow/src/

Be careful: Xcode does not allow any spaces in that path.

Xcode Step 2: Integrate the API Documentation

Xcode allows to integrate third party API reference documentation. That way, you will get information about Sparrow's classes, methods and properties directly while you write your code. The Sparrow docset is located here:

http://doc.sparrow-framework.org/core/feed/docset.atom

Xcode 4: open up the Xcode preferences and enter the Documentation tab. Add the link provided above as a "publisher".

Xcode 5: use the free Docs for Xcode application to manage your docsets. When installed, add the link from above as a feed.

Now you can get information about Sparrow classes and methods with the Alt single-click on symbol shortcut.

Create Your Own Game

The Sparrow download package contains a scaffold project at samples/scaffold, which is a pre-configured Sparrow application that is easy to customize. Reuse it to kick-start your own game project:

Copy the scaffold folder to the place you want your game to be, and open up the project in Xcode

Build and run to see if everything works fine. If it does not work, check if you have created the SPARROW_SRC variable in Xcode and if it points to the right place.

Rename the project to your liking by selecting the project node in the Project Navigator. Open the file inspector (⌥⌘1) and change the text in the Project Name field.

Click on “Product – Manage Schemes” and then on the Scheme name (“AppScaffold”) to rename that too.

The Sparrow Wiki contains several articles about the Scaffold. Be sure to have a look at them!