Adding Box2D to Xcode

Grab the Box2D folder and drag it into your Xcode project.

b2d1

b2d2

Make sure copy items and the correct target are both checked.

b2d3

In the project build settings, filter by “user”.

b2d4

Under ‘User Header Search Paths’ add a . for the current directory and select recursive.

b2d5

Set ‘Always Search User Paths’ to YES.

b2d6

For the given source file, you need to change the extension to *.mm

b2d7

Doing so, changes the default type to Objective-C++.

b2d8

Finally, import Box2D and begin your journey.

b2d9

iOS drawing experiments

Sample output from an iOS drawing app I’ve been working on.

My wife posing for the camera:

new3

Waiting for the elevator, holding my sleeping daughter:

sample2

An autumn tree in our neighbourhood:

sample1

Some crazy box thingy of my father’s old green Camero:

twistedCamaro1