usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [59/89] usergrid git commit: Major Updates. See commit details.
Date Thu, 18 Feb 2016 15:53:07 GMT
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Source/UsergridKeychainHelpers.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Source/UsergridKeychainHelpers.swift b/sdks/swift/Source/UsergridKeychainHelpers.swift
index 2d7dee6..4639832 100644
--- a/sdks/swift/Source/UsergridKeychainHelpers.swift
+++ b/sdks/swift/Source/UsergridKeychainHelpers.swift
@@ -31,7 +31,7 @@ import UIKit
 #endif
 
 private let USERGRID_KEYCHAIN_NAME = "Usergrid"
-private let USERGRID_DEVICE_KEYCHAIN_SERVICE = "DeviceUUID"
+private let USERGRID_DEVICE_KEYCHAIN_SERVICE = "SharedDevice"
 private let USERGRID_CURRENT_USER_KEYCHAIN_SERVICE = "CurrentUser"
 
 private func usergridGenericKeychainItem() -> [String:AnyObject] {
@@ -50,7 +50,7 @@ internal extension UsergridDevice {
         return keychainItem
     }
 
-    static func createNewUsergridKeychainUUID() -> String {
+    static func createNewDeviceKeychainUUID() -> String {
 
         #if os(watchOS) || os(OSX)
             let usergridUUID = NSUUID().UUIDString
@@ -58,13 +58,17 @@ internal extension UsergridDevice {
             let usergridUUID = UIDevice.currentDevice().identifierForVendor?.UUIDString ?? NSUUID().UUIDString
         #endif
 
-        var keychainItem = UsergridDevice.deviceKeychainItem()
-        keychainItem[kSecValueData as String] = (usergridUUID as NSString).dataUsingEncoding(NSUTF8StringEncoding)
-        SecItemAdd(keychainItem, nil)
         return usergridUUID
     }
 
-    static func usergridDeviceUUID() -> String {
+    private static func createNewSharedDevice() -> UsergridDevice {
+        var deviceEntityDict = UsergridDevice.commonDevicePropertyDict()
+        deviceEntityDict[UsergridEntityProperties.UUID.stringValue] = UsergridDevice.createNewDeviceKeychainUUID()
+        let sharedDevice = UsergridDevice(type: UsergridDevice.DEVICE_ENTITY_TYPE, name: nil, propertyDict: deviceEntityDict)
+        return sharedDevice
+    }
+
+    static func getOrCreateSharedDeviceFromKeychain() -> UsergridDevice {
         var queryAttributes = UsergridDevice.deviceKeychainItem()
         queryAttributes[kSecReturnData as String] = kCFBooleanTrue as Bool
         queryAttributes[kSecReturnAttributes as String] = kCFBooleanTrue as Bool
@@ -73,13 +77,57 @@ internal extension UsergridDevice {
         if status == errSecSuccess {
             if let resultDictionary = result as? NSDictionary {
                 if let resultData = resultDictionary[kSecValueData as String] as? NSData {
-                    if let keychainUUID = String(data: resultData, encoding: NSUTF8StringEncoding) {
-                        return keychainUUID
+                    if let sharedDevice = NSKeyedUnarchiver.unarchiveObjectWithData(resultData) as? UsergridDevice {
+                        return sharedDevice
+                    } else {
+                        UsergridDevice.deleteSharedDeviceKeychainItem()
                     }
                 }
             }
         }
-        return UsergridDevice.createNewUsergridKeychainUUID()
+
+        let sharedDevice = UsergridDevice.createNewSharedDevice()
+        UsergridDevice.saveSharedDeviceKeychainItem(sharedDevice)
+        return sharedDevice
+    }
+
+
+    static func saveSharedDeviceKeychainItem(device:UsergridDevice) {
+        var queryAttributes = UsergridDevice.deviceKeychainItem()
+        queryAttributes[kSecReturnData as String] = kCFBooleanTrue as Bool
+        queryAttributes[kSecReturnAttributes as String] = kCFBooleanTrue as Bool
+
+        let sharedDeviceData = NSKeyedArchiver.archivedDataWithRootObject(device);
+
+        if SecItemCopyMatching(queryAttributes,nil) == errSecSuccess // Do we need to update keychain item or add a new one.
+        {
+            let attributesToUpdate = [kSecValueData as String:sharedDeviceData]
+            let updateStatus = SecItemUpdate(UsergridDevice.deviceKeychainItem(), attributesToUpdate)
+            if updateStatus != errSecSuccess {
+                print("Error updating shared device data to keychain!")
+            }
+        }
+        else
+        {
+            var keychainItem = UsergridDevice.deviceKeychainItem()
+            keychainItem[kSecValueData as String] = sharedDeviceData
+            let status = SecItemAdd(keychainItem, nil)
+            if status != errSecSuccess {
+                print("Error adding shared device data to keychain!")
+            }
+        }
+    }
+
+    static func deleteSharedDeviceKeychainItem() {
+        var queryAttributes = UsergridDevice.deviceKeychainItem()
+        queryAttributes[kSecReturnData as String] = kCFBooleanFalse as Bool
+        queryAttributes[kSecReturnAttributes as String] = kCFBooleanFalse as Bool
+        if SecItemCopyMatching(queryAttributes,nil) == errSecSuccess {
+            let deleteStatus = SecItemDelete(queryAttributes)
+            if deleteStatus != errSecSuccess {
+                print("Error deleting shared device data to keychain!")
+            }
+        }
     }
 }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Source/UsergridQuery.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Source/UsergridQuery.swift b/sdks/swift/Source/UsergridQuery.swift
index 9dfd10a..7d08e35 100644
--- a/sdks/swift/Source/UsergridQuery.swift
+++ b/sdks/swift/Source/UsergridQuery.swift
@@ -81,7 +81,18 @@ public class UsergridQuery : NSObject,NSCopying {
     }
     
     // MARK: - Builder Methods -
-    
+
+    /**
+    Contains. Query: where term contains 'val%'.
+
+    - parameter term:  The term.
+    - parameter value: The value.
+
+    - returns: `Self`
+    */
+    public func contains(term: String, value: String) -> Self { return self.containsWord(term, value: value) }
+
+
     /**
     Contains. Query: where term contains 'val%'.
     
@@ -118,7 +129,7 @@ public class UsergridQuery : NSObject,NSCopying {
      
      - returns: `Self`
      */
-    public func asc(term: String) -> Self { return self.sort(term, sortOrder: UsergridQuerySortOrder.Asc) }
+    public func asc(term: String) -> Self { return self.sort(term, sortOrder: .Asc) }
     
     /**
      Sort descending. Query: order by term desc
@@ -136,7 +147,7 @@ public class UsergridQuery : NSObject,NSCopying {
      
      - returns: `Self`
      */
-    public func desc(term: String) -> Self { return self.sort(term, sortOrder: UsergridQuerySortOrder.Desc) }
+    public func desc(term: String) -> Self { return self.sort(term, sortOrder: .Desc) }
     
     /**
      Filter (or Equal-to). Query: where term = 'value'.
@@ -262,7 +273,7 @@ public class UsergridQuery : NSObject,NSCopying {
     }
     
     /**
-     Joining operation to combine conditional queries.
+     Or operation for conditional queries.
      
      - returns: `Self`
      */
@@ -273,6 +284,19 @@ public class UsergridQuery : NSObject,NSCopying {
         }
         return self
     }
+
+    /**
+     And operation for conditional queries.
+
+     - returns: `Self`
+     */
+    public func and() -> Self {
+        if !self.requirementStrings.first!.isEmpty {
+            self.requirementStrings.insert(UsergridQuery.AND, atIndex: 0)
+            self.requirementStrings.insert(UsergridQuery.EMPTY_STRING, atIndex: 0)
+        }
+        return self
+    }
     
     /**
      Not operation for conditional queries.
@@ -311,6 +335,18 @@ public class UsergridQuery : NSObject,NSCopying {
         self.collectionName = collectionName
         return self
     }
+
+    /**
+     Sets the collection name.
+
+     - parameter type: The new collection name.
+
+     - returns: `Self`
+     */
+    public func type(type: String) -> Self {
+        self.collectionName = type
+        return self
+    }
     
     /**
      Sets the limit on the query.  Default limit is 10.
@@ -346,7 +382,19 @@ public class UsergridQuery : NSObject,NSCopying {
         self.cursor = value
         return self
     }
-    
+
+    /**
+     A special builder property that allows you to input a pre-defined query string. All builder properties will be ignored when this property is defined.
+
+     - parameter value: The pre-defined query string.
+
+     - returns: `Self`
+     */
+    public func fromString(value: String?) -> Self {
+        self.fromStringValue = value
+        return self
+    }
+
     /**
      Adds a URL term that will be added next to the query string when constructing the URL append.
      
@@ -451,6 +499,17 @@ public class UsergridQuery : NSObject,NSCopying {
     }
     
     private func constructURLAppend(autoURLEncode: Bool = true) -> String {
+
+        if let fromString = self.fromStringValue {
+            var requirementsString = fromString
+            if autoURLEncode {
+                if let encodedRequirementsString = fromString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) {
+                    requirementsString = encodedRequirementsString
+                }
+            }
+            return "\(UsergridQuery.QUESTION_MARK)\(UsergridQuery.QL)=\(requirementsString)"
+        }
+
         var urlAppend = UsergridQuery.EMPTY_STRING
         if self.limit != UsergridQuery.LIMIT_DEFAULT {
             urlAppend += "\(UsergridQuery.LIMIT)=\(self.limit.description)"
@@ -495,7 +554,8 @@ public class UsergridQuery : NSObject,NSCopying {
     private(set) var collectionName: String? = nil
     private(set) var cursor: String? = nil
     private(set) var limit: Int = UsergridQuery.LIMIT_DEFAULT
-    
+
+    private(set) var fromStringValue: String? = nil
     private(set) var requirementStrings: [String] = [UsergridQuery.EMPTY_STRING]
     private(set) var orderClauses: [String:UsergridQuerySortOrder] = [:]
     private(set) var urlTerms: [String] = []

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Source/UsergridResponse.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Source/UsergridResponse.swift b/sdks/swift/Source/UsergridResponse.swift
index 012c82f..d2b025d 100644
--- a/sdks/swift/Source/UsergridResponse.swift
+++ b/sdks/swift/Source/UsergridResponse.swift
@@ -34,7 +34,7 @@ public typealias UsergridResponseCompletion = (response: UsergridResponse) -> Vo
 
 If a request is successful, any entities returned in the response will be automatically parsed into `UsergridEntity` objects and pushed to the `entities` property.
 
-If a request fails, the `errorName` and `errorDescription` will contain information about the problem encountered.
+If a request fails, the `UsergridResponseError.error` property will contain information about the problem encountered.
 */
 public class UsergridResponse: NSObject {
 
@@ -97,7 +97,7 @@ public class UsergridResponse: NSObject {
     /// The string value.
     public var stringValue : String? {
         if let responseJSON = self.responseJSON {
-            return NSString(data: try! NSJSONSerialization.dataWithJSONObject(responseJSON, options: .PrettyPrinted), encoding: NSASCIIStringEncoding) as? String
+            return NSString(data: try! NSJSONSerialization.dataWithJSONObject(responseJSON, options: .PrettyPrinted), encoding: NSUTF8StringEncoding) as? String
         } else {
             return error?.description
         }
@@ -189,9 +189,9 @@ public class UsergridResponse: NSObject {
     public func loadNextPage(completion: UsergridResponseCompletion) {
         if self.hasNextPage, let type = (self.responseJSON?["path"] as? NSString)?.lastPathComponent {
             if let query = self.query?.copy() as? UsergridQuery {
-                self.client?.GET(type, query: query.cursor(self.cursor), completion:completion)
+                self.client?.GET(query.cursor(self.cursor), queryCompletion:completion)
             } else {
-                self.client?.GET(type, query: UsergridQuery(type).cursor(self.cursor), completion:completion)
+                self.client?.GET(UsergridQuery(type).cursor(self.cursor), queryCompletion:completion)
             }
         } else {
             completion(response: UsergridResponse(client: self.client, errorName: "No next page.", errorDescription: "No next page was found."))

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Source/UsergridUser.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Source/UsergridUser.swift b/sdks/swift/Source/UsergridUser.swift
index b1eedcc..0c98b5f 100644
--- a/sdks/swift/Source/UsergridUser.swift
+++ b/sdks/swift/Source/UsergridUser.swift
@@ -268,7 +268,7 @@ public class UsergridUser : UsergridEntity {
         if let usernameValue = username {
             query.or().eq(UsergridUserProperties.Username.stringValue, value: usernameValue)
         }
-        client.GET(USER_ENTITY_TYPE, query: query) { (response) -> Void in
+        client.GET(query) { (response) -> Void in
             completion(error: response.error, available: response.entity == nil)
         }
     }
@@ -319,8 +319,8 @@ public class UsergridUser : UsergridEntity {
     */
     public func login(client: UsergridClient, username:String, password:String, completion: UsergridUserAuthCompletionBlock? = nil) {
         let userAuth = UsergridUserAuth(username: username, password: password)
-        client.authenticateUser(userAuth,setAsCurrentUser:false) { [weak self] (auth, user, error) -> Void in
-            self?.auth = userAuth
+        client.authenticateUser(userAuth,setAsCurrentUser:false) { (auth, user, error) -> Void in
+            self.auth = userAuth
             completion?(auth: userAuth, user: user, error: error)
         }
     }
@@ -400,6 +400,62 @@ public class UsergridUser : UsergridEntity {
         }
     }
 
+    /**
+     A special convenience function that connects a `UsergridDevice` to this `UsergridUser` using the shared instance of `UsergridClient`.
+
+     - parameter device:     The device to connect to.  If nil it will use the `UsergridDevice.sharedDevice` instance.
+     - parameter completion: The optional completion block.
+     */
+    public func connectToDevice(device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil) {
+        self.connectToDevice(Usergrid.sharedInstance, device: device, completion: completion)
+    }
+
+    /**
+     A special convenience function that connects a `UsergridDevice` to this `UsergridUser`.
+
+     - parameter client:     The `UsergridClient` object to use for connecting.
+     - parameter device:     The device to connect to.  If nil it will use the `UsergridDevice.sharedDevice` instance.
+     - parameter completion: The optional completion block.
+     */
+    public func connectToDevice(client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil) {
+        let deviceToConnect = device ?? UsergridDevice.sharedDevice
+        guard let _ = deviceToConnect.uuidOrName
+        else {
+            completion?(response: UsergridResponse(client: client, errorName: "Device cannot be connected to User.", errorDescription: "Device has neither an UUID or name specified."))
+            return
+        }
+
+        self.connect(client, relationship: "devices", toEntity: deviceToConnect, completion: completion)
+    }
+
+    /**
+     A special convenience function that disconnects a `UsergridDevice` from this `UsergridUser` using the shared instance of `UsergridClient`.
+
+     - parameter device:     The device to connect to.  If nil it will use the `UsergridDevice.sharedDevice` instance.
+     - parameter completion: The optional completion block.
+     */
+    public func disconnectFromDevice(device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil) {
+        self.disconnectFromDevice(Usergrid.sharedInstance, device: device, completion: completion)
+    }
+
+    /**
+     A special convenience function that disconnects a `UsergridDevice` from this `UsergridUser`.
+
+     - parameter client:     The `UsergridClient` object to use for connecting.
+     - parameter device:     The device to connect to.
+     - parameter completion: The optional completion block.
+     */
+    public func disconnectFromDevice(client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil) {
+        let deviceToDisconnectFrom = device ?? UsergridDevice.sharedDevice
+        guard let _ = deviceToDisconnectFrom.uuidOrName
+            else {
+                completion?(response: UsergridResponse(client: client, errorName: "Device cannot be disconnected from User.", errorDescription: "Device has neither an UUID or name specified."))
+                return
+        }
+
+        self.disconnect(client, relationship: "devices", fromEntity: deviceToDisconnectFrom, completion: completion)
+    }
+
     private func getUserSpecificProperty(userProperty: UsergridUserProperties) -> AnyObject? {
         var propertyValue: AnyObject? = super[userProperty.stringValue]
         NSJSONReadingOptions.AllowFragments

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Tests/AUTH_Tests.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Tests/AUTH_Tests.swift b/sdks/swift/Tests/AUTH_Tests.swift
index 16ba598..160cd19 100644
--- a/sdks/swift/Tests/AUTH_Tests.swift
+++ b/sdks/swift/Tests/AUTH_Tests.swift
@@ -37,6 +37,7 @@ class AUTH_Tests: XCTestCase {
     func test_CLIENT_AUTH() {
 
         let authExpect = self.expectationWithDescription("\(__FUNCTION__)")
+        testAuthClient.authFallback = .App
         testAuthClient.authenticateApp(clientAuth) { [weak self] (auth,error) in
 
             XCTAssertNil(error)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Tests/CONNECTION_Tests.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Tests/CONNECTION_Tests.swift b/sdks/swift/Tests/CONNECTION_Tests.swift
index e82e0bd..4dff28f 100644
--- a/sdks/swift/Tests/CONNECTION_Tests.swift
+++ b/sdks/swift/Tests/CONNECTION_Tests.swift
@@ -36,6 +36,7 @@ class CONNECTION_Tests: XCTestCase {
     func test_CLIENT_AUTH() {
 
         let authExpect = self.expectationWithDescription("\(__FUNCTION__)")
+        testAuthClient.authFallback = .App
         testAuthClient.authenticateApp(clientAuth) { [weak self] (auth,error) in
             XCTAssertNil(error)
             XCTAssertNotNil(self?.testAuthClient.appAuth)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Tests/ClientCreationTests.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Tests/ClientCreationTests.swift b/sdks/swift/Tests/ClientCreationTests.swift
index 4c673c7..0d1ab88 100644
--- a/sdks/swift/Tests/ClientCreationTests.swift
+++ b/sdks/swift/Tests/ClientCreationTests.swift
@@ -41,7 +41,7 @@ class ClientCreationTests: XCTestCase {
     static let otherConfiguration = UsergridClientConfig(orgId: ClientCreationTests.otherOrgID,
                                                          appId: ClientCreationTests.otherAppID,
                                                          baseUrl: ClientCreationTests.otherBaseURL,
-                                                         authFallback: .None,
+                                                         authFallback: .App,
                                                          appAuth: ClientCreationTests.otherAppAuth)
 
     let otherClient = UsergridClient(configuration: ClientCreationTests.otherConfiguration)
@@ -65,13 +65,13 @@ class ClientCreationTests: XCTestCase {
     func test_CLIENT_PROPERTIES() {
         XCTAssertEqual(Usergrid.sharedInstance.appId, ClientCreationTests.appId)
         XCTAssertEqual(Usergrid.sharedInstance.orgId, ClientCreationTests.orgId)
-        XCTAssertEqual(Usergrid.sharedInstance.authFallback, UsergridAuthFallback.App)
+        XCTAssertEqual(Usergrid.sharedInstance.authFallback, UsergridAuthFallback.None)
         XCTAssertEqual(Usergrid.sharedInstance.baseUrl, UsergridClient.DEFAULT_BASE_URL)
         XCTAssertNil(Usergrid.sharedInstance.currentUser)
 
         XCTAssertEqual(otherClient.appId, ClientCreationTests.otherAppID)
         XCTAssertEqual(otherClient.orgId, ClientCreationTests.otherOrgID)
-        XCTAssertEqual(otherClient.authFallback, UsergridAuthFallback.None)
+        XCTAssertEqual(otherClient.authFallback, UsergridAuthFallback.App)
         XCTAssertEqual(otherClient.baseUrl, ClientCreationTests.otherBaseURL)
         XCTAssertNil(otherClient.currentUser)
     }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/Tests/GET_Tests.swift
----------------------------------------------------------------------
diff --git a/sdks/swift/Tests/GET_Tests.swift b/sdks/swift/Tests/GET_Tests.swift
index dfae0d4..999b22a 100644
--- a/sdks/swift/Tests/GET_Tests.swift
+++ b/sdks/swift/Tests/GET_Tests.swift
@@ -34,10 +34,7 @@ class GET_Tests: XCTestCase {
     static let collectionName = "books"
     static let entityUUID = "f4078aca-2fb1-11e5-8eb2-e13f8369aad1"
 
-    let query = UsergridQuery(GET_Tests.collectionName)
-        .eq("title", value: "The Sun Also Rises")
-        .or()
-        .eq("title", value: "The Old Man and the Sea")
+    let query = UsergridQuery(GET_Tests.collectionName).fromString("select * where title = 'The Sun Also Rises' or title = 'The Old Man and the Sea'")
 
 
     func test_GET_WITHOUT_QUERY() {
@@ -56,7 +53,7 @@ class GET_Tests: XCTestCase {
     func test_GET_WITH_QUERY() {
 
         let getExpect = self.expectationWithDescription("\(__FUNCTION__)")
-        usergridClientInstance.GET(GET_Tests.collectionName, query:self.query) { (response) in
+        usergridClientInstance.GET(self.query) { (response) in
             XCTAssertNotNil(response)
             XCTAssertTrue(response.ok)
             XCTAssertEqual(response.count, 3)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes.html b/sdks/swift/docs/Classes.html
index 0e1af9e..c867dcf 100644
--- a/sdks/swift/docs/Classes.html
+++ b/sdks/swift/docs/Classes.html
@@ -598,7 +598,7 @@ provided you will need to call one of the shared instance initialization methods
 
 <p>If a request is successful, any entities returned in the response will be automatically parsed into <code><a href="Classes/UsergridEntity.html">UsergridEntity</a></code> objects and pushed to the <code>entities</code> property.</p>
 
-<p>If a request fails, the <code>errorName</code> and <code>errorDescription</code> will contain information about the problem encountered.</p>
+<p>If a request fails, the <code>UsergridResponseError.error</code> property will contain information about the problem encountered.</p>
 
                         <a href="Classes/UsergridResponse.html" class="slightly-smaller">See more</a>
                       </div>
@@ -684,7 +684,7 @@ provided you will need to call one of the shared instance initialization methods
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/Usergrid.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/Usergrid.html b/sdks/swift/docs/Classes/Usergrid.html
index d2d75d9..d959029 100644
--- a/sdks/swift/docs/Classes/Usergrid.html
+++ b/sdks/swift/docs/Classes/Usergrid.html
@@ -378,6 +378,33 @@ within the UsergridSDK library.</p>
                 <li class="item">
                   <div>
                     <code>
+                    <a name="/s:ZvC11UsergridSDK8Usergrid28persistCurrentUserInKeychainSb"></a>
+                    <a name="//apple_ref/swift/Variable/persistCurrentUserInKeychain" class="dashAnchor"></a>
+                    <a class="token" href="#/s:ZvC11UsergridSDK8Usergrid28persistCurrentUserInKeychainSb">persistCurrentUserInKeychain</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Whether or not the current user will be saved and restored from the keychain using the shared instance of <code><a href="../Classes/UsergridClient.html">UsergridClient</a></code>.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">persistCurrentUserInKeychain</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
+
+                        </div>
+                      </div>
+                    </section>
+                  </div>
+                </li>
+                <li class="item">
+                  <div>
+                    <code>
                     <a name="/s:ZvC11UsergridSDK8Usergrid8userAuthGSqCS_16UsergridUserAuth_"></a>
                     <a name="//apple_ref/swift/Variable/userAuth" class="dashAnchor"></a>
                     <a class="token" href="#/s:ZvC11UsergridSDK8Usergrid8userAuthGSqCS_16UsergridUserAuth_">userAuth</a>
@@ -429,6 +456,33 @@ within the UsergridSDK library.</p>
                     </section>
                   </div>
                 </li>
+                <li class="item">
+                  <div>
+                    <code>
+                    <a name="/s:ZvC11UsergridSDK8Usergrid12authFallbackOS_20UsergridAuthFallback"></a>
+                    <a name="//apple_ref/swift/Variable/authFallback" class="dashAnchor"></a>
+                    <a class="token" href="#/s:ZvC11UsergridSDK8Usergrid12authFallbackOS_20UsergridAuthFallback">authFallback</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>The <code><a href="../Enums/UsergridAuthFallback.html">UsergridAuthFallback</a></code> value used to determine what type of token will be sent of the shared instance of <code><a href="../Classes/UsergridClient.html">UsergridClient</a></code>, if any.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">authFallback</span><span class="p">:</span> <span class="kt">UsergridAuthFallback</span></code></pre>
+
+                        </div>
+                      </div>
+                    </section>
+                  </div>
+                </li>
               </ul>
             </div>
             <div class="task-group">
@@ -819,33 +873,6 @@ within the UsergridSDK library.</p>
                 <li class="item">
                   <div>
                     <code>
-                    <a name="/s:ZvC11UsergridSDK8Usergrid12authFallbackOS_20UsergridAuthFallback"></a>
-                    <a name="//apple_ref/swift/Variable/authFallback" class="dashAnchor"></a>
-                    <a class="token" href="#/s:ZvC11UsergridSDK8Usergrid12authFallbackOS_20UsergridAuthFallback">authFallback</a>
-                    </code>
-                  </div>
-                  <div class="height-container">
-                    <div class="pointer-container"></div>
-                    <section class="section">
-                      <div class="pointer"></div>
-                      <div class="abstract">
-                        <p>The <code><a href="../Enums/UsergridAuthFallback.html">UsergridAuthFallback</a></code> value used to determine what type of token will be sent of the shared instance of <code><a href="../Classes/UsergridClient.html">UsergridClient</a></code>, if any.</p>
-
-                      </div>
-                      <div class="declaration">
-                        <h4>Declaration</h4>
-                        <div class="language">
-                          <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">authFallback</span><span class="p">:</span> <span class="kt">UsergridAuthFallback</span></code></pre>
-
-                        </div>
-                      </div>
-                    </section>
-                  </div>
-                </li>
-                <li class="item">
-                  <div>
-                    <code>
                     <a name="/s:ZFC11UsergridSDK8Usergrid9usingAuthFMS0_FCS_12UsergridAuthCS_14UsergridClient"></a>
                     <a name="//apple_ref/swift/Method/usingAuth(_:)" class="dashAnchor"></a>
                     <a class="token" href="#/s:ZFC11UsergridSDK8Usergrid9usingAuthFMS0_FCS_12UsergridAuthCS_14UsergridClient">usingAuth(_:)</a>
@@ -1534,9 +1561,9 @@ within the UsergridSDK library.</p>
                 <li class="item">
                   <div>
                     <code>
-                    <a name="/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTSS5queryGSqCS_13UsergridQuery_10completionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
-                    <a name="//apple_ref/swift/Method/GET(_:query:completion:)" class="dashAnchor"></a>
-                    <a class="token" href="#/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTSS5queryGSqCS_13UsergridQuery_10completionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:query:completion:)</a>
+                    <a name="/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTSS10completionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
+                    <a name="//apple_ref/swift/Method/GET(_:completion:)" class="dashAnchor"></a>
+                    <a class="token" href="#/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTSS10completionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:completion:)</a>
                     </code>
                   </div>
                   <div class="height-container">
@@ -1544,14 +1571,14 @@ within the UsergridSDK library.</p>
                     <section class="section">
                       <div class="pointer"></div>
                       <div class="abstract">
-                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects of a given type with an optional query using the shared instance of <code>UsergridCient</code>.</p>
+                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects of a given type  using the shared instance of <code>UsergridCient</code>.</p>
 
                       </div>
                       <div class="declaration">
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">query</span><span class="p">:</span> <span class="kt">UsergridQuery</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
 
                         </div>
                       </div>
@@ -1575,12 +1602,59 @@ within the UsergridSDK library.</p>
                             <tr>
                               <td>
                                 <code>
+                                <em>completion</em>
+                                </code>
+                              </td>
+                              <td>
+                                <div>
+                                  <p>The optional completion block that will be called once the request has completed.</p>
+
+                                </div>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </div>
+                    </section>
+                  </div>
+                </li>
+                <li class="item">
+                  <div>
+                    <code>
+                    <a name="/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTCS_13UsergridQuery15queryCompletionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
+                    <a name="//apple_ref/swift/Method/GET(_:queryCompletion:)" class="dashAnchor"></a>
+                    <a class="token" href="#/s:ZFC11UsergridSDK8Usergrid3GETFMS0_FTCS_13UsergridQuery15queryCompletionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:queryCompletion:)</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects with a given query using the shared instance of <code>UsergridCient</code>.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">query</span><span class="p">:</span> <span class="kt">UsergridQuery</span><span class="p">,</span> <span class="nv">queryCompletion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
+
+                        </div>
+                      </div>
+                      <div>
+                        <h4>Parameters</h4>
+                        <table class="graybox">
+                          <tbody>
+                            <tr>
+                              <td>
+                                <code>
                                 <em>query</em>
                                 </code>
                               </td>
                               <td>
                                 <div>
-                                  <p>The optional query to use when gathering <code>UsergridEntity</code> objects.</p>
+                                  <p>The query to use when gathering <code>UsergridEntity</code> objects.</p>
 
                                 </div>
                               </td>
@@ -1588,7 +1662,7 @@ within the UsergridSDK library.</p>
                             <tr>
                               <td>
                                 <code>
-                                <em>completion</em>
+                                <em>queryCompletion</em>
                                 </code>
                               </td>
                               <td>
@@ -3620,7 +3694,7 @@ within the UsergridSDK library.</p>
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridAppAuth.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridAppAuth.html b/sdks/swift/docs/Classes/UsergridAppAuth.html
index 81a614c..3e5118a 100644
--- a/sdks/swift/docs/Classes/UsergridAppAuth.html
+++ b/sdks/swift/docs/Classes/UsergridAppAuth.html
@@ -392,7 +392,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridAsset.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridAsset.html b/sdks/swift/docs/Classes/UsergridAsset.html
index ca7c393..b473cd1 100644
--- a/sdks/swift/docs/Classes/UsergridAsset.html
+++ b/sdks/swift/docs/Classes/UsergridAsset.html
@@ -684,7 +684,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridAssetUploadRequest.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridAssetUploadRequest.html b/sdks/swift/docs/Classes/UsergridAssetUploadRequest.html
index 7fbc041..393f872 100644
--- a/sdks/swift/docs/Classes/UsergridAssetUploadRequest.html
+++ b/sdks/swift/docs/Classes/UsergridAssetUploadRequest.html
@@ -338,7 +338,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridAuth.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridAuth.html b/sdks/swift/docs/Classes/UsergridAuth.html
index 74d63a8..9db7a66 100644
--- a/sdks/swift/docs/Classes/UsergridAuth.html
+++ b/sdks/swift/docs/Classes/UsergridAuth.html
@@ -540,7 +540,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridClient.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridClient.html b/sdks/swift/docs/Classes/UsergridClient.html
index 5f897be..0b1b378 100644
--- a/sdks/swift/docs/Classes/UsergridClient.html
+++ b/sdks/swift/docs/Classes/UsergridClient.html
@@ -285,6 +285,33 @@
                 <li class="item">
                   <div>
                     <code>
+                    <a name="/s:vC11UsergridSDK14UsergridClient28persistCurrentUserInKeychainSb"></a>
+                    <a name="//apple_ref/swift/Property/persistCurrentUserInKeychain" class="dashAnchor"></a>
+                    <a class="token" href="#/s:vC11UsergridSDK14UsergridClient28persistCurrentUserInKeychainSb">persistCurrentUserInKeychain</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Whether or not the current user will be saved and restored from the keychain.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">persistCurrentUserInKeychain</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
+
+                        </div>
+                      </div>
+                    </section>
+                  </div>
+                </li>
+                <li class="item">
+                  <div>
+                    <code>
                     <a name="/s:vC11UsergridSDK14UsergridClient11currentUserGSqCS_12UsergridUser_"></a>
                     <a name="//apple_ref/swift/Property/currentUser" class="dashAnchor"></a>
                     <a class="token" href="#/s:vC11UsergridSDK14UsergridClient11currentUserGSqCS_12UsergridUser_">currentUser</a>
@@ -1628,9 +1655,9 @@
                 <li class="item">
                   <div>
                     <code>
-                    <a name="/s:FC11UsergridSDK14UsergridClient3GETFS0_FTSS5queryGSqCS_13UsergridQuery_10completionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
-                    <a name="//apple_ref/swift/Method/GET(_:query:completion:)" class="dashAnchor"></a>
-                    <a class="token" href="#/s:FC11UsergridSDK14UsergridClient3GETFS0_FTSS5queryGSqCS_13UsergridQuery_10completionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:query:completion:)</a>
+                    <a name="/s:FC11UsergridSDK14UsergridClient3GETFS0_FTSS10completionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
+                    <a name="//apple_ref/swift/Method/GET(_:completion:)" class="dashAnchor"></a>
+                    <a class="token" href="#/s:FC11UsergridSDK14UsergridClient3GETFS0_FTSS10completionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:completion:)</a>
                     </code>
                   </div>
                   <div class="height-container">
@@ -1638,14 +1665,14 @@
                     <section class="section">
                       <div class="pointer"></div>
                       <div class="abstract">
-                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects of a given type with an optional query.</p>
+                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects of a given type.</p>
 
                       </div>
                       <div class="declaration">
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">query</span><span class="p">:</span> <span class="kt">UsergridQuery</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
 
                         </div>
                       </div>
@@ -1669,12 +1696,59 @@
                             <tr>
                               <td>
                                 <code>
+                                <em>completion</em>
+                                </code>
+                              </td>
+                              <td>
+                                <div>
+                                  <p>The optional completion block that will be called once the request has completed.</p>
+
+                                </div>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </div>
+                    </section>
+                  </div>
+                </li>
+                <li class="item">
+                  <div>
+                    <code>
+                    <a name="/s:FC11UsergridSDK14UsergridClient3GETFS0_FTCS_13UsergridQuery15queryCompletionGSqFT8responseCS_16UsergridResponse_T___T_"></a>
+                    <a name="//apple_ref/swift/Method/GET(_:queryCompletion:)" class="dashAnchor"></a>
+                    <a class="token" href="#/s:FC11UsergridSDK14UsergridClient3GETFS0_FTCS_13UsergridQuery15queryCompletionGSqFT8responseCS_16UsergridResponse_T___T_">GET(_:queryCompletion:)</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Gets a group of <code><a href="../Classes/UsergridEntity.html">UsergridEntity</a></code> objects using a given query.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="kt">GET</span><span class="p">(</span><span class="nv">query</span><span class="p">:</span> <span class="kt">UsergridQuery</span><span class="p">,</span> <span class="nv">queryCompletion</span><span class="p">:</span> <span class="kt">UsergridResponseCompletion</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
+
+                        </div>
+                      </div>
+                      <div>
+                        <h4>Parameters</h4>
+                        <table class="graybox">
+                          <tbody>
+                            <tr>
+                              <td>
+                                <code>
                                 <em>query</em>
                                 </code>
                               </td>
                               <td>
                                 <div>
-                                  <p>The optional query to use when gathering <code>UsergridEntity</code> objects.</p>
+                                  <p>The query to use when gathering <code>UsergridEntity</code> objects.</p>
 
                                 </div>
                               </td>
@@ -1682,7 +1756,7 @@
                             <tr>
                               <td>
                                 <code>
-                                <em>completion</em>
+                                <em>queryCompletion</em>
                                 </code>
                               </td>
                               <td>
@@ -3716,7 +3790,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridClientConfig.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridClientConfig.html b/sdks/swift/docs/Classes/UsergridClientConfig.html
index 6047eba..7a6a8c7 100644
--- a/sdks/swift/docs/Classes/UsergridClientConfig.html
+++ b/sdks/swift/docs/Classes/UsergridClientConfig.html
@@ -277,7 +277,34 @@
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">authFallback</span><span class="p">:</span> <span class="kt">UsergridAuthFallback</span> <span class="o">=</span> <span class="o">.</span><span class="kt">App</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">authFallback</span><span class="p">:</span> <span class="kt">UsergridAuthFallback</span> <span class="o">=</span> <span class="o">.</span><span class="kt">None</span></code></pre>
+
+                        </div>
+                      </div>
+                    </section>
+                  </div>
+                </li>
+                <li class="item">
+                  <div>
+                    <code>
+                    <a name="/s:vC11UsergridSDK20UsergridClientConfig28persistCurrentUserInKeychainSb"></a>
+                    <a name="//apple_ref/swift/Property/persistCurrentUserInKeychain" class="dashAnchor"></a>
+                    <a class="token" href="#/s:vC11UsergridSDK20UsergridClientConfig28persistCurrentUserInKeychainSb">persistCurrentUserInKeychain</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Whether or not the <code><a href="../Classes/UsergridClient.html">UsergridClient</a></code> current user will be saved and restored from the keychain.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">persistCurrentUserInKeychain</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span></code></pre>
 
                         </div>
                       </div>
@@ -470,9 +497,9 @@
                 <li class="item">
                   <div>
                     <code>
-                    <a name="/s:FC11UsergridSDK20UsergridClientConfigcFMS0_FT5orgIdSS5appIdSS7baseUrlSS12authFallbackOS_20UsergridAuthFallback7appAuthGSqCS_15UsergridAppAuth__S0_"></a>
-                    <a name="//apple_ref/swift/Method/init(orgId:appId:baseUrl:authFallback:appAuth:)" class="dashAnchor"></a>
-                    <a class="token" href="#/s:FC11UsergridSDK20UsergridClientConfigcFMS0_FT5orgIdSS5appIdSS7baseUrlSS12authFallbackOS_20UsergridAuthFallback7appAuthGSqCS_15UsergridAppAuth__S0_">init(orgId:appId:baseUrl:authFallback:appAuth:)</a>
+                    <a name="/s:FC11UsergridSDK20UsergridClientConfigcFMS0_FT5orgIdSS5appIdSS7baseUrlSS12authFallbackOS_20UsergridAuthFallback28persistCurrentUserInKeychainSb7appAuthGSqCS_15UsergridAppAuth__S0_"></a>
+                    <a name="//apple_ref/swift/Method/init(orgId:appId:baseUrl:authFallback:persistCurrentUserInKeychain:appAuth:)" class="dashAnchor"></a>
+                    <a class="token" href="#/s:FC11UsergridSDK20UsergridClientConfigcFMS0_FT5orgIdSS5appIdSS7baseUrlSS12authFallbackOS_20UsergridAuthFallback28persistCurrentUserInKeychainSb7appAuthGSqCS_15UsergridAppAuth__S0_">init(orgId:appId:baseUrl:authFallback:persistCurrentUserInKeychain:appAuth:)</a>
                     </code>
                   </div>
                   <div class="height-container">
@@ -487,7 +514,7 @@
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">orgId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">appId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">baseUrl</span><span class="p">:</span><span class="kt">String</span><span class="p">,</span> <span class="nv">authFallback</span><span class="p">:</span><span class="kt">UsergridAuthFallback</span><span class="p">,</span> <span class="nv">appAuth</span><span class="p">:</span><span class="kt">UsergridAppAuth</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">orgId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">appId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">baseUrl</span><span class="p">:</span><span class="kt">String</span><span class="p">,</span> <span class="nv">authFallback</span><span class="p">:</span><span class="kt">UsergridAuthFallback</span><span class="p">,</span> <span class="nv">persistCurrentUserInKeychain</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">appAuth</span><span class="p">:</span><span class="kt">UsergridAppAuth</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class=
 "p">)</span></code></pre>
 
                         </div>
                       </div>
@@ -550,6 +577,19 @@
                             <tr>
                               <td>
                                 <code>
+                                <em>persistCurrentUserInKeychain</em>
+                                </code>
+                              </td>
+                              <td>
+                                <div>
+                                  <p>Whether or not the <code>UsergridClient</code> current user will be saved and restored from the keychain.</p>
+
+                                </div>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <code>
                                 <em>appAuth</em>
                                 </code>
                               </td>
@@ -686,7 +726,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridDevice.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridDevice.html b/sdks/swift/docs/Classes/UsergridDevice.html
index 4ccca9a..655c810 100644
--- a/sdks/swift/docs/Classes/UsergridDevice.html
+++ b/sdks/swift/docs/Classes/UsergridDevice.html
@@ -326,17 +326,6 @@ let uuid = usergridDevice[&quot;uuid&quot;]
                     </section>
                   </div>
                 </li>
-              </ul>
-            </div>
-            <div class="task-group">
-              <div class="task-name-container">
-                <a name="/Initialization"></a>
-                <a name="//apple_ref/swift/Section/Initialization" class="dashAnchor"></a>
-                <a href="#/Initialization">
-                  <h3 class="section-name">Initialization</h3>
-                </a>
-              </div>
-              <ul>
                 <li class="item">
                   <div>
                     <code>
@@ -357,13 +346,24 @@ let uuid = usergridDevice[&quot;uuid&quot;]
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">sharedDevice</span><span class="p">:</span> <span class="kt">UsergridDevice</span> <span class="o">=</span> <span class="kt">UsergridDevice</span><span class="p">()</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">sharedDevice</span><span class="p">:</span> <span class="kt">UsergridDevice</span> <span class="o">=</span> <span class="kt">UsergridDevice</span><span class="o">.</span><span class="nf">getOrCreateSharedDeviceFromKeychain</span><span class="p">()</span></code></pre>
 
                         </div>
                       </div>
                     </section>
                   </div>
                 </li>
+              </ul>
+            </div>
+            <div class="task-group">
+              <div class="task-name-container">
+                <a name="/Initialization"></a>
+                <a name="//apple_ref/swift/Section/Initialization" class="dashAnchor"></a>
+                <a href="#/Initialization">
+                  <h3 class="section-name">Initialization</h3>
+                </a>
+              </div>
+              <ul>
                 <li class="item">
                   <div>
                     <code>
@@ -418,7 +418,7 @@ let uuid = usergridDevice[&quot;uuid&quot;]
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">required</span> <span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span> <span class="nv">propertyDict</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">AnyObject</span><span class="p">]?)</span></code></pre>
+                          <pre class="highlight"><code><span class="kd">required</span> <span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span><span class="kt">String</span><span class="p">,</span> <span class="nv">name</span><span class="p">:</span><span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">propertyDict</span><span class="p">:[</span><span class="kt">String</span><span class="p">:</span><span class="kt">AnyObject</span><span class="p">]?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
 
                         </div>
                       </div>
@@ -588,10 +588,53 @@ let uuid = usergridDevice[&quot;uuid&quot;]
                 </li>
               </ul>
             </div>
+            <div class="task-group">
+              <div class="task-name-container">
+                <a name="/Class%20Helper%20Methods"></a>
+                <a name="//apple_ref/swift/Section/Class Helper Methods" class="dashAnchor"></a>
+                <a href="#/Class%20Helper%20Methods">
+                  <h3 class="section-name">Class Helper Methods</h3>
+                </a>
+              </div>
+              <ul>
+                <li class="item">
+                  <div>
+                    <code>
+                    <a name="/s:ZFC11UsergridSDK14UsergridDevice24commonDevicePropertyDictFMS0_FT_GVSs10DictionarySSPSs9AnyObject__"></a>
+                    <a name="//apple_ref/swift/Method/commonDevicePropertyDict()" class="dashAnchor"></a>
+                    <a class="token" href="#/s:ZFC11UsergridSDK14UsergridDevice24commonDevicePropertyDictFMS0_FT_GVSs10DictionarySSPSs9AnyObject__">commonDevicePropertyDict()</a>
+                    </code>
+                  </div>
+                  <div class="height-container">
+                    <div class="pointer-container"></div>
+                    <section class="section">
+                      <div class="pointer"></div>
+                      <div class="abstract">
+                        <p>Creates a property dictionary that contains the common properties for <code><a href="../Classes/UsergridDevice.html">UsergridDevice</a></code> objects.</p>
+
+                      </div>
+                      <div class="declaration">
+                        <h4>Declaration</h4>
+                        <div class="language">
+                          <p class="aside-title">Swift</p>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">commonDevicePropertyDict</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span><span class="kt">AnyObject</span><span class="p">]</span></code></pre>
+
+                        </div>
+                      </div>
+                      <div>
+                        <h4>Return Value</h4>
+                        <p>A property dictionary with the common properties set.</p>
+
+                      </div>
+                    </section>
+                  </div>
+                </li>
+              </ul>
+            </div>
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridEntity.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridEntity.html b/sdks/swift/docs/Classes/UsergridEntity.html
index a19833a..7d937fd 100644
--- a/sdks/swift/docs/Classes/UsergridEntity.html
+++ b/sdks/swift/docs/Classes/UsergridEntity.html
@@ -559,7 +559,7 @@ usergridEntity[&quot;propertyName&quot;] = propertyValue
                         <h4>Declaration</h4>
                         <div class="language">
                           <p class="aside-title">Swift</p>
-                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">stringValue</span> <span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">return</span> <span class="kt">NSString</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="k">try!</span> <span class="kt">NSJSONSerialization</span><span class="o">.</span><span class="nf">dataWithJSONObject</span><span class="p">(</span><span class="k">self</span><span class="o">.</span><span class="n">jsonObjectValue</span><span class="p">,</span> <span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="kt">PrettyPrinted</span><span class="p">),</span> <span class="nv">encoding</span><span class="p">:</span> <span class="kt">NSASCIIStringEncoding</span><span class="p">)</span> <span class="k">as!</span> <span class="kt">String</span> <span class="p">}</span><
 /code></pre>
+                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">stringValue</span> <span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">return</span> <span class="kt">NSString</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="k">try!</span> <span class="kt">NSJSONSerialization</span><span class="o">.</span><span class="nf">dataWithJSONObject</span><span class="p">(</span><span class="k">self</span><span class="o">.</span><span class="n">jsonObjectValue</span><span class="p">,</span> <span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="kt">PrettyPrinted</span><span class="p">),</span> <span class="nv">encoding</span><span class="p">:</span> <span class="kt">NSUTF8StringEncoding</span><span class="p">)</span> <span class="k">as!</span> <span class="kt">String</span> <span class="p">}</span></
 code></pre>
 
                         </div>
                       </div>
@@ -2602,7 +2602,7 @@ usergridEntity[&quot;propertyName&quot;] = propertyValue
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c638c774/sdks/swift/docs/Classes/UsergridFileMetaData.html
----------------------------------------------------------------------
diff --git a/sdks/swift/docs/Classes/UsergridFileMetaData.html b/sdks/swift/docs/Classes/UsergridFileMetaData.html
index ec2d077..3f825d3 100644
--- a/sdks/swift/docs/Classes/UsergridFileMetaData.html
+++ b/sdks/swift/docs/Classes/UsergridFileMetaData.html
@@ -514,7 +514,7 @@
           </section>
         </section>
         <section id="footer">
-          <p>&copy; 2016 <a class="link" href="https://github.com/RobertWalsh/UsergridSDK" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-08)</p>
+          <p>&copy; 2016 <a class="link" href="https://github.com/apache/usergrid/tree/master/sdks/swift" target="_blank" rel="external">Robert Walsh</a>. All rights reserved. (Last updated: 2016-02-15)</p>
           <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
         </section>
       </article>


Mime
View raw message