Examples (iOS)
Examples (Android)

 

» iOS/Objective-C examples

In this section of the documentation we provide a series of brief tutorials on the examples for the Apple iOS platform distributed as a separate package on the SmartFoxServer 2X download page.

Most tutorials analyse a single example, describing its objectives, giving an insight into the SmartFoxServer features it wants to highlight and providing the direct link to download the source code, which includes all the assets required to compile and test it (both client and — if existing — server side). If necessary, code excerpts are provided in the tutorial itself, in order to better explain the approach that was followed to implement a specific feature. At the bottom of the tutorial, additional resources are linked if available.

The tutorials are ordered following the increasing complexity of the examples they refer to: we go from the simplest application we could think of, which just shows how to connect to SmartFoxServer, to a fully featured Tic-Tac-Toe game.

» iOS vs OSX

All of the examples have been developed using Xcode 4 and are targeting the iPhone device. Since iOS and OSX are so closely related, these examples can easily be ported to an OSX template and be compiled for the desktop. The major differences will be in user interface elements. Please note that the iOS API is packaged separately from the OSX API. The API itself are identical in each package, however to accomodate the different architectures, they have been packaged separately for ease of use.

Unless otherwise noted, inside the tutorials:

NOTE
All the examples make use of the latest version of the SmartFoxServer 2X iOS API available when they have been published. As the API evolve in time (bug fixes, new features), we strongly recommend that, after downloading an example, you overwrite the included API Framework folder with the one provided in the latest SmartFoxServer package or patch available on our website.

Time to click on the first example in the sidebar... enjoy the reading!