Fauna SDK for iOS + Examples
- git
- Xcode 4.5.2
- iOS 4.3
The Fauna SDK for iOS is designed for use in distributions of client applications. It provides access to the parts of the Fauna API accessible via Client Keys and Tokens:
It does not currently provide access to publisher or administrative features of the API.
The code is organized in two projects under a single XCode workspace:
- Fauna: Fauna API Client.
- FaunaChat: A simple Example Chat-like application built with the Fauna API Client.
git clone git@github.com:fauna/fauna-ios.git
cd fauna-ios
open Fauna-iOS.xcworkspace
- Run the project.
-
git clone git@github.com:fauna/fauna-ios.git
-
Close any open Xcode projects related to the Fauna SDK (workspace, Fauna, FaunaChat, etc).
-
Open your Xcode project and using Finder, go to the directory fauna-ios/Fauna and Drag and Drop the file
Fauna.xcodeproj
into your Xcode project, right under the root of your project. Your Xcode project structure should now look like this:yourFaunaProject -> Fauna.xcodeproj -> Fauna -> Fauna.h -> yourFaunaProject -> yourFaunaProjectAppDelegate.h -> Frameworks -> Products
You should see a tree under Fauna.xcodeproj. If you don't see it then it's probably because Fauna.xcodeproj was already open in another Xcode instance. Go back to step 2.
-
Select your Project in the tree, select a Target(mostly with the same name as your project), navigate to the
Build Phases
tab and expandTarget Dependencies
. Click on+
and SelectFauna
. -
You are ready to use Fauna via
#import <Fauna/Fauna.h>
The best place to initialize the Fauna API Client is in your AppDelegate, example:
Fauna.client = [[FaunaClient alloc] initWithClientKeyString:@"<your-client-key>"];
Check FaunaExampleAppDelegate.m
in the FaunaChat project to see a more detailed snippet.
Copyright 2013 Fauna, Inc.
Licensed under the Mozilla Public License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.