Getting Started

General Use




Setting Up on Mac OSX

These notes are for developing a C++ application. If you are a developing a .NET/C# application please see our .NET Wiki instead.


Before we begin, you’ll need the following:

  • The latest Awesomium 1.7 SDK for Mac OSX (download it here)
  • An Intel Mac running Mac OS X 10.6 (“Snow Leopard”) or higher.
  • XCode 3.1.2 or higher

Install the SDK

Run the installer and follow the on-screen instructions.

Once installation is complete you should find samples under your /Applications directory and a copy of Awesomium.framework at /Library/Frameworks

Set up your project

Configure project settings

  1. Create a new project in XCode (either a Cocoa Application or Command Line Tool).
  2. Double click your project to open Project Info and select the Build tab. 1. Select All Configurations in the Configuration drop-down list. 1. Under the Architectures property, make sure 32-bit Universal is selected. 1. Under the Valid Architectures property, remove all architectures except i386. 1. Under the Framework Search Paths property (you may need to scroll down a bit to find it), add the path that contains the Awesomium.framework you copied earlier.

To use Awesomium in your Mac OSX application, you will need to link against the Awesomium framework.

There are actually a couple of ways you can do this:

  • Drag and drop Awesomium.framework onto the name of your project in XCode’s Groups & Files panel. In the dialog that appears, make sure your project is selected under Add To Targets.
  • OR double-click the name of your Application under the Targets list in XCode’s Groups & Files panel. Select the General tab and then click the + symbol under Linked Libraries. Click Add Other at the bottom of the dialog that appears and then browse to and select Awesomium.framework.

Copy the framework to your build distribution

If you don’t wish to install Awesomium.framework to your users’ /Library/Frameworks folder, there are a couple other ways to bundle the framework with your application based on what you’re building.

If your project is using an Application Bundle (e.g., you’re creating a Cocoa Application):
  1. Right-click your Application’s name under Targets in XCode’s Groupes & Files panel.
  2. Select Add -> New Build Phase -> New Copy Files Build Phase.
  3. In the dialog that appears, select Frameworks under the Destination drop-down list.
  4. Close the dialog.
  5. Expand your Application’s list of build phases (just click the little triangle next to your Application’s name under Targets to expand the list).
  6. Drag and drop Awesomium.framework onto the Copy Files build phase that you just created (should be the one at the bottom of the list).
  7. The Awesomium framework should automatically be copied into your Application Bundle every time you build your application.
If your project is NOT using an Application Bundle (e.g., you’re creating a Shell Tool):
  1. Create a folder named Frameworks in the directory above the directory that contains your built executable (this will usually end up being the build directory of your XCode project).
  2. Copy Awesomium.framework to the Frameworks folder.
  3. Your directory structure should look like the following:
¦   +---YourExecutable

Include the API

To include the entire API for Awesomium in your source files, you simply need to include WebCore.h.

#include <Awesomium/WebCore.h>

Further Reading