• Examples (iOS)
• Examples (Android)
• Examples (C++)
Server API Documentation

 

» Client API setup | Objective-C

The Objective-C API provides a number of frameworks to develop native applications and games for Apple's iOS, tvOS and MacOS X.

View the instructions for your target platform:

» iOS, with Xcode 5 and higher

Compatibility note: the lowest version of iOS currently supported is iOS 6.

In the Project navigator, select your project, and select your target. Click on the Build Phases tab and expand Link Binaries With Libraries. Click the plus icon (+) and select Add Other... at the bottom left of the Frameworks window. Navigate to the SFS2XAPIIOS.framework folder that was unpacked previously, and select the SFS2XAPIIOS.framework folder (not the SFS2XAPIIOS file). Click Open.

» Other dependencies

Keep the Link Binaries With Libraries tab open from the previous step and click the plus icon (+).

» Other Linker Flags

Display your project settings by clicking on your project in the Project navigator and select the Build Settings tab. Type "other linker flags" in the search field. Enter -lz and -ObjC as values.

Finally import <SFS2XAPIIOS/SmartFox2XClient.h> in order to start using the SFS2X API for iOS.

» tvOS development with Xcode 7.1+ and higher

Compatibility note: the lowest version of tvOS currently supported is tvOS 9.0.

NOTE: A known bug in Xcode 7.1 currently prevents to use frameworks that are located outside of the project's folder. Make sure to copy the SFS2XAPI_tvOS.framework inside your project's main folder.

In the Project navigator, select your project, and select your target:

Keeping the same tab open, expand Link Binary with Libraries and add the following:

» Other Linker Flags

Display your project settings by clicking on your project in the Project navigator and select the Build Settings tab. Type "other linker flags" in the search field. Enter -lz and -ObjC as values.

Finally import <SFS2XAPI_tvOS/SmartFox2XClient.h> in order to start using the SFS2X API for OSX.

» OS X, with Xcode 5 and higher

Compatibility note: the lowest version of Mac OS X currently supported is Mac OS X 10.9 (Mavericks).

In the Project navigator, select your project, and select your target. Click on the Build Phases tab and expand Link Binaries With Libraries. Click the plus icon (+) and select Add Other... at the bottom left of the Frameworks window. Navigate to the SFS2XAPIOSX.framework folder that was unpacked previously, and select the SFS2XAPIOSX.framework folder. Click Open.

» Other dependencies

Keep the Link Binaries With Libraries tab open from the previous step and click the plus icon (+).

» Other Linker Flags

Display your project settings by clicking on your project in the Project navigator and select the Build Settings tab. Type "other linker flags" in the search field. Enter -lz and -ObjC as values.

Finally import <SFS2XAPIOSX/SmartFox2XClient.h> in order to start using the SFS2X API for OSX.

 

« back to client API list