Knowledgebase
Integrating the OpenFeint SDK
OpenFeint is written in Objective-C++! This means that any and all files which invoke OpenFeint methods must be compiled with Objective-C++. The simplest way to compile with Objective-C++ is to change your file extension to .mm
Compiling and Linking the OpenFeint SDK
- Make sure you have the current version of OpenFeint. Unzip the
file.
- If you have previously used OpenFeint, delete the existing
group reference from your project
- Drag and drop the unzipped folder titled OpenFeint onto your
project in XCode. Make sure it’s included as a group and not
a folder reference.
- If your game is landscape only or portrait only, remove the
Resources/Landscape or Resources/Portrait folder from your project,
whichever you don't need. This is not a necessary step but helps
cut down the application size. You need to do this every time you
download a new OpenFeint project.
- Right click on your project icon in the Groups & Files
pane. Select Get Info.
- Select the Build tab. Make sure you have Configuration set to All Configurations
- Add to Other Linker Flags the value -ObjC
- Ensure 'Call C++ Default Ctors/Dtors in Objective-C' is checked under the 'GCC 4.2 - Code Generation' section
- NOTE: Older Xcode projects may have to add this as a user defined setting GCC_OBJC_CALL_CXX_CDTORS set to YES
- Ensure the following frameworks are included in your link
step:
- Foundation
- UIKit
- CoreGraphics
- QuartzCore
- Security
- SystemConfiguration
- libsql3.0.dylib
- libz.1.2.3.dylib (unless using OF_EXCLUDE_ZLIB as described below)
- You must have a prefix header. It must have the following line: #import “OpenFeintPrefix.pch”
Cool, it compiles now but I get a lot of build output spam
related to XIB files
We are working to reduce and eliminate these notices. They annoy us
too! You can disable these notices from appearing if you find that
you are missing valid warnings and errors among the spam by
following these steps:
- Open the Project Settings in Xcode and go to the Build
tab.
- Look for the 'Show Notices' setting under the heading
'Interface Builder Compiler'
- Make sure this setting is disabled / unchecked.
Note: If you are unable to find the 'Show Notices' setting you may add a User-Defined Setting named 'IBC_NOTICES' and set it to 'NO'.
Changes from 2.4 to 2.4.5 are listed below:
- High Score blobs use zlib for compression.
- If you don't want to include the zlib framework then add OF_EXCLUDE_ZLIB to your preprocessor definitions. This will disable compression
- If you want to use compression then include the libz.1.2.3.dylib framework
- There is now a setHighScore function in OFHighScoreService that takes in a NSData* parameter for the blob
- There is a new setting called OpenFeintSettingDisableCloudStorageCompression. Set it to true to disable compression. This is global for all high score blobs.
- There is a new setting called OpenFeintSettingOutputCloudStorageCompressionRatio. When set to true it will print the compression ratio to the console whenever compressing a blob.
For information about basic OpenFeint usage, settings, and initialization continue to OpenFeint Basics

