Note: to begin using the JavaScript (HTML5) SDK, see My First App for JS (HTML5).
- If you didn’t download the iOS SDK during installation, go through the installation again, deselecting the option to register and choose the FatFractal iOS SDK.
- Find the FatFractal_IOS_SDK.zip file in the
sdkdirectory of your installation and unzip it. - In Xcode, open the project you’d like the use FatFractal with, or create a new one. Be sure to enable Automatic Reference Counting (ARC) in your project.
- Open the project settings by selecting your project in the Project Navigator (⌘1) on the left side of the project window.
- Choose your application target in the list, then click the Build Phases tab.

- Expand the Link Binaries With Libraries section, the click the + to add a new library.

- Click Add Other…, then navigate to and choose the FFEF.framework file you unzipped above.
- To start using the FatFractal Platform in your code, all you need to do is instantiate a
FatFractalobject when your app launches, and save it somewhere. On iOS, a convenient place to save the object is in your app delegate object:#import <UIKit/UIKit.h> #import <FFEF/FatFractal.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) FatFractal *ff; @end
and a convenient place to instantiate it is the
application:didFinishLaunchingWithOptions:method:@synthesize ff = _ff; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSString *baseUrl = @"http://my_domain.fatfractal.com/my_app"; self.ff = [[FatFractal alloc] initWithBaseUrl:baseUrl]; ... return YES; }where you should replace
my_domainwith the domain you added above, andmy_appwith your application name. Alternatively, replacemy_domain.fatfractal.comwithlocalhostto target your local engine. - Your code is now ready to start accessing your backend using FatFractal API calls, using the
[FatFractal main]class method to get your instance whenever necessary.To store data, one additional step is necessary: login. To log in, use theloginWithUserName:andPassword:method:[[FatFractal main] loginWithUserName:@"user_name" andPassword:@"password"];
By default, the FatFractal backend will automatically register a user if they attempt to login with an unknown username, so this call is all you need. See Manage Users for more information.
For an in-depth tutorial on using the FatFractal Platform, see here.
- If you didn’t download the Android SDK during installation, go through the installation again, deselecting the option to register, and choose the FatFractal Android SDK.
- Download the Jackson Core and Jackson Mapper libraries.
- In your IDE, open the project you’d like the use FatFractal with, or create a new one. Step will be shown for Eclipse, but should be easily adapted to other IDEs.
- Drag the FF-Android-1.0.jar from the
sdkdirectory of your FatFractal installation into the libs directory of your project. - Likewise, drag the Jackson libraries from step 2 in the libs directory.

- To start using the FatFractal Platform in your code, all you need to do is instantiate a
FatFractalobject when your app launches, save it somewhere, and declare your object types that you want to store to the backend. On Android, a convenient place to save the object is in yourApplicationsubclass object:import com.fatfractal.ffef.FatFractal; import com.fatfractal.ffef.impl.FFPrefsAndroid; import com.fatfractal.ffef.impl.FatFractalHttpImpl; import com.fatfractal.ffef.json.FFObjectMapper; ... public class YourApplication extends Application { public static FatFractal ff = null; @Override public void onCreate() { super.onCreate(); String baseUrl = "http://my_domain.fatfractal.com/my_app"; String sslUrl = "https://my_domain.fatfractal.com/my_app"; try { ff = FatFractal.getInstance(new URI(baseUrl), new URI(sslUrl)); FFObjectMapper.registerClassNameForClazz(Class1.class.getName(), "Class1"); FFObjectMapper.registerClassNameForClazz(Class2.class.getName(), "Class2"); ... } catch (Exception e) { ... } FFPrefsAndroid.setContext(this.getApplicationContext()); } ... }where you should replace
my_domainwith the domain you added above, andmy_appwith your application name. Alternatively, replacemy_domain.fatfractal.comwithlocalhostto target your local engine. - Your code is now ready to start accessing your backend using FatFractal API calls, using the
FatFractal.getMain()class method to get your instance whenever necessary.To store data, one additional step is necessary: login. To log in, use theloginmethod:FatFractal.getMain().login("user_name", "password");By default, the FatFractal backend will automatically register a user if they attempt to login with an unknown username, so this call is all you need. See Manage Users for more information.
For an in-depth tutorial on using the FatFractal Platform, see here.





Facebook
Linked In
Twitter