diff --git a/.gitignore b/.gitignore index 8fbb5c4..afc0206 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,6 @@ ActivityFeed/ActivityFeed.xcworkspace/xcuserdata/ApigeeCorporation.xcuserdatad/x .build #Intellij -.idea \ No newline at end of file +.idea +/Samples/ActivityFeed/Pods +/Samples/ActivityFeed/Podfile.lock diff --git a/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj index 61a984b..7a0b85a 100644 --- a/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj +++ b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj @@ -424,7 +424,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Apigee Inc."; TargetAttributes = { 6348D95A1C4EAC0B005C978C = { @@ -766,8 +766,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -811,8 +813,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -832,6 +836,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.1; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Samples/ActivityFeed/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/ActivityFeed/Source/Assets.xcassets/AppIcon.appiconset/Contents.json index 118c98f..b8236c6 100644 --- a/Samples/ActivityFeed/Source/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Samples/ActivityFeed/Source/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", diff --git a/Samples/ActivityFeed/Source/UsergridManager.swift b/Samples/ActivityFeed/Source/UsergridManager.swift index b72d46e..a03532d 100644 --- a/Samples/ActivityFeed/Source/UsergridManager.swift +++ b/Samples/ActivityFeed/Source/UsergridManager.swift @@ -30,10 +30,10 @@ import UsergridSDK /// This class handles the primary communications to the UsergirdSDK. public class UsergridManager { - static let ORG_ID = "rwalsh" + static let ORG_ID = "rjwalsh" static let APP_ID = "sandbox" static let NOTIFIER_ID = "usergridsample" - static let BASE_URL = "https://api.usergrid.com" + static let BASE_URL = "https://apibaas-trial.apigee.net" static func initializeSharedInstance() { Usergrid.initSharedInstance(configuration: UsergridClientConfig(orgId: UsergridManager.ORG_ID, appId: UsergridManager.APP_ID, baseUrl: UsergridManager.BASE_URL)) diff --git a/Samples/Push/Push.xcodeproj/project.pbxproj b/Samples/Push/Push.xcodeproj/project.pbxproj index 414f073..efe53e0 100644 --- a/Samples/Push/Push.xcodeproj/project.pbxproj +++ b/Samples/Push/Push.xcodeproj/project.pbxproj @@ -196,7 +196,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Apigee Inc."; TargetAttributes = { 637A71EF1C5BF7B10056545A = { @@ -348,8 +348,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -393,8 +395,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -414,6 +418,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -421,9 +426,9 @@ 637A72031C5BF7B10056545A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = Source/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.usergridpushsample; @@ -436,10 +441,10 @@ 637A72041C5BF7B10056545A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = Source/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.usergridpushsample; diff --git a/Samples/Push/Source/UsergridManager.swift b/Samples/Push/Source/UsergridManager.swift index bcdcb98..3f577a0 100644 --- a/Samples/Push/Source/UsergridManager.swift +++ b/Samples/Push/Source/UsergridManager.swift @@ -30,10 +30,10 @@ import UsergridSDK /// This class handles the primary communications to the UsergridSDK. public class UsergridManager { - static let ORG_ID = "rwalsh" + static let ORG_ID = "rjwalsh" static let APP_ID = "sandbox" static let NOTIFIER_ID = "usergridpushsample" - static let BASE_URL = "https://api.usergrid.com" + static let BASE_URL = "https://apibaas-trial.apigee.net" static func initializeSharedInstance() { Usergrid.initSharedInstance(configuration: UsergridClientConfig(orgId: UsergridManager.ORG_ID, appId: UsergridManager.APP_ID, baseUrl: UsergridManager.BASE_URL)) diff --git a/Source/UsergridAsset.swift b/Source/UsergridAsset.swift index 93c88c7..f55ceba 100644 --- a/Source/UsergridAsset.swift +++ b/Source/UsergridAsset.swift @@ -148,7 +148,7 @@ public class UsergridAsset: NSObject, NSCoding { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridAsset` object. */ required public init?(coder aDecoder: NSCoder) { guard let filename = aDecoder.decodeObject(forKey: "filename") as? String, diff --git a/Source/UsergridClient.swift b/Source/UsergridClient.swift index 7cb3a14..a6c3243 100644 --- a/Source/UsergridClient.swift +++ b/Source/UsergridClient.swift @@ -32,7 +32,13 @@ The `UsergridClient` class is the base handler for making client connections to */ public class UsergridClient: NSObject, NSCoding { - static let DEFAULT_BASE_URL = "https://api.usergrid.com" + // MARK: - Static Variables - + + /// The default base URL for all calls made by the UsergridClient instances. + public static let DEFAULT_BASE_URL = "https://apibaas-trial.apigee.net" + + /// The default auth mode used when creating UsergridClient instances. + public static let DEFAULT_AUTH_MODE: UsergridAuthMode = .user // MARK: - Instance Properties - @@ -521,7 +527,8 @@ public class UsergridClient: NSObject, NSCoding { - parameter completion: The optional completion block that will be called once the request has completed. */ public func PUT(_ type: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil) { - guard let uuidOrName = (jsonBody[UsergridEntityProperties.uuid.stringValue] ?? jsonBody[UsergridEntityProperties.name.stringValue]) as? String + guard let uuidOrName = jsonBody[UsergridEntityProperties.uuid.stringValue] as? String + ?? jsonBody[UsergridEntityProperties.name.stringValue] as? String else { completion?(UsergridResponse(client:self, errorName: "jsonBody not valid.", errorDescription: "The `jsonBody` must contain a valid value for either `uuid` or `name`.")) return diff --git a/Source/UsergridClientConfig.swift b/Source/UsergridClientConfig.swift index 9d1e057..7f10f3b 100644 --- a/Source/UsergridClientConfig.swift +++ b/Source/UsergridClientConfig.swift @@ -45,7 +45,7 @@ public class UsergridClientConfig : NSObject, NSCoding { public var baseUrl: String = UsergridClient.DEFAULT_BASE_URL /// The `UsergridAuthMode` value used to determine what type of token will be sent, if any. - public var authMode: UsergridAuthMode = .user + public var authMode: UsergridAuthMode = UsergridClient.DEFAULT_AUTH_MODE /// Whether or not the `UsergridClient` current user will be saved and restored from the keychain. public var persistCurrentUserInKeychain: Bool = true @@ -112,7 +112,7 @@ public class UsergridClientConfig : NSObject, NSCoding { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridClientConfig` object. */ public required init?(coder aDecoder: NSCoder) { guard let appId = aDecoder.decodeObject(forKey: "appId") as? String, @@ -129,7 +129,7 @@ public class UsergridClientConfig : NSObject, NSCoding { self.baseUrl = baseUrl self.appAuth = aDecoder.decodeObject(forKey: "appAuth") as? UsergridAppAuth self.persistCurrentUserInKeychain = aDecoder.decodeBool(forKey: "persistCurrentUserInKeychain") - self.authMode = (UsergridAuthMode(rawValue:aDecoder.decodeInteger(forKey: "authMode")) ?? .none)! + self.authMode = UsergridAuthMode(rawValue:aDecoder.decodeInteger(forKey: "authMode")) ?? UsergridClient.DEFAULT_AUTH_MODE super.init() } diff --git a/Source/UsergridDevice.swift b/Source/UsergridDevice.swift index 5eb3850..e193505 100644 --- a/Source/UsergridDevice.swift +++ b/Source/UsergridDevice.swift @@ -91,7 +91,7 @@ public class UsergridDevice : UsergridEntity { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridDevice` object. */ required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) @@ -150,6 +150,7 @@ public class UsergridDevice : UsergridEntity { - Warning: When setting a properties value must be a valid JSON object. - Example usage: + ``` let uuid = usergridDevice["uuid"] ``` diff --git a/Source/UsergridEntity.swift b/Source/UsergridEntity.swift index 7babee4..cb6affb 100644 --- a/Source/UsergridEntity.swift +++ b/Source/UsergridEntity.swift @@ -188,7 +188,7 @@ open class UsergridEntity: NSObject, NSCoding { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridEntity` object. */ required public init?(coder aDecoder: NSCoder) { guard let properties = aDecoder.decodeObject(forKey: "properties") as? [String:Any] @@ -220,6 +220,7 @@ open class UsergridEntity: NSObject, NSCoding { Subscript for the `UsergridEntity` class. - Example usage: + ``` let propertyValue = usergridEntity["propertyName"] usergridEntity["propertyName"] = propertyValue diff --git a/Source/UsergridFileMetaData.swift b/Source/UsergridFileMetaData.swift index b150e2e..8254c07 100644 --- a/Source/UsergridFileMetaData.swift +++ b/Source/UsergridFileMetaData.swift @@ -83,7 +83,7 @@ public class UsergridFileMetaData : NSObject,NSCoding { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridFileMetaData` object. */ required public init?(coder aDecoder: NSCoder) { self.eTag = aDecoder.decodeObject(forKey: "etag") as? String diff --git a/Source/UsergridKeychainHelpers.swift b/Source/UsergridKeychainHelpers.swift index b363a7f..e1963cb 100644 --- a/Source/UsergridKeychainHelpers.swift +++ b/Source/UsergridKeychainHelpers.swift @@ -93,6 +93,10 @@ internal extension UsergridDevice { static func saveSharedDeviceKeychainItem(_ device:UsergridDevice) { + if (NSClassFromString("XCTest") != nil) { + return + } + var queryAttributes = UsergridDevice.deviceKeychainItem() queryAttributes[kSecReturnData as String] = (kCFBooleanTrue != nil) as Bool queryAttributes[kSecReturnAttributes as String] = (kCFBooleanTrue != nil) as Bool diff --git a/Source/UsergridRequestManager.swift b/Source/UsergridRequestManager.swift index a876f81..dbb00ae 100644 --- a/Source/UsergridRequestManager.swift +++ b/Source/UsergridRequestManager.swift @@ -40,6 +40,7 @@ final class UsergridRequestManager { self.client = client let config = URLSessionConfiguration.default + config.httpMaximumConnectionsPerHost = 20 #if os(tvOS) config.httpAdditionalHeaders = ["User-Agent": "usergrid-tvOS/v\(UsergridSDKVersion)"] diff --git a/Source/UsergridSessionDelegate.swift b/Source/UsergridSessionDelegate.swift index 7866c26..87e209b 100644 --- a/Source/UsergridSessionDelegate.swift +++ b/Source/UsergridSessionDelegate.swift @@ -58,14 +58,14 @@ extension UsergridSessionDelegate : URLSessionTaskDelegate { extension UsergridSessionDelegate : URLSessionDataDelegate { - public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Swift.Void) { + func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Swift.Void) { if let requestWrapper = requestDelegates[dataTask.taskIdentifier] { requestWrapper.response = response } completionHandler(Foundation.URLSession.ResponseDisposition.allow) } - public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { if let requestWrapper = requestDelegates[dataTask.taskIdentifier] { var mutableData = requestWrapper.responseData != nil ? (NSMutableData(data: requestWrapper.responseData!) as Data) : Data() mutableData.append(data) diff --git a/Source/UsergridUser.swift b/Source/UsergridUser.swift index 049ea6c..65ec415 100644 --- a/Source/UsergridUser.swift +++ b/Source/UsergridUser.swift @@ -501,11 +501,11 @@ public class UsergridUser : UsergridEntity { - Warning: When setting a properties value must be a valid JSON object. - Example usage: - ``` - let someName = usergridUser["name"] - - usergridUser["name"] = someName - ``` + + ``` + let someName = usergridUser["name"] + usergridUser["name"] = someName + ``` */ override public subscript(propertyName: String) -> Any? { get { diff --git a/Tests/ASSET_Tests.swift b/Tests/ASSET_Tests.swift index 0bbeb92..1250ca1 100644 --- a/Tests/ASSET_Tests.swift +++ b/Tests/ASSET_Tests.swift @@ -30,20 +30,18 @@ import Foundation class ASSET_Tests: XCTestCase { - static let collectionName = "books" - static let entityUUID = "f4078aca-2fb1-11e5-8eb2-e13f8369aad1" + static let collectionName = "assetTestEntities" static let pngLocation = "TestAssets/test.png" static let jpgLocation = "TestAssets/UsergridGuy.jpg" static let imageName = "test" override func setUp() { super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) - Usergrid.persistCurrentUserInKeychain = false + Usergrid.authMode = .none } override func tearDown() { - Usergrid._sharedClient = nil + Usergrid.authMode = .user super.tearDown() } @@ -79,7 +77,7 @@ class ASSET_Tests: XCTestCase { } func test_IMAGE_UPLOAD() { - let getExpect = self.expectation(description: "\(#function)") + let expect = self.expectation(description: "\(#function)") let uploadProgress : UsergridAssetRequestProgress = { (bytes,expected) in print("UPLOAD PROGRESS BLOCK: BYTES:\(bytes) --- EXPECTED:\(expected)") } @@ -87,7 +85,7 @@ class ASSET_Tests: XCTestCase { print("DOWNLOAD PROGRESS BLOCK: BYTES:\(bytes) --- EXPECTED:\(expected)") } - Usergrid.GET(ASSET_Tests.collectionName, uuidOrName:ASSET_Tests.entityUUID) { (response) in + Usergrid.POST(UsergridEntity(type:ASSET_Tests.collectionName)) { response in XCTAssertTrue(Thread.isMainThread) let entity = response.first! @@ -129,21 +127,28 @@ class ASSET_Tests: XCTestCase { let downloadedImage = UIImage(data: downloadedAsset!.data) XCTAssertEqual(UIImagePNGRepresentation(localImage!), UIImagePNGRepresentation(downloadedImage!)) XCTAssertNotNil(downloadedImage) - getExpect.fulfill() + + Usergrid.DELETE(entity) { response in + XCTAssertTrue(response.ok) + XCTAssertEqual(response.entity?.uuid, entity.uuid) + + expect.fulfill() + } } } + } self.waitForExpectations(timeout: 100, handler: nil) } func deleteUser(_ user:UsergridUser,expectation:XCTestExpectation) { + Usergrid._sharedClient.currentUser = nil user.remove() { removeResponse in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(removeResponse) XCTAssertTrue(removeResponse.ok) XCTAssertNotNil(removeResponse.user) XCTAssertNotNil(removeResponse.users) - print(removeResponse.error) expectation.fulfill() } } diff --git a/Tests/AUTH_Tests.swift b/Tests/AUTH_Tests.swift index d77bcae..00cf4aa 100644 --- a/Tests/AUTH_Tests.swift +++ b/Tests/AUTH_Tests.swift @@ -29,54 +29,30 @@ import XCTest class AUTH_Tests: XCTestCase { - var appAuth: UsergridAppAuth! - var userAuth: UsergridUserAuth! - - fileprivate static let collectionName = "publicevent" - fileprivate static let entityUUID = "fa015eaa-fe1c-11e3-b94b-63b29addea01" - - override func setUp() { - super.setUp() - appAuth = UsergridAppAuth(clientId: "b3U6THNcevskEeOQZLcUROUUVA", clientSecret: "b3U6RZHYznP28xieBzQPackFPmmnevU") - userAuth = UsergridUserAuth(username: "username", password: "password") - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: "sdk.demo") - } - - override func tearDown() { - Usergrid._sharedClient = nil - super.tearDown() - } - func test_CLIENT_AUTH() { let authExpect = self.expectation(description: "\(#function)") + Usergrid.authMode = .app + let appAuth = UsergridAppAuth(clientId: "YXA6-zvnTdLWEeaGGwrYgfQDvw", clientSecret: "YXA64tQ5qQAW_IZYUAOn_tDRKz0HrAU") + Usergrid.authenticateApp(appAuth) { auth,error in XCTAssertTrue(Thread.isMainThread) XCTAssertNil(error) XCTAssertNotNil(Usergrid.appAuth) if let appAuth = Usergrid.appAuth { - XCTAssertNotNil(appAuth.accessToken) XCTAssertNotNil(appAuth.expiry) XCTAssertNotNil(appAuth.isValid) - - Usergrid.GET(AUTH_Tests.collectionName) { (response) in - XCTAssertTrue(Thread.isMainThread) - XCTAssertNotNil(response) - XCTAssertTrue(response.hasNextPage) - XCTAssertEqual(response.entities!.count, 10) - XCTAssertEqual(response.first!.type, AUTH_Tests.collectionName) - - authExpect.fulfill() - } } + authExpect.fulfill() } - self.waitForExpectations(timeout: 100, handler: nil) + self.waitForExpectations(timeout: 1000, handler: nil) } func test_DESTROY_AUTH() { + let auth = UsergridAuth(accessToken: "YWMt91Q2YtWaEeW_Ki2uDueMEwAAAVMUTVSPeOdX-oradxdqirEFz5cPU3GWybs") XCTAssertTrue(auth.isValid) @@ -92,6 +68,7 @@ class AUTH_Tests: XCTestCase { func test_APP_AUTH_NSCODING() { + let appAuth = UsergridAppAuth(clientId: "YXA6-zvnTdLWEeaGGwrYgfQDvw", clientSecret: "YXA64tQ5qQAW_IZYUAOn_tDRKz0HrAU") appAuth.accessToken = "YWMt91Q2YtWaEeW_Ki2uDueMEwAAAVMUTVSPeOdX-oradxdqirEFz5cPU3GWybs" appAuth.expiry = Date.distantFuture @@ -111,6 +88,7 @@ class AUTH_Tests: XCTestCase { func test_USER_AUTH_NSCODING() { + let userAuth: UsergridUserAuth = UsergridUserAuth(username: "username", password: "password") userAuth.accessToken = "YWMt91Q2YtWaEeW_Ki2uDueMEwAAAVMUTVSPeOdX-oradxdqirEFz5cPU3GWybs" userAuth.expiry = Date.distantFuture @@ -127,6 +105,4 @@ class AUTH_Tests: XCTestCase { XCTAssertEqual(userAuth.expiry,newInstance.expiry) } } - - } diff --git a/Tests/CONNECTION_Tests.swift b/Tests/CONNECTION_Tests.swift index e824088..a5b24a4 100644 --- a/Tests/CONNECTION_Tests.swift +++ b/Tests/CONNECTION_Tests.swift @@ -29,18 +29,14 @@ import XCTest class CONNECTION_Tests: XCTestCase { - let clientAuth = UsergridAppAuth(clientId: "b3U6THNcevskEeOQZLcUROUUVA", clientSecret: "b3U6RZHYznP28xieBzQPackFPmmnevU") - fileprivate static let collectionName = "publicevent" + static let collectionName = "connectionTestEntity" + let clientAuth = UsergridAppAuth(clientId: "YXA68al98dLWEeahpA7sJBXz3w", clientSecret: "YXA6-CUpuVaNE3X_f6qDZuXskk_CdQw") - override func setUp() { - super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: "sdk.demo") - } - - override func tearDown() { - Usergrid._sharedClient = nil - super.tearDown() - } + let connectionEntities = [UsergridEntity(type:collectionName), + UsergridEntity(type:collectionName), + UsergridEntity(type:collectionName), + UsergridEntity(type:collectionName), + UsergridEntity(type:collectionName)] func test_CLIENT_AUTH() { @@ -55,17 +51,16 @@ class CONNECTION_Tests: XCTestCase { XCTAssertNotNil(appAuth.accessToken) XCTAssertNotNil(appAuth.expiry) + Usergrid.POST(self.connectionEntities) { (response) in - Usergrid.GET(CONNECTION_Tests.collectionName) { (response) in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(response) XCTAssertTrue(response.ok) - XCTAssertTrue(response.hasNextPage) - XCTAssertEqual(response.entities!.count, 10) + XCTAssertEqual(response.entities!.count, self.connectionEntities.count) let entity = response.first! let entityToConnect = response.entities![1] - XCTAssertEqual(entity.type, CONNECTION_Tests.collectionName) + XCTAssertEqual(entity.type, CONNECTION_Tests.collectionName.lowercased()) entity.connect("likes", toEntity: entityToConnect) { (response) -> Void in XCTAssertTrue(Thread.isMainThread) @@ -90,7 +85,12 @@ class CONNECTION_Tests: XCTestCase { XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(response) XCTAssertTrue(response.ok) - authExpect.fulfill() + + Usergrid.DELETE(UsergridQuery().type(CONNECTION_Tests.collectionName)) { response in + XCTAssertTrue(response.ok) + XCTAssertEqual(response.entities?.count, self.connectionEntities.count) + authExpect.fulfill() + } } } } diff --git a/Tests/ClientCreationTests.swift b/Tests/ClientCreationTests.swift index 6776cb4..5abe6ce 100644 --- a/Tests/ClientCreationTests.swift +++ b/Tests/ClientCreationTests.swift @@ -29,46 +29,32 @@ import XCTest class ClientCreationTests: XCTestCase { - static let orgId = "rwalsh" - static let appId = "sandbox" - - override func setUp() { - super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) - Usergrid.persistCurrentUserInKeychain = false - } - - override func tearDown() { - Usergrid._sharedClient = nil - super.tearDown() - } - - func test_INSTANCE_POINTERS() { - XCTAssertNotNil(Usergrid.sharedInstance) - } + static let orgId = "rjwalsh" + static let appId = "sdk.demo" + let client = UsergridClient(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) func test_CLIENT_PROPERTIES() { - XCTAssertEqual(Usergrid.appId, ClientCreationTests.appId) - XCTAssertEqual(Usergrid.orgId, ClientCreationTests.orgId) - XCTAssertEqual(Usergrid.authMode, UsergridAuthMode.user) - XCTAssertEqual(Usergrid.persistCurrentUserInKeychain, false) - XCTAssertEqual(Usergrid.baseUrl, UsergridClient.DEFAULT_BASE_URL) - XCTAssertEqual(Usergrid.clientAppURL, "\(UsergridClient.DEFAULT_BASE_URL)/\(ClientCreationTests.orgId)/\(ClientCreationTests.appId)" ) - XCTAssertNil(Usergrid.currentUser) - XCTAssertNil(Usergrid.userAuth) + XCTAssertEqual(client.appId, ClientCreationTests.appId) + XCTAssertEqual(client.orgId, ClientCreationTests.orgId) + XCTAssertEqual(client.authMode, UsergridAuthMode.user) + XCTAssertEqual(client.persistCurrentUserInKeychain, true) + XCTAssertEqual(client.baseUrl, UsergridClient.DEFAULT_BASE_URL) + XCTAssertEqual(client.clientAppURL, "\(UsergridClient.DEFAULT_BASE_URL)/\(ClientCreationTests.orgId)/\(ClientCreationTests.appId)" ) + XCTAssertNil(client.currentUser) + XCTAssertNil(client.userAuth) } func test_CLIENT_NSCODING() { - let sharedInstanceAsData = NSKeyedArchiver.archivedData(withRootObject: Usergrid.sharedInstance) + let sharedInstanceAsData = NSKeyedArchiver.archivedData(withRootObject: client) let newInstanceFromData = NSKeyedUnarchiver.unarchiveObject(with: sharedInstanceAsData) as? UsergridClient XCTAssertNotNil(newInstanceFromData) if let newInstance = newInstanceFromData { - XCTAssertEqual(Usergrid.appId, newInstance.appId) - XCTAssertEqual(Usergrid.orgId, newInstance.orgId) - XCTAssertEqual(Usergrid.authMode, newInstance.authMode) - XCTAssertEqual(Usergrid.baseUrl, newInstance.baseUrl) + XCTAssertEqual(client.appId, newInstance.appId) + XCTAssertEqual(client.orgId, newInstance.orgId) + XCTAssertEqual(client.authMode, newInstance.authMode) + XCTAssertEqual(client.baseUrl, newInstance.baseUrl) } } } diff --git a/Tests/GET_Tests.swift b/Tests/GET_Tests.swift index b6698e5..0c8022b 100644 --- a/Tests/GET_Tests.swift +++ b/Tests/GET_Tests.swift @@ -29,24 +29,49 @@ import XCTest 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") + static let collectionName = "getTestEntities" + var postedEntities: [UsergridEntity] = [] override func setUp() { super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) + + let exp = self.expectation(description: "\(#function)") + POST_TEST_ENTITIES(count:20 ,completion: { response in + self.postedEntities = response.entities! + exp.fulfill() + }) + waitForExpectations(timeout: 10, handler: nil) } override func tearDown() { - Usergrid._sharedClient = nil super.tearDown() + let exp = self.expectation(description: "\(#function)") + DELETE_TEST_ENTITIES() { response in + exp.fulfill() + } + waitForExpectations(timeout: 10, handler: nil) + } + + + func POST_TEST_ENTITIES(count: Int, completion: @escaping UsergridResponseCompletion) { + var entitiesToPost: [UsergridEntity] = [] + for _ in (0..???? CFBundleVersion 1 + NSPrincipalClass + $(TARGET_NAME).TestSetup diff --git a/Tests/PUT_Tests.swift b/Tests/PUT_Tests.swift index ff67738..ec69049 100644 --- a/Tests/PUT_Tests.swift +++ b/Tests/PUT_Tests.swift @@ -29,22 +29,25 @@ import XCTest class PUT_Tests: XCTestCase { - let query = UsergridQuery(PUT_Tests.collectionName) - .eq("title", value: "The Sun Also Rises") - .or() - .eq("title", value: "The Old Man and the Sea") + static let putCollectionName = "putTestEntities" - static let collectionName = "books" - static let entityUUID = "f4078aca-2fb1-11e5-8eb2-e13f8369aad1" + var entityToPutOn: UsergridEntity! override func setUp() { super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) + + let exp = expectation(description: "\(#function)\(#line)") + Usergrid.POST(UsergridEntity(type: PUT_Tests.putCollectionName)) { (response) in + self.entityToPutOn = response.entity! + exp.fulfill() + } + + waitForExpectations(timeout: 20, handler: nil) } override func tearDown() { - Usergrid._sharedClient = nil super.tearDown() + entityToPutOn.remove() } func test_PUT_BY_SPECIFYING_UUID_AS_PARAMETER() { @@ -53,7 +56,7 @@ class PUT_Tests: XCTestCase { let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectation(description: propertyNameToUpdate) - Usergrid.PUT(PUT_Tests.collectionName, uuidOrName: PUT_Tests.entityUUID, jsonBody:[propertyNameToUpdate : propertiesNewValue]) { (response) in + Usergrid.PUT(PUT_Tests.putCollectionName, uuidOrName: self.entityToPutOn.uuid!, jsonBody:[propertyNameToUpdate : propertiesNewValue]) { (response) in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(response) XCTAssertTrue(response.ok) @@ -61,13 +64,15 @@ class PUT_Tests: XCTestCase { let entity = response.first! XCTAssertNotNil(entity) - XCTAssertEqual(entity.uuid!, PUT_Tests.entityUUID) + XCTAssertEqual(entity.uuid!, self.entityToPutOn.uuid!) let updatedPropertyValue = entity[propertyNameToUpdate] as? String XCTAssertNotNil(updatedPropertyValue) XCTAssertEqual(updatedPropertyValue!,propertiesNewValue) + putExpect.fulfill() } + self.waitForExpectations(timeout: 10, handler: nil) } @@ -77,9 +82,8 @@ class PUT_Tests: XCTestCase { let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectation(description: propertyNameToUpdate) - let jsonDictToPut = [UsergridEntityProperties.uuid.stringValue : PUT_Tests.entityUUID, propertyNameToUpdate : propertiesNewValue] - - Usergrid.PUT(PUT_Tests.collectionName, jsonBody: jsonDictToPut) { (response) in + let jsonDictToPut = [UsergridEntityProperties.uuid.stringValue : self.entityToPutOn.uuid!, propertyNameToUpdate : propertiesNewValue] + Usergrid.PUT(PUT_Tests.putCollectionName, jsonBody: jsonDictToPut) { (response) in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(response) XCTAssertTrue(response.ok) @@ -87,59 +91,55 @@ class PUT_Tests: XCTestCase { let entity = response.first! XCTAssertNotNil(entity) - XCTAssertEqual(entity.uuid!, PUT_Tests.entityUUID) + XCTAssertEqual(entity.uuid!, self.entityToPutOn.uuid!) let updatedPropertyValue = entity[propertyNameToUpdate] as? String XCTAssertNotNil(updatedPropertyValue) XCTAssertEqual(updatedPropertyValue!,propertiesNewValue) putExpect.fulfill() } + self.waitForExpectations(timeout: 10, handler: nil) } func test_PUT_WITH_ENTITY_OBJECT() { + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectation(description: propertyNameToUpdate) - Usergrid.GET(PUT_Tests.collectionName, uuidOrName: PUT_Tests.entityUUID) { (getResponse) in + self.entityToPutOn[propertyNameToUpdate] = propertiesNewValue + + Usergrid.PUT(self.entityToPutOn) { (putResponse) in XCTAssertTrue(Thread.isMainThread) - XCTAssertNotNil(getResponse) - XCTAssertTrue(getResponse.ok) - XCTAssertEqual(getResponse.entities!.count, 1) + XCTAssertNotNil(putResponse) + XCTAssertTrue(putResponse.ok) + XCTAssertEqual(putResponse.entities!.count, 1) - var responseEntity = getResponse.first! + let responseEntity = putResponse.first! XCTAssertNotNil(responseEntity) - XCTAssertEqual(responseEntity.uuid!, PUT_Tests.entityUUID) - - responseEntity[propertyNameToUpdate] = propertiesNewValue - - Usergrid.PUT(responseEntity) { (putResponse) in - XCTAssertTrue(Thread.isMainThread) - XCTAssertNotNil(putResponse) - XCTAssertTrue(putResponse.ok) - XCTAssertEqual(putResponse.entities!.count, 1) - responseEntity = putResponse.first! + XCTAssertEqual(responseEntity.uuid!, self.entityToPutOn.uuid!) - XCTAssertNotNil(responseEntity) - XCTAssertEqual(responseEntity.uuid!, PUT_Tests.entityUUID) - - let updatedPropertyValue = responseEntity[propertyNameToUpdate] as? String - XCTAssertNotNil(updatedPropertyValue) - XCTAssertEqual(updatedPropertyValue!,propertiesNewValue) - putExpect.fulfill() - } + let updatedPropertyValue = responseEntity[propertyNameToUpdate] as? String + XCTAssertNotNil(updatedPropertyValue) + XCTAssertEqual(updatedPropertyValue!,propertiesNewValue) + putExpect.fulfill() } + self.waitForExpectations(timeout: 20, handler: nil) } func test_PUT_WITH_QUERY() { + sleep(20) + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectation(description: propertyNameToUpdate) - Usergrid.PUT(self.query, jsonBody: [propertyNameToUpdate : propertiesNewValue]) { (putResponse) in + let query = UsergridQuery(PUT_Tests.putCollectionName).eq("uuid", value: self.entityToPutOn.uuid!) + + Usergrid.PUT(query, jsonBody: [propertyNameToUpdate : propertiesNewValue]) { (putResponse) in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(putResponse) XCTAssertTrue(putResponse.ok) @@ -153,6 +153,7 @@ class PUT_Tests: XCTestCase { XCTAssertEqual(updatedPropertyValue!,propertiesNewValue) putExpect.fulfill() } + self.waitForExpectations(timeout: 10, handler: nil) } } diff --git a/Tests/TestSetup.swift b/Tests/TestSetup.swift new file mode 100644 index 0000000..617b192 --- /dev/null +++ b/Tests/TestSetup.swift @@ -0,0 +1,37 @@ +// +// TestSetup.swift +// UsergridSDK +// +// Created by Robert on 2/14/17. +// +/* + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + * + */ + +import Foundation +@testable import UsergridSDK + +class TestSetup: NSObject { + override init () { + let config = UsergridClientConfig(orgId: "rjwalsh", appId: "sandbox") + config.persistCurrentUserInKeychain = false + + Usergrid.initSharedInstance(configuration: config) + } +} diff --git a/Tests/User_Tests.swift b/Tests/User_Tests.swift index aeea8c3..6511550 100644 --- a/Tests/User_Tests.swift +++ b/Tests/User_Tests.swift @@ -45,7 +45,6 @@ class User_Tests: XCTestCase { override func setUp() { super.setUp() - Usergrid.initSharedInstance(orgId:ClientCreationTests.orgId, appId: ClientCreationTests.appId) Usergrid.authMode = .user Usergrid.persistCurrentUserInKeychain = false @@ -60,8 +59,8 @@ class User_Tests: XCTestCase { } override func tearDown() { - Usergrid._sharedClient = nil super.tearDown() + Usergrid.sharedInstance.currentUser = nil } func test_USER_INIT() { @@ -163,7 +162,6 @@ class User_Tests: XCTestCase { XCTAssertTrue(removeResponse.ok) XCTAssertNotNil(removeResponse.user) XCTAssertNotNil(removeResponse.users) - print(removeResponse.error) expectation.fulfill() } } @@ -208,8 +206,6 @@ class User_Tests: XCTestCase { XCTAssertNil(error) XCTAssertTrue(available) -// self.deleteUser(userExpect) - self.user.create() { (createResponse) in XCTAssertTrue(Thread.isMainThread) XCTAssertNotNil(createResponse) @@ -233,7 +229,7 @@ class User_Tests: XCTestCase { XCTAssertNotNil(currentUser) XCTAssertNotNil(Usergrid.currentUser) - XCTAssertEqual(currentUser, Usergrid.currentUser!) + XCTAssertEqual(currentUser, Usergrid.currentUser) self.user.reauthenticate() { auth, reauthedUser, error in XCTAssertTrue(Thread.isMainThread) diff --git a/UsergridSDK.podspec b/UsergridSDK.podspec index 4d13736..c25debc 100644 --- a/UsergridSDK.podspec +++ b/UsergridSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'UsergridSDK' - s.version = ‘2.1.3’ + s.version = '2.1.3' s.summary = 'Usergrid SDK written in Swift' s.homepage = 'https://github.com/apache/usergrid-swift' s.license = 'Apache 2.0' diff --git a/UsergridSDK.xcodeproj/project.pbxproj b/UsergridSDK.xcodeproj/project.pbxproj index af92c89..bb68bd0 100644 --- a/UsergridSDK.xcodeproj/project.pbxproj +++ b/UsergridSDK.xcodeproj/project.pbxproj @@ -111,6 +111,9 @@ 63EE61031C406E1600AFC2CF /* UsergridAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63AF0F401BBC4EF6009D4196 /* UsergridAsset.swift */; }; 63EE61041C406E1600AFC2CF /* UsergridClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63AF0F421BBC4EF6009D4196 /* UsergridClient.swift */; }; 63EE610D1C406E2200AFC2CF /* UsergridSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AF0F471BBC4EF6009D4196 /* UsergridSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 63F037201E53C716009714B4 /* TestSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F0371F1E53C716009714B4 /* TestSetup.swift */; }; + 63F037211E53C716009714B4 /* TestSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F0371F1E53C716009714B4 /* TestSetup.swift */; }; + 63F037221E53C716009714B4 /* TestSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F0371F1E53C716009714B4 /* TestSetup.swift */; }; 63F36F0F1C458AAE00CEEF54 /* UsergridRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F36F0E1C458AAE00CEEF54 /* UsergridRequest.swift */; }; 63F36F101C458AAE00CEEF54 /* UsergridRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F36F0E1C458AAE00CEEF54 /* UsergridRequest.swift */; }; 63F36F111C458AAE00CEEF54 /* UsergridRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F36F0E1C458AAE00CEEF54 /* UsergridRequest.swift */; }; @@ -178,6 +181,7 @@ 63E7DD2E1C514CA200D84B12 /* UsergridSessionDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UsergridSessionDelegate.swift; sourceTree = ""; }; 63EE60D81C404AB700AFC2CF /* UsergridResponseError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UsergridResponseError.swift; sourceTree = ""; }; 63EE610B1C406E1600AFC2CF /* UsergridSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UsergridSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 63F0371F1E53C716009714B4 /* TestSetup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestSetup.swift; sourceTree = ""; }; 63F36F0E1C458AAE00CEEF54 /* UsergridRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UsergridRequest.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -303,6 +307,7 @@ 63AF0F571BBC528E009D4196 /* Tests */ = { isa = PBXGroup; children = ( + 63F0371F1E53C716009714B4 /* TestSetup.swift */, 63AF0F591BBC528E009D4196 /* ASSET_Tests.swift */, 63AF0F5A1BBC528E009D4196 /* AUTH_Tests.swift */, 63AF0F5B1BBC528E009D4196 /* ClientCreationTests.swift */, @@ -498,7 +503,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Apigee Inc."; TargetAttributes = { 630A219E1C49BFFC008BE87F = { @@ -615,6 +620,7 @@ 630A21AE1C49C011008BE87F /* Entity_Tests.swift in Sources */, 630A21AB1C49C011008BE87F /* AUTH_Tests.swift in Sources */, 630A21B21C49C011008BE87F /* User_Tests.swift in Sources */, + 63F037211E53C716009714B4 /* TestSetup.swift in Sources */, 630A21B11C49C011008BE87F /* PUT_Tests.swift in Sources */, 630A21AD1C49C011008BE87F /* CONNECTION_Tests.swift in Sources */, 630A21AF1C49C011008BE87F /* GET_Tests.swift in Sources */, @@ -630,6 +636,7 @@ 630A21C81C49C4C0008BE87F /* Entity_Tests.swift in Sources */, 630A21C61C49C4C0008BE87F /* ClientCreationTests.swift in Sources */, 630A21C41C49C4C0008BE87F /* ASSET_Tests.swift in Sources */, + 63F037221E53C716009714B4 /* TestSetup.swift in Sources */, 630A21CC1C49C4C0008BE87F /* User_Tests.swift in Sources */, 630A21CB1C49C4C0008BE87F /* PUT_Tests.swift in Sources */, 630A21C51C49C4C0008BE87F /* AUTH_Tests.swift in Sources */, @@ -671,6 +678,7 @@ 630A218A1C49BDDE008BE87F /* User_Tests.swift in Sources */, 630A21891C49BDDE008BE87F /* PUT_Tests.swift in Sources */, 630A21821C49BDD3008BE87F /* AUTH_Tests.swift in Sources */, + 63F037201E53C716009714B4 /* TestSetup.swift in Sources */, 630A21851C49BDDE008BE87F /* CONNECTION_Tests.swift in Sources */, 630A21871C49BDDE008BE87F /* GET_Tests.swift in Sources */, 630A21831C49BDDE008BE87F /* ASSET_Tests.swift in Sources */, @@ -893,7 +901,7 @@ SDKROOT = appletvos; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; @@ -908,7 +916,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; @@ -916,6 +924,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -937,6 +946,7 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -968,8 +978,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1017,8 +1029,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1051,6 +1065,7 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1072,6 +1087,7 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1092,6 +1108,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1107,6 +1124,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; @@ -1114,6 +1132,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1129,6 +1148,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; diff --git a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK OSX.xcscheme b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK OSX.xcscheme index 7cb7a01..5ffd94a 100644 --- a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK OSX.xcscheme +++ b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK OSX.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK iOS.xcscheme b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK iOS.xcscheme index 87f3d97..49874ad 100644 --- a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK iOS.xcscheme +++ b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK iOS.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK tvOS.xcscheme b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK tvOS.xcscheme index ed7fbc6..eaf7f10 100644 --- a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK tvOS.xcscheme +++ b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK tvOS.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK watchOS.xcscheme b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK watchOS.xcscheme index 66d0592..ebc3852 100644 --- a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK watchOS.xcscheme +++ b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK watchOS.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK_OSX_Tests.xcscheme b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK_OSX_Tests.xcscheme index 27f424a..2d044d4 100644 --- a/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK_OSX_Tests.xcscheme +++ b/UsergridSDK.xcodeproj/xcshareddata/xcschemes/UsergridSDK_OSX_Tests.xcscheme @@ -1,6 +1,6 @@
-

Docs (100% documented)

+

UsergridSDK Docs (100% documented)

@@ -123,7 +123,7 @@ Extensions @@ -251,7 +251,7 @@

Declaration

Declaration

Swift

-
public class UsergridAssetUploadRequest: UsergridRequest
+
public class UsergridAssetUploadRequest: UsergridRequest
@@ -347,7 +347,7 @@

Declaration

Declaration

Swift

-
public class UsergridUserAuth : UsergridAuth
+
public class UsergridUserAuth : UsergridAuth
@@ -375,7 +375,7 @@

Declaration

Declaration

Swift

-
public class UsergridAppAuth : UsergridAuth
+
public class UsergridAppAuth : UsergridAuth
@@ -441,7 +441,7 @@

Declaration

Declaration

Swift

-
public class UsergridDevice : UsergridEntity
+
public class UsergridDevice : UsergridEntity
@@ -509,7 +509,7 @@

Declaration

Declaration

Swift

-
public class UsergridEntity: NSObject, NSCoding
+
open class UsergridEntity: NSObject, NSCoding
@@ -541,7 +541,7 @@

Declaration

Declaration

Swift

-
public class UsergridUser : UsergridEntity
+
public class UsergridUser : UsergridEntity
@@ -692,8 +692,8 @@

Declaration

diff --git a/docs/Classes/Usergrid.html b/docs/Classes/Usergrid.html index 61bf26f..5d4da2c 100644 --- a/docs/Classes/Usergrid.html +++ b/docs/Classes/Usergrid.html @@ -14,12 +14,12 @@
-

Docs (100% documented)

+

UsergridSDK Docs (100% documented)

@@ -124,7 +124,7 @@ Extensions @@ -207,7 +207,7 @@

Static Variables

Declaration

Swift

-
public static var isInitialized : Bool  { return Usergrid._sharedClient != nil }
+
public static var isInitialized : Bool
@@ -227,12 +227,12 @@

Declaration

-

A shared instance of UsergridClient, used by the Usergrid static methods and acts as the default UsergridClient +

A shared instance of UsergridClient, used by the Usergrid static methods and acts as the default UsergridClient within the UsergridSDK library.

Warning

- You must call one of the Usergrid.initSharedInstance methods before this or any other Usergrid static methods are valid. + You must call one of the Usergrid.initSharedInstance methods before this or any other Usergrid static methods are valid.
@@ -241,7 +241,7 @@

Declaration

Declaration

Swift

-
public static var sharedInstance : UsergridClient
+
public static var sharedInstance : UsergridClient
@@ -268,7 +268,7 @@

Declaration

Declaration

Swift

-
public static var appId : String { return Usergrid.sharedInstance.appId }
+
public static var appId : String
@@ -295,7 +295,7 @@

Declaration

Declaration

Swift

-
public static var orgId : String { return Usergrid.sharedInstance.orgId }
+
public static var orgId : String
@@ -322,7 +322,7 @@

Declaration

Declaration

Swift

-
public static var baseUrl : String { return Usergrid.sharedInstance.baseUrl }
+
public static var baseUrl : String
@@ -349,7 +349,7 @@

Declaration

Declaration

Swift

-
public static var clientAppURL : String { return Usergrid.sharedInstance.clientAppURL }
+
public static var clientAppURL : String
@@ -376,7 +376,7 @@

Declaration

Declaration

Swift

-
public static var currentUser: UsergridUser?  { return Usergrid.sharedInstance.currentUser }
+
public static var currentUser: UsergridUser?
@@ -430,7 +430,7 @@

Declaration

Declaration

Swift

-
public static var userAuth: UsergridUserAuth?  { return Usergrid.sharedInstance.userAuth }
+
public static var userAuth: UsergridUserAuth?
@@ -457,7 +457,7 @@

Declaration

Declaration

Swift

-
public static var appAuth: UsergridAppAuth?
+
public static var appAuth: UsergridAppAuth?
@@ -484,7 +484,7 @@

Declaration

Declaration

Swift

-
public static var authMode: UsergridAuthMode
+
public static var authMode: UsergridAuthMode
@@ -522,7 +522,7 @@

Initialization

Declaration

Swift

-
public static func initSharedInstance(orgId orgId : String, appId: String) -> UsergridClient
+
public static func initSharedInstance(orgId : String, appId: String) -> UsergridClient
@@ -587,7 +587,7 @@

Return Value

Declaration

Swift

-
public static func initSharedInstance(orgId orgId : String, appId: String, baseUrl: String) -> UsergridClient
+
public static func initSharedInstance(orgId : String, appId: String, baseUrl: String) -> UsergridClient
@@ -665,7 +665,7 @@

Return Value

Declaration

Swift

-
public static func initSharedInstance(configuration configuration: UsergridClientConfig) -> UsergridClient
+
public static func initSharedInstance(configuration: UsergridClientConfig) -> UsergridClient
@@ -711,9 +711,9 @@

Push Notifications

  • @@ -728,7 +728,7 @@

    Push Notifications

    Declaration

    Swift

    -
    public static func applyPushToken(pushToken: NSData, notifierID: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func applyPushToken(_ pushToken: Data, notifierID: String, completion: UsergridResponseCompletion? = nil)
    @@ -784,9 +784,9 @@

    Parameters

  • @@ -801,7 +801,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func applyPushToken(device: UsergridDevice, pushToken: NSData, notifierID: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func applyPushToken(_ device: UsergridDevice, pushToken: Data, notifierID: String, completion: UsergridResponseCompletion? = nil)
    @@ -900,7 +900,7 @@

    Authorization

    Declaration

    Swift

    -
    public static func usingAuth(auth:UsergridAuth) -> UsergridClient
    +
    public static func usingAuth(_ auth:UsergridAuth) -> UsergridClient
    @@ -954,7 +954,7 @@

    Return Value

    Declaration

    Swift

    -
    public static func usingToken(token:String) -> UsergridClient
    +
    public static func usingToken(_ token:String) -> UsergridClient
    @@ -1010,7 +1010,7 @@

    Return Value

    Declaration

    Swift

    -
    public static func authForRequests() -> UsergridAuth?
    +
    public static func authForRequests() -> UsergridAuth?
    @@ -1025,9 +1025,9 @@

    Return Value

  • @@ -1042,7 +1042,7 @@

    Return Value

    Declaration

    Swift

    -
    public static func authenticateApp(completion: UsergridAppAuthCompletionBlock? = nil)
    +
    public static func authenticateApp(_ completion: UsergridAppAuthCompletionBlock? = nil)
    @@ -1072,9 +1072,9 @@

    Parameters

  • @@ -1089,7 +1089,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func authenticateApp(auth: UsergridAppAuth, completion: UsergridAppAuthCompletionBlock? = nil)
    +
    public static func authenticateApp(_ auth: UsergridAppAuth, completion: UsergridAppAuthCompletionBlock? = nil)
    @@ -1132,9 +1132,9 @@

    Parameters

  • @@ -1149,7 +1149,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func authenticateUser(auth: UsergridUserAuth, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public static func authenticateUser(_ auth: UsergridUserAuth, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1192,9 +1192,9 @@

    Parameters

  • @@ -1209,7 +1209,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func authenticateUser(userAuth: UsergridUserAuth, setAsCurrentUser:Bool, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public static func authenticateUser(_ userAuth: UsergridUserAuth, setAsCurrentUser:Bool, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1265,9 +1265,9 @@

    Parameters

  • @@ -1282,7 +1282,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func resetPassword(user: UsergridUser, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    +
    public static func resetPassword(_ user: UsergridUser, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    @@ -1351,9 +1351,9 @@

    Parameters

  • @@ -1368,7 +1368,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func logoutCurrentUser(completion:UsergridResponseCompletion? = nil)
    +
    public static func logoutCurrentUser(_ completion:UsergridResponseCompletion? = nil)
    @@ -1398,9 +1398,9 @@

    Parameters

  • @@ -1415,7 +1415,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func logoutUserAllTokens(uuidOrUsername:String, completion:UsergridResponseCompletion? = nil)
    +
    public static func logoutUserAllTokens(_ uuidOrUsername:String, completion:UsergridResponseCompletion? = nil)
    @@ -1445,9 +1445,9 @@

    Parameters

  • @@ -1464,7 +1464,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func logoutUser(uuidOrUsername:String, token:String?, completion:UsergridResponseCompletion? = nil)
    +
    public static func logoutUser(_ uuidOrUsername:String, token:String?, completion:UsergridResponseCompletion? = nil)
    @@ -1505,9 +1505,9 @@

    Generic Request Methods

  • @@ -1528,7 +1528,7 @@

    Generic Request Methods

    Declaration

    Swift

    -
    public static func sendRequest(request:UsergridRequest, completion:UsergridResponseCompletion? = nil)
    +
    public static func sendRequest(_ request:UsergridRequest, completion:UsergridResponseCompletion? = nil)
    @@ -1582,9 +1582,9 @@

    GET

  • @@ -1599,7 +1599,7 @@

    GET

    Declaration

    Swift

    -
    public static func GET(type: String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func GET(_ type: String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    @@ -1655,9 +1655,9 @@

    Parameters

  • @@ -1672,7 +1672,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func GET(type: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func GET(_ type: String, completion: UsergridResponseCompletion? = nil)
    @@ -1715,9 +1715,9 @@

    Parameters

  • @@ -1732,7 +1732,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func GET(query: UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    +
    public static func GET(_ query: UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    @@ -1786,9 +1786,9 @@

    PUT

  • @@ -1803,7 +1803,7 @@

    PUT

    Declaration

    Swift

    -
    public static func PUT(type: String, uuidOrName: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public static func PUT(_ type: String, uuidOrName: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -1872,9 +1872,9 @@

    Parameters

  • @@ -1895,7 +1895,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func PUT(type: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public static func PUT(_ type: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -1951,9 +1951,9 @@

    Parameters

  • @@ -1968,7 +1968,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func PUT(entity: UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public static func PUT(_ entity: UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2011,9 +2011,9 @@

    Parameters

  • @@ -2034,7 +2034,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func PUT(query: UsergridQuery, jsonBody:[String:AnyObject], queryCompletion: UsergridResponseCompletion? = nil)
    +
    public static func PUT(_ query: UsergridQuery, jsonBody:[String:Any], queryCompletion: UsergridResponseCompletion? = nil)
    @@ -2101,9 +2101,9 @@

    POST

  • @@ -2118,7 +2118,7 @@

    POST

    Declaration

    Swift

    -
    public static func POST(type: String, name: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public static func POST(_ type: String, name: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -2187,9 +2187,9 @@

    Parameters

  • @@ -2204,7 +2204,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func POST(type: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public static func POST(_ type: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -2260,9 +2260,9 @@

    Parameters

  • @@ -2277,7 +2277,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func POST(type: String, jsonBodies:[[String:AnyObject]], completion: UsergridResponseCompletion? = nil)
    +
    public static func POST(_ type: String, jsonBodies:[[String:Any]], completion: UsergridResponseCompletion? = nil)
    @@ -2333,9 +2333,9 @@

    Parameters

  • @@ -2350,7 +2350,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func POST(entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public static func POST(_ entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2393,9 +2393,9 @@

    Parameters

  • @@ -2416,7 +2416,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func POST(entities:[UsergridEntity], entitiesCompletion: UsergridResponseCompletion? = nil)
    +
    public static func POST(_ entities:[UsergridEntity], entitiesCompletion: UsergridResponseCompletion? = nil)
    @@ -2470,9 +2470,9 @@

    DELETE

  • @@ -2487,7 +2487,7 @@

    DELETE

    Declaration

    Swift

    -
    public static func DELETE(type:String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func DELETE(_ type:String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    @@ -2543,9 +2543,9 @@

    Parameters

  • @@ -2566,7 +2566,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func DELETE(entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public static func DELETE(_ entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2609,9 +2609,9 @@

    Parameters

  • @@ -2632,7 +2632,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func DELETE(query:UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    +
    public static func DELETE(_ query:UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    @@ -2686,9 +2686,9 @@

    Connection Management

  • @@ -2703,7 +2703,7 @@

    Connection Management

    Declaration

    Swift

    -
    public static func connect(entity:UsergridEntity, relationship:String, to:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public static func connect(_ entity:UsergridEntity, relationship:String, to:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2772,9 +2772,9 @@

    Parameters

  • @@ -2789,7 +2789,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func connect(entityType:String, entityID:String, relationship:String, toType:String?, toID: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func connect(_ entityType:String, entityID:String, relationship:String, toType:String?, toID: String, completion: UsergridResponseCompletion? = nil)
    @@ -2884,9 +2884,9 @@

    Parameters

  • @@ -2901,7 +2901,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func connect(entityType:String, entityID:String, relationship:String, toType:String, toName: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func connect(_ entityType:String, entityID:String, relationship:String, toType:String, toName: String, completion: UsergridResponseCompletion? = nil)
    @@ -2996,9 +2996,9 @@

    Parameters

  • @@ -3013,7 +3013,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func disconnect(entity:UsergridEntity, relationship:String, from:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public static func disconnect(_ entity:UsergridEntity, relationship:String, from:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -3082,9 +3082,9 @@

    Parameters

  • @@ -3099,7 +3099,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func disconnect(entityType:String, entityID:String, relationship:String, fromType:String?, fromID: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func disconnect(_ entityType:String, entityID:String, relationship:String, fromType:String?, fromID: String, completion: UsergridResponseCompletion? = nil)
    @@ -3194,9 +3194,9 @@

    Parameters

  • @@ -3211,7 +3211,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func disconnect(entityType:String, entityID:String, relationship:String, fromType:String, fromName: String, completion: UsergridResponseCompletion? = nil)
    +
    public static func disconnect(_ entityType:String, entityID:String, relationship:String, fromType:String, fromName: String, completion: UsergridResponseCompletion? = nil)
    @@ -3306,9 +3306,9 @@

    Parameters

  • @@ -3323,7 +3323,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func getConnections(direction:UsergridDirection, entity:UsergridEntity, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public static func getConnections(_ direction:UsergridDirection, entity:UsergridEntity, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3392,9 +3392,9 @@

    Parameters

  • @@ -3409,7 +3409,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func getConnections(direction:UsergridDirection, type:String, uuidOrName:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public static func getConnections(_ direction:UsergridDirection, type:String, uuidOrName:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3504,9 +3504,9 @@

    Parameters

  • @@ -3521,7 +3521,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func getConnections(direction:UsergridDirection, uuid:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public static func getConnections(_ direction:UsergridDirection, uuid:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3614,9 +3614,9 @@

    Asset Management

  • @@ -3631,7 +3631,7 @@

    Asset Management

    Declaration

    Swift

    -
    public static func uploadAsset(entity:UsergridEntity, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    +
    public static func uploadAsset(_ entity:UsergridEntity, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    @@ -3700,9 +3700,9 @@

    Parameters

  • @@ -3717,7 +3717,7 @@

    Parameters

    Declaration

    Swift

    -
    public static func downloadAsset(entity:UsergridEntity, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    +
    public static func downloadAsset(_ entity:UsergridEntity, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    @@ -3746,7 +3746,7 @@

    Parameters

    -

    The content type of the asset’s data.

    +

    The content type of the asset’s data.

    @@ -3788,8 +3788,8 @@

    Parameters

  • diff --git a/docs/Classes/UsergridAppAuth.html b/docs/Classes/UsergridAppAuth.html index 70c940e..6581915 100644 --- a/docs/Classes/UsergridAppAuth.html +++ b/docs/Classes/UsergridAppAuth.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions @@ -165,7 +165,7 @@

    UsergridAppAuth

    -
    public class UsergridAppAuth : UsergridAuth
    +
    public class UsergridAppAuth : UsergridAuth
    @@ -233,7 +233,7 @@

    Initialization

    -

    Designated initializer for UsergridAppAuth objects.

    +

    Designated initializer for UsergridAppAuth objects.

    @@ -279,7 +279,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridAppAuth.

    +

    A new instance of UsergridAppAuth.

    @@ -342,7 +342,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridAppAuth object.

    +

    A decoded UsergridAppAuth object.

    @@ -351,9 +351,9 @@

    Return Value

  • @@ -368,7 +368,7 @@

    Return Value

    Declaration

    Swift

    -
    override public func encodeWithCoder(aCoder: NSCoder)
    +
    override public func encode(with aCoder: NSCoder)
    @@ -400,8 +400,8 @@

    Parameters

    diff --git a/docs/Classes/UsergridAsset.html b/docs/Classes/UsergridAsset.html index 568d727..c86dc64 100644 --- a/docs/Classes/UsergridAsset.html +++ b/docs/Classes/UsergridAsset.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -214,9 +214,9 @@

    Declaration

  • - + - data + data
    @@ -231,7 +231,7 @@

    Declaration

    Declaration

    Swift

    -
    public let data: NSData
    +
    public let data: Data
    @@ -312,7 +312,7 @@

    Declaration

    Declaration

    Swift

    -
    public var contentLength: Int { return self.data.length }
    +
    public var contentLength: Int
    @@ -333,9 +333,9 @@

    Initialization

  • @@ -343,14 +343,14 @@

    Initialization

    -

    Designated initializer for UsergridAsset objects.

    +

    Designated initializer for UsergridAsset objects.

    Declaration

    Swift

    -
    public init(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, data:NSData, originalLocation:String? = nil, contentType:String)
    +
    public init(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, data:Data, originalLocation:String? = nil, contentType:String)
    @@ -415,7 +415,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridAsset.

    +

    A new instance of UsergridAsset.

    @@ -434,14 +434,14 @@

    Return Value

    -

    Convenience initializer for UsergridAsset objects dealing with image data.

    +

    Convenience initializer for UsergridAsset objects dealing with image data.

    Declaration

    Swift

    -
    public convenience init?(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, image:UIImage, imageContentType:UsergridImageContentType = .Png)
    +
    public convenience init?(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, image:UIImage, imageContentType:UsergridImageContentType = .png)
    @@ -493,7 +493,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridAsset if the data can be gathered from the passed in UIImage, otherwise nil.

    +

    A new instance of UsergridAsset if the data can be gathered from the passed in UIImage, otherwise nil.

    @@ -502,9 +502,9 @@

    Return Value

  • @@ -512,14 +512,14 @@

    Return Value

    -

    Convenience initializer for UsergridAsset objects dealing directly with files on disk.

    +

    Convenience initializer for UsergridAsset objects dealing directly with files on disk.

    Declaration

    Swift

    -
    public convenience init?(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, fileURL:NSURL, contentType:String? = nil)
    +
    public convenience init?(filename:String? = UsergridAsset.DEFAULT_FILE_NAME, fileURL:URL, contentType:String? = nil)
    @@ -561,7 +561,7 @@

    Parameters

    -

    The content type of the UIImage. If not specified it will try to figure out the type and if it can’t initialization will fail.

    +

    The content type of the UIImage. If not specified it will try to figure out the type and if it can’t initialization will fail.

    @@ -571,7 +571,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridAsset if the data can be gathered from the passed in NSURL, otherwise nil.

    +

    A new instance of UsergridAsset if the data can be gathered from the passed in NSURL, otherwise nil.

    @@ -634,7 +634,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridAsset object.

    @@ -643,9 +643,9 @@

    Return Value

  • @@ -660,7 +660,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    public func encode(with aCoder: NSCoder)
    @@ -692,8 +692,8 @@

    Parameters

    diff --git a/docs/Classes/UsergridAssetUploadRequest.html b/docs/Classes/UsergridAssetUploadRequest.html index f7a0b00..eed476a 100644 --- a/docs/Classes/UsergridAssetUploadRequest.html +++ b/docs/Classes/UsergridAssetUploadRequest.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -165,7 +165,7 @@

    UsergridAssetUploadRequest

    -
    public class UsergridAssetUploadRequest: UsergridRequest
    +
    public class UsergridAssetUploadRequest: UsergridRequest
    @@ -202,7 +202,7 @@

    Instance Properties

    Declaration

    Swift

    -
    public let asset: UsergridAsset
    +
    public let asset: UsergridAsset
    @@ -212,9 +212,9 @@

    Declaration

  • @@ -229,7 +229,7 @@

    Declaration

    Declaration

    Swift

    -
    public var multiPartHTTPBody: NSData
    +
    public var multiPartHTTPBody: Data
    @@ -260,7 +260,7 @@

    Initialization

    -

    The designated initializer for UsergridAssetUploadRequest objects.

    +

    The designated initializer for UsergridAssetUploadRequest objects.

    @@ -269,8 +269,8 @@

    Declaration

    Swift

    public init(baseUrl:String,
                     paths:[String]? = nil,
    -                auth:UsergridAuth? = nil,
    -                asset:UsergridAsset)
    + auth:UsergridAuth? = nil, + asset:UsergridAsset)
    @@ -346,8 +346,8 @@

    Return Value

    diff --git a/docs/Classes/UsergridAuth.html b/docs/Classes/UsergridAuth.html index 8d1f6fd..01a35d6 100644 --- a/docs/Classes/UsergridAuth.html +++ b/docs/Classes/UsergridAuth.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -197,7 +197,7 @@

    Instance Properties

    -

    The access token, if this UsergridAuth was authorized successfully.

    +

    The access token, if this UsergridAuth was authorized successfully.

    @@ -214,9 +214,9 @@

    Declaration

  • - + - expiry + expiry
    @@ -224,14 +224,14 @@

    Declaration

    -

    The expires at date, if this UsergridAuth was authorized successfully and their was a expires in time stamp within the token response.

    +

    The expires at date, if this UsergridAuth was authorized successfully and their was a expires in time stamp within the token response.

    Declaration

    Swift

    -
    public var expiry : NSDate?
    +
    public var expiry : Date?
    @@ -258,7 +258,7 @@

    Declaration

    Declaration

    Swift

    -
    public var hasToken: Bool { return self.accessToken != nil }
    +
    public var hasToken: Bool
    @@ -285,7 +285,7 @@

    Declaration

    Declaration

    Swift

    -
    public var isValid : Bool { return self.hasToken && !self.isExpired }
    +
    public var isValid : Bool
  • @@ -333,9 +333,9 @@

    Initialization

  • @@ -343,14 +343,14 @@

    Initialization

    -

    Initializer for a base UsergridAuth object that just contains an accessToken and an optional expiry date.

    +

    Initializer for a base UsergridAuth object that just contains an accessToken and an optional expiry date.

    Declaration

    Swift

    -
    public init(accessToken:String, expiry:NSDate? = nil)
    +
    public init(accessToken:String, expiry:Date? = nil)
    @@ -389,7 +389,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridAuth

    +

    A new instance of UsergridAuth

  • @@ -452,7 +452,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridAuth object.

    +

    A decoded UsergridAuth object.

    @@ -461,9 +461,9 @@

    Return Value

  • @@ -478,7 +478,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    public func encode(with aCoder: NSCoder)
    @@ -548,8 +548,8 @@

    Declaration

    diff --git a/docs/Classes/UsergridClient.html b/docs/Classes/UsergridClient.html index 09c2175..6c70da7 100644 --- a/docs/Classes/UsergridClient.html +++ b/docs/Classes/UsergridClient.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -173,6 +173,71 @@

    UsergridClient

    +
    + +
      +
    • +
      + + + + DEFAULT_BASE_URL + +
      +
      +
      +
      +
      +
      +

      The default base URL for all calls made by the UsergridClient instances.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static let DEFAULT_BASE_URL = "https://apibaas-trial.apigee.net"
      + +
      +
      +
      +
      +
    • +
    • +
      + + + + DEFAULT_AUTH_MODE + +
      +
      +
      +
      +
      +
      +

      The default auth mode used when creating UsergridClient instances.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static let DEFAULT_AUTH_MODE: UsergridAuthMode = .user
      + +
      +
      +
      +
      +
    • +
    +
    @@ -202,7 +267,7 @@

    Instance Properties

    Declaration

    Swift

    -
    public let config: UsergridClientConfig
    +
    public let config: UsergridClientConfig
    @@ -229,7 +294,7 @@

    Declaration

    Declaration

    Swift

    -
    public var appId : String { return config.appId }
    +
    public var appId : String
    @@ -256,7 +321,7 @@

    Declaration

    Declaration

    Swift

    -
    public var orgId : String { return config.orgId }
    +
    public var orgId : String
    @@ -283,7 +348,7 @@

    Declaration

    Declaration

    Swift

    -
    public var baseUrl : String { return config.baseUrl }
    +
    public var baseUrl : String
    @@ -303,14 +368,14 @@

    Declaration

    -

    The constructed URL string based on the UsergridClient’s baseUrl, orgId, and appId.

    +

    The constructed URL string based on the UsergridClient’s baseUrl, orgId, and appId.

    Declaration

    Swift

    -
    public var clientAppURL : String { return "\(baseUrl)/\(orgId)/\(appId)" }
    +
    public var clientAppURL : String
    @@ -364,7 +429,7 @@

    Declaration

    Declaration

    Swift

    -
    internal(set) public var currentUser: UsergridUser? = nil
    +
    internal(set) public var currentUser: UsergridUser? = nil
    @@ -391,7 +456,7 @@

    Declaration

    Declaration

    Swift

    -
    public var userAuth: UsergridUserAuth? { return currentUser?.auth }
    +
    public var userAuth: UsergridUserAuth?
    @@ -411,14 +476,14 @@

    Declaration

    -

    The application level UsergridAppAuth object. Can be set manually but must call authenticateApp to retrive token.

    +

    The application level UsergridAppAuth object. Can be set manually but must call authenticateApp to retrieve token.

    Declaration

    Swift

    -
    public var appAuth: UsergridAppAuth?
    +
    public var appAuth: UsergridAppAuth?
    @@ -445,7 +510,7 @@

    Declaration

    Declaration

    Swift

    -
    public var authMode: UsergridAuthMode
    +
    public var authMode: UsergridAuthMode
    @@ -476,7 +541,7 @@

    Initialization

    -

    Initializes instances of UsergridClient.

    +

    Initializes instances of UsergridClient.

    @@ -522,7 +587,7 @@

    Parameters

    Return Value

    -

    The new instance of UsergridClient.

    +

    The new instance of UsergridClient.

    @@ -541,7 +606,7 @@

    Return Value

    -

    Initializes instances of UsergridClient.

    +

    Initializes instances of UsergridClient.

    @@ -600,7 +665,7 @@

    Parameters

    Return Value

    -

    The new instance of UsergridClient.

    +

    The new instance of UsergridClient.

    @@ -619,14 +684,14 @@

    Return Value

    -

    Initializes instances of UsergridClient.

    +

    Initializes instances of UsergridClient.

    Declaration

    Swift

    -
    public init(configuration:UsergridClientConfig)
    +
    public init(configuration:UsergridClientConfig)
    @@ -652,7 +717,7 @@

    Parameters

    Return Value

    -

    The new instance of UsergridClient.

    +

    The new instance of UsergridClient.

    @@ -715,7 +780,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridClient object.

    +

    A decoded UsergridClient object.

    @@ -724,9 +789,9 @@

    Return Value

  • @@ -741,7 +806,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    public func encode(with aCoder: NSCoder)
    @@ -782,9 +847,9 @@

    Device Registration/Push Notifications

  • @@ -799,7 +864,7 @@

    Device Registration/Push Notifications

    Declaration

    Swift

    -
    public func applyPushToken(pushToken: NSData, notifierID: String, completion: UsergridResponseCompletion? = nil)
    +
    public func applyPushToken(_ pushToken: Data, notifierID: String, completion: UsergridResponseCompletion? = nil)
    @@ -855,9 +920,9 @@

    Parameters

  • @@ -872,7 +937,7 @@

    Parameters

    Declaration

    Swift

    -
    public func applyPushToken(device: UsergridDevice, pushToken: NSData, notifierID: String, completion: UsergridResponseCompletion? = nil)
    +
    public func applyPushToken(_ device: UsergridDevice, pushToken: Data, notifierID: String, completion: UsergridResponseCompletion? = nil)
    @@ -975,7 +1040,7 @@

    Authorization and User Management

    Declaration

    Swift

    -
    public func authForRequests() -> UsergridAuth?
    +
    public func authForRequests() -> UsergridAuth?
    @@ -1009,7 +1074,7 @@

    Return Value

    Declaration

    Swift

    -
    public func usingAuth(auth:UsergridAuth) -> Self
    +
    public func usingAuth(_ auth:UsergridAuth) -> Self
    @@ -1063,7 +1128,7 @@

    Return Value

    Declaration

    Swift

    -
    public func usingToken(token:String) -> Self
    +
    public func usingToken(_ token:String) -> Self
    @@ -1098,9 +1163,9 @@

    Return Value

  • @@ -1115,7 +1180,7 @@

    Return Value

    Declaration

    Swift

    -
    public func authenticateApp(completion: UsergridAppAuthCompletionBlock? = nil)
    +
    public func authenticateApp(_ completion: UsergridAppAuthCompletionBlock? = nil)
    @@ -1145,9 +1210,9 @@

    Parameters

  • @@ -1162,7 +1227,7 @@

    Parameters

    Declaration

    Swift

    -
    public func authenticateApp(appAuth: UsergridAppAuth, completion: UsergridAppAuthCompletionBlock? = nil)
    +
    public func authenticateApp(_ appAuth: UsergridAppAuth, completion: UsergridAppAuthCompletionBlock? = nil)
    @@ -1205,9 +1270,9 @@

    Parameters

  • @@ -1222,7 +1287,7 @@

    Parameters

    Declaration

    Swift

    -
    public func authenticateUser(userAuth: UsergridUserAuth, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func authenticateUser(_ userAuth: UsergridUserAuth, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1265,9 +1330,9 @@

    Parameters

  • @@ -1282,7 +1347,7 @@

    Parameters

    Declaration

    Swift

    -
    public func authenticateUser(userAuth: UsergridUserAuth, setAsCurrentUser: Bool, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func authenticateUser(_ userAuth: UsergridUserAuth, setAsCurrentUser: Bool, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1338,9 +1403,9 @@

    Parameters

  • @@ -1355,7 +1420,7 @@

    Parameters

    Declaration

    Swift

    -
    public func resetPassword(user: UsergridUser, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    +
    public func resetPassword(_ user: UsergridUser, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    @@ -1424,9 +1489,9 @@

    Parameters

  • @@ -1441,7 +1506,7 @@

    Parameters

    Declaration

    Swift

    -
    public func logoutCurrentUser(completion:UsergridResponseCompletion? = nil)
    +
    public func logoutCurrentUser(_ completion:UsergridResponseCompletion? = nil)
    @@ -1471,9 +1536,9 @@

    Parameters

  • @@ -1488,7 +1553,7 @@

    Parameters

    Declaration

    Swift

    -
    public func logoutUserAllTokens(uuidOrUsername:String, completion:UsergridResponseCompletion? = nil)
    +
    public func logoutUserAllTokens(_ uuidOrUsername:String, completion:UsergridResponseCompletion? = nil)
    @@ -1518,9 +1583,9 @@

    Parameters

  • @@ -1537,7 +1602,7 @@

    Parameters

    Declaration

    Swift

    -
    public func logoutUser(uuidOrUsername:String, token:String?, completion:UsergridResponseCompletion? = nil)
    +
    public func logoutUser(_ uuidOrUsername:String, token:String?, completion:UsergridResponseCompletion? = nil)
    @@ -1578,9 +1643,9 @@

    Generic Request Methods

  • @@ -1601,7 +1666,7 @@

    Generic Request Methods

    Declaration

    Swift

    -
    public func sendRequest(request:UsergridRequest, completion:UsergridResponseCompletion? = nil)
    +
    public func sendRequest(_ request:UsergridRequest, completion:UsergridResponseCompletion? = nil)
    @@ -1655,9 +1720,9 @@

    GET

  • @@ -1672,7 +1737,7 @@

    GET

    Declaration

    Swift

    -
    public func GET(type: String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    +
    public func GET(_ type: String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    @@ -1728,9 +1793,9 @@

    Parameters

  • @@ -1745,7 +1810,7 @@

    Parameters

    Declaration

    Swift

    -
    public func GET(type: String, completion: UsergridResponseCompletion? = nil)
    +
    public func GET(_ type: String, completion: UsergridResponseCompletion? = nil)
    @@ -1788,9 +1853,9 @@

    Parameters

  • @@ -1805,7 +1870,7 @@

    Parameters

    Declaration

    Swift

    -
    public func GET(query: UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    +
    public func GET(_ query: UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    @@ -1859,9 +1924,9 @@

    PUT

  • @@ -1876,7 +1941,7 @@

    PUT

    Declaration

    Swift

    -
    public func PUT(type: String, uuidOrName: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public func PUT(_ type: String, uuidOrName: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -1945,9 +2010,9 @@

    Parameters

  • @@ -1962,7 +2027,7 @@

    Parameters

    Declaration

    Swift

    -
    public func PUT(entity: UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func PUT(_ entity: UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2005,9 +2070,9 @@

    Parameters

  • @@ -2028,7 +2093,7 @@

    Parameters

    Declaration

    Swift

    -
    public func PUT(type: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public func PUT(_ type: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -2084,9 +2149,9 @@

    Parameters

  • @@ -2107,7 +2172,7 @@

    Parameters

    Declaration

    Swift

    -
    public func PUT(query: UsergridQuery, jsonBody:[String:AnyObject], queryCompletion: UsergridResponseCompletion? = nil)
    +
    public func PUT(_ query: UsergridQuery, jsonBody:[String:Any], queryCompletion: UsergridResponseCompletion? = nil)
    @@ -2174,9 +2239,9 @@

    POST

  • @@ -2193,7 +2258,7 @@

    POST

    Declaration

    Swift

    -
    public func POST(entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func POST(_ entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2236,9 +2301,9 @@

    Parameters

  • @@ -2259,7 +2324,7 @@

    Parameters

    Declaration

    Swift

    -
    public func POST(entities:[UsergridEntity], entitiesCompletion: UsergridResponseCompletion? = nil)
    +
    public func POST(_ entities:[UsergridEntity], entitiesCompletion: UsergridResponseCompletion? = nil)
    @@ -2302,9 +2367,9 @@

    Parameters

  • @@ -2319,7 +2384,7 @@

    Parameters

    Declaration

    Swift

    -
    public func POST(type: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public func POST(_ type: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -2375,9 +2440,9 @@

    Parameters

  • @@ -2392,7 +2457,7 @@

    Parameters

    Declaration

    Swift

    -
    public func POST(type: String, jsonBodies:[[String:AnyObject]], completion: UsergridResponseCompletion? = nil)
    +
    public func POST(_ type: String, jsonBodies:[[String:Any]], completion: UsergridResponseCompletion? = nil)
    @@ -2448,9 +2513,9 @@

    Parameters

  • @@ -2465,7 +2530,7 @@

    Parameters

    Declaration

    Swift

    -
    public func POST(type: String, name: String, jsonBody:[String:AnyObject], completion: UsergridResponseCompletion? = nil)
    +
    public func POST(_ type: String, name: String, jsonBody:[String:Any], completion: UsergridResponseCompletion? = nil)
    @@ -2545,9 +2610,9 @@

    DELETE

  • @@ -2568,7 +2633,7 @@

    DELETE

    Declaration

    Swift

    -
    public func DELETE(entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func DELETE(_ entity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2611,9 +2676,9 @@

    Parameters

  • @@ -2634,7 +2699,7 @@

    Parameters

    Declaration

    Swift

    -
    public func DELETE(query:UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    +
    public func DELETE(_ query:UsergridQuery, queryCompletion: UsergridResponseCompletion? = nil)
    @@ -2677,9 +2742,9 @@

    Parameters

  • @@ -2694,7 +2759,7 @@

    Parameters

    Declaration

    Swift

    -
    public func DELETE(type:String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    +
    public func DELETE(_ type:String, uuidOrName: String, completion: UsergridResponseCompletion? = nil)
    @@ -2761,9 +2826,9 @@

    Connection Management

  • @@ -2778,7 +2843,7 @@

    Connection Management

    Declaration

    Swift

    -
    public func connect(entity:UsergridEntity, relationship:String, to:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func connect(_ entity:UsergridEntity, relationship:String, to:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2847,9 +2912,9 @@

    Parameters

  • @@ -2864,7 +2929,7 @@

    Parameters

    Declaration

    Swift

    -
    public func connect(entityType:String, entityID:String, relationship:String, toType:String, toName: String, completion: UsergridResponseCompletion? = nil)
    +
    public func connect(_ entityType:String, entityID:String, relationship:String, toType:String, toName: String, completion: UsergridResponseCompletion? = nil)
    @@ -2959,9 +3024,9 @@

    Parameters

  • @@ -2976,7 +3041,7 @@

    Parameters

    Declaration

    Swift

    -
    public func connect(entityType:String, entityID:String, relationship:String, toType:String?, toID: String, completion: UsergridResponseCompletion? = nil)
    +
    public func connect(_ entityType:String, entityID:String, relationship:String, toType:String?, toID: String, completion: UsergridResponseCompletion? = nil)
    @@ -3071,9 +3136,9 @@

    Parameters

  • @@ -3088,7 +3153,7 @@

    Parameters

    Declaration

    Swift

    -
    public func disconnect(entity:UsergridEntity, relationship:String, from:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func disconnect(_ entity:UsergridEntity, relationship:String, from:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -3157,9 +3222,9 @@

    Parameters

  • @@ -3174,7 +3239,7 @@

    Parameters

    Declaration

    Swift

    -
    public func disconnect(entityType:String, entityID:String, relationship:String, fromType:String, fromName: String, completion: UsergridResponseCompletion? = nil)
    +
    public func disconnect(_ entityType:String, entityID:String, relationship:String, fromType:String, fromName: String, completion: UsergridResponseCompletion? = nil)
    @@ -3269,9 +3334,9 @@

    Parameters

  • @@ -3286,7 +3351,7 @@

    Parameters

    Declaration

    Swift

    -
    public func disconnect(entityType:String, entityID:String, relationship:String, fromType:String?, fromID: String, completion: UsergridResponseCompletion? = nil)
    +
    public func disconnect(_ entityType:String, entityID:String, relationship:String, fromType:String?, fromID: String, completion: UsergridResponseCompletion? = nil)
    @@ -3381,9 +3446,9 @@

    Parameters

  • @@ -3398,7 +3463,7 @@

    Parameters

    Declaration

    Swift

    -
    public func getConnections(direction:UsergridDirection, entity:UsergridEntity, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnections(_ direction:UsergridDirection, entity:UsergridEntity, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3467,9 +3532,9 @@

    Parameters

  • @@ -3484,7 +3549,7 @@

    Parameters

    Declaration

    Swift

    -
    public func getConnections(direction:UsergridDirection, type:String, uuidOrName:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnections(_ direction:UsergridDirection, type:String, uuidOrName:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3579,9 +3644,9 @@

    Parameters

  • @@ -3596,7 +3661,7 @@

    Parameters

    Declaration

    Swift

    -
    public func getConnections(direction:UsergridDirection, uuid:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnections(_ direction:UsergridDirection, uuid:String, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -3689,9 +3754,9 @@

    Asset Management

  • @@ -3706,7 +3771,7 @@

    Asset Management

    Declaration

    Swift

    -
    public func uploadAsset(entity:UsergridEntity, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    +
    public func uploadAsset(_ entity:UsergridEntity, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    @@ -3775,9 +3840,9 @@

    Parameters

  • @@ -3792,7 +3857,7 @@

    Parameters

    Declaration

    Swift

    -
    public func downloadAsset(entity:UsergridEntity, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    +
    public func downloadAsset(_ entity:UsergridEntity, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    @@ -3821,7 +3886,7 @@

    Parameters

    -

    The content type of the asset’s data.

    +

    The content type of the asset’s data.

    @@ -3863,8 +3928,8 @@

    Parameters

  • diff --git a/docs/Classes/UsergridClientConfig.html b/docs/Classes/UsergridClientConfig.html index b7abeab..5f3b3be 100644 --- a/docs/Classes/UsergridClientConfig.html +++ b/docs/Classes/UsergridClientConfig.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions @@ -258,7 +258,7 @@

    Declaration

    Declaration

    Swift

    -
    public var baseUrl: String = UsergridClient.DEFAULT_BASE_URL
    +
    public var baseUrl: String = UsergridClient.DEFAULT_BASE_URL
    @@ -285,7 +285,7 @@

    Declaration

    Declaration

    Swift

    -
    public var authMode: UsergridAuthMode = .User
    +
    public var authMode: UsergridAuthMode = UsergridClient.DEFAULT_AUTH_MODE
    @@ -341,7 +341,7 @@

    Declaration

    Declaration

    Swift

    -
    public var appAuth: UsergridAppAuth?
    +
    public var appAuth: UsergridAppAuth?
    @@ -372,7 +372,7 @@

    Initialization

    -

    Designated initializer for UsergridClientConfig objects.

    +

    Designated initializer for UsergridClientConfig objects.

    @@ -418,7 +418,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridClientConfig.

    +

    A new instance of UsergridClientConfig.

    @@ -437,7 +437,7 @@

    Return Value

    -

    Convenience initializer for UsergridClientConfig.

    +

    Convenience initializer for UsergridClientConfig.

    @@ -496,7 +496,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridClientConfig.

    +

    A new instance of UsergridClientConfig.

    @@ -515,14 +515,14 @@

    Return Value

    -

    Convenience initializer for UsergridClientConfig.

    +

    Convenience initializer for UsergridClientConfig.

    Declaration

    Swift

    -
    public convenience init(orgId: String, appId: String, baseUrl:String, authMode:UsergridAuthMode, persistCurrentUserInKeychain: Bool = true, appAuth:UsergridAppAuth? = nil)
    +
    public convenience init(orgId: String, appId: String, baseUrl:String, authMode:UsergridAuthMode, persistCurrentUserInKeychain: Bool = true, appAuth:UsergridAppAuth? = nil)
    @@ -613,7 +613,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridClientConfig.

    +

    A new instance of UsergridClientConfig.

    @@ -676,7 +676,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridClientConfig object.

    @@ -685,9 +685,9 @@

    Return Value

  • @@ -702,7 +702,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    public func encode(with aCoder: NSCoder)
    @@ -734,8 +734,8 @@

    Parameters

    diff --git a/docs/Classes/UsergridDevice.html b/docs/Classes/UsergridDevice.html index 9cda8aa..0a26b76 100644 --- a/docs/Classes/UsergridDevice.html +++ b/docs/Classes/UsergridDevice.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -165,7 +165,7 @@

    UsergridDevice

    -
    public class UsergridDevice : UsergridEntity
    +
    public class UsergridDevice : UsergridEntity
    @@ -180,9 +180,9 @@

    UsergridDevice

  • @@ -190,7 +190,7 @@

    UsergridDevice

    -

    Subscript for the UsergridDevice class. Note that all of the UsergridDeviceProperties are immutable.

    +

    Subscript for the UsergridDevice class. Note that all of the UsergridDeviceProperties are immutable.

    Warning

    @@ -198,17 +198,16 @@

    UsergridDevice

    -

  • Example usage: - -let uuid = usergridDevice["uuid"] -

  • +

  • Example usage:

    +
    let uuid = usergridDevice[uuid]
    +
  • Declaration

    Swift

    -
    override public subscript(propertyName: String) -> AnyObject?
    +
    override public subscript(propertyName: String) -> Any?
    @@ -239,14 +238,14 @@

    Instance Properties

    -

    Property helper method for the UsergridDevice objects device model.

    +

    Property helper method for the UsergridDevice objects device model.

    Declaration

    Swift

    -
    public var model: String { return super[UsergridDeviceProperties.Model.stringValue] as! String }
    +
    public var model: String
    @@ -266,14 +265,14 @@

    Declaration

    -

    Property helper method for the UsergridDevice objects device platform.

    +

    Property helper method for the UsergridDevice objects device platform.

    Declaration

    Swift

    -
    public var platform: String { return super[UsergridDeviceProperties.Platform.stringValue] as! String }
    +
    public var platform: String
    @@ -293,14 +292,14 @@

    Declaration

    -

    Property helper method for the UsergridDevice objects device operating system version.

    +

    Property helper method for the UsergridDevice objects device operating system version.

    Declaration

    Swift

    -
    public var osVersion: String { return super[UsergridDeviceProperties.OSVersion.stringValue] as! String }
    +
    public var osVersion: String
    @@ -320,7 +319,7 @@

    Declaration

    -

    The shared instance of UsergridDevice.

    +

    The shared instance of UsergridDevice.

    @@ -358,9 +357,9 @@

    Initialization

    -

    Designated Initializer for UsergridDevice objects

    +

    Designated Initializer for UsergridDevice objects

    -

    Most likely you will never need to create seperate instances of UsergridDevice. Use of UsergridDevice.sharedInstance is recommended.

    +

    Most likely you will never need to create seperate instances of UsergridDevice. Use of UsergridDevice.sharedInstance is recommended.

    @@ -373,7 +372,7 @@

    Declaration

    Return Value

    -

    A new instance of UsergridDevice.

    +

    A new instance of UsergridDevice.

    @@ -382,9 +381,9 @@

    Return Value

  • @@ -399,7 +398,7 @@

    Return Value

    Declaration

    Swift

    -
    required public init(type:String, name:String? = nil, propertyDict:[String:AnyObject]? = nil)
    +
    required public init(type:String, name:String? = nil, propertyDict:[String:Any]? = nil)
    @@ -451,7 +450,7 @@

    Parameters

  • Return Value

    -

    A new UsergridDevice object.

    +

    A new UsergridDevice object.

    @@ -514,7 +513,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridDevice object.

    @@ -523,9 +522,9 @@

    Return Value

  • @@ -540,7 +539,7 @@

    Return Value

    Declaration

    Swift

    -
    public override func encodeWithCoder(aCoder: NSCoder)
    +
    public override func encode(with aCoder: NSCoder)
    @@ -570,9 +569,9 @@

    Parameters

  • - + - save(_:) + save(_:)
    @@ -580,7 +579,7 @@

    Parameters

    -

    Performs a PUT (or POST if no UUID is found) on the UsergridDevice using the shared instance of UsergridClient.

    +

    Performs a PUT (or POST if no UUID is found) on the UsergridDevice using the shared instance of UsergridClient.

    If this device is equal to UsergridDevice.sharedDevice it will also update the shared device on the keychain.

    @@ -589,7 +588,7 @@

    Parameters

    Declaration

    Swift

    -
    public override func save(completion: UsergridResponseCompletion? = nil)
    +
    public override func save(_ completion: UsergridResponseCompletion? = nil)
    @@ -619,9 +618,9 @@

    Parameters

  • @@ -629,7 +628,7 @@

    Parameters

    -

    Performs a PUT (or POST if no UUID is found) on the UsergridDevice.

    +

    Performs a PUT (or POST if no UUID is found) on the UsergridDevice.

    If this device is equal to UsergridDevice.sharedDevice it will also update the shared device on the keychain.

    @@ -638,7 +637,7 @@

    Parameters

    Declaration

    Swift

    -
    public override func save(client: UsergridClient, completion: UsergridResponseCompletion? = nil)
    +
    public override func save(_ client: UsergridClient, completion: UsergridResponseCompletion? = nil)
    @@ -719,9 +718,9 @@

    Class Helper Methods

  • @@ -729,14 +728,14 @@

    Class Helper Methods

    -

    Creates a property dictionary that contains the common properties for UsergridDevice objects.

    +

    Creates a property dictionary that contains the common properties for UsergridDevice objects.

    Declaration

    Swift

    -
    public static func commonDevicePropertyDict() -> [String:AnyObject]
    +
    public static func commonDevicePropertyDict() -> [String:Any]
    @@ -753,8 +752,8 @@

    Return Value

  • diff --git a/docs/Classes/UsergridEntity.html b/docs/Classes/UsergridEntity.html index 280138b..b4dd2e4 100644 --- a/docs/Classes/UsergridEntity.html +++ b/docs/Classes/UsergridEntity.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -165,7 +165,7 @@

    UsergridEntity

    -
    public class UsergridEntity: NSObject, NSCoding
    +
    open class UsergridEntity: NSObject, NSCoding
    @@ -180,9 +180,9 @@

    UsergridEntity

  • @@ -190,14 +190,13 @@

    UsergridEntity

    -

    Subscript for the UsergridEntity class.

    +

    Subscript for the UsergridEntity class.

      -
    • Example usage: - -let propertyValue = usergridEntity["propertyName"] -usergridEntity["propertyName"] = propertyValue -
    • +
    • Example usage:

      +
      let propertyValue = usergridEntity["propertyName"]
      +usergridEntity["propertyName"] = propertyValue
      +
    @@ -205,7 +204,7 @@

    UsergridEntity

    Declaration

    Swift

    -
    public subscript(propertyName: String) -> AnyObject?
    +
    public subscript(propertyName: String) -> Any?
    @@ -243,7 +242,7 @@

    Instance Properties

    Declaration

    Swift

    -
    internal(set) public var asset: UsergridAsset?
    +
    internal(set) public var asset: UsergridAsset?
  • @@ -263,14 +262,14 @@

    Declaration

    -

    The UsergridFileMetaData of this UsergridEntity.

    +

    The UsergridFileMetaData of this UsergridEntity.

    Declaration

    Swift

    -
    internal(set) public var fileMetaData : UsergridFileMetaData?
    +
    internal(set) public var fileMetaData : UsergridFileMetaData?
    @@ -290,14 +289,14 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.EntityType.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.type.

    Declaration

    Swift

    -
    public var type: String { return self.getEntitySpecificProperty(.EntityType) as! String }
    +
    public var type: String
    @@ -317,14 +316,14 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.UUID.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.uuid.

    Declaration

    Swift

    -
    public var uuid: String? { return self.getEntitySpecificProperty(.UUID) as? String }
    +
    public var uuid: String?
    @@ -344,14 +343,14 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.Name.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.name.

    Declaration

    Swift

    -
    public var name: String? { return self.getEntitySpecificProperty(.Name) as? String }
    +
    public var name: String?
    @@ -361,9 +360,9 @@

    Declaration

  • - + - created + created
    @@ -371,14 +370,14 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.Created.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.created.

    Declaration

    Swift

    -
    public var created: NSDate? { return self.getEntitySpecificProperty(.Created) as? NSDate }
    +
    public var created: Date?
    @@ -388,9 +387,9 @@

    Declaration

  • - + - modified + modified
    @@ -398,14 +397,14 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.Modified.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.modified.

    Declaration

    Swift

    -
    public var modified: NSDate? { return self.getEntitySpecificProperty(.Modified) as? NSDate }
    +
    public var modified: Date?
    @@ -425,7 +424,7 @@

    Declaration

    -

    Property helper method for the UsergridEntity objects UsergridEntityProperties.Location.

    +

    Property helper method for the UsergridEntity objects UsergridEntityProperties.location.

    @@ -452,14 +451,14 @@

    Declaration

    -

    Property helper method to get the UUID or name of the UsergridEntity.

    +

    Property helper method to get the UUID or name of the UsergridEntity.

    Declaration

    Swift

    -
    public var uuidOrName: String? { return self.uuid ?? self.name }
    +
    public var uuidOrName: String?
    @@ -479,14 +478,14 @@

    Declaration

    -

    Tells you if this UsergridEntity has a type of user.

    +

    Tells you if this UsergridEntity has a type of user.

    Declaration

    Swift

    -
    public var isUser: Bool { return self is UsergridUser || self.type == UsergridUser.USER_ENTITY_TYPE }
    +
    public var isUser: Bool
    @@ -513,7 +512,7 @@

    Declaration

    Declaration

    Swift

    -
    public var hasAsset: Bool { return self.asset != nil || self.fileMetaData?.contentLength > 0 }
    +
    public var hasAsset: Bool
    @@ -523,9 +522,9 @@

    Declaration

  • @@ -540,7 +539,7 @@

    Declaration

    Declaration

    Swift

    -
    public var jsonObjectValue : [String:AnyObject] { return self.properties }
    +
    public var jsonObjectValue : [String:Any]
    @@ -567,7 +566,7 @@

    Declaration

    Declaration

    Swift

    -
    public var stringValue : String { return NSString(data: try! NSJSONSerialization.dataWithJSONObject(self.jsonObjectValue, options: .PrettyPrinted), encoding: NSUTF8StringEncoding) as! String }
    +
    public var stringValue : String
  • @@ -594,7 +593,7 @@

    Declaration

    Declaration

    Swift

    -
    public override var description : String
    +
    open override var description : String
  • @@ -621,7 +620,7 @@

    Declaration

    Declaration

    Swift

    -
    public override var debugDescription : String
    +
    open override var debugDescription : String
    @@ -642,9 +641,9 @@

    Initialization

  • @@ -652,14 +651,14 @@

    Initialization

    -

    Designated initializer for UsergridEntity objects

    +

    Designated initializer for UsergridEntity objects

    Declaration

    Swift

    -
    required public init(type:String, name:String? = nil, propertyDict:[String:AnyObject]? = nil)
    +
    required public init(type:String, name:String? = nil, propertyDict:[String:Any]? = nil)
    @@ -711,7 +710,7 @@

    Parameters

    Return Value

    -

    A new UsergridEntity object.

    +

    A new UsergridEntity object.

  • @@ -737,7 +736,7 @@

    Return Value

    Declaration

    Swift

    -
    public static func mapCustomType(type:String,toSubclass:UsergridEntity.Type)
    +
    public static func mapCustomType(_ type:String,toSubclass:UsergridEntity.Type)
    @@ -780,9 +779,9 @@

    Parameters

  • @@ -790,14 +789,14 @@

    Parameters

    -

    Class convenience constructor for creating UsergridEntity objects dynamically.

    +

    Class convenience constructor for creating UsergridEntity objects dynamically.

    Declaration

    Swift

    -
    public class func entity(jsonDict jsonDict: [String:AnyObject]) -> UsergridEntity?
    +
    public class func entity(jsonDict: [String:Any]) -> UsergridEntity?
    @@ -823,7 +822,7 @@

    Parameters

    Return Value

    -

    A UsergridEntity object provided that the type key within the dictionay exists. Otherwise nil.

    +

    A UsergridEntity object provided that the type key within the dictionay exists. Otherwise nil.

  • @@ -832,9 +831,9 @@

    Return Value

  • @@ -842,14 +841,14 @@

    Return Value

    -

    Class convenience constructor for creating multiple UsergridEntity objects dynamically.

    +

    Class convenience constructor for creating multiple UsergridEntity objects dynamically.

    Declaration

    Swift

    -
    public class func entities(jsonArray entitiesJSONArray: [[String:AnyObject]]) -> [UsergridEntity]
    +
    public class func entities(jsonArray entitiesJSONArray: [[String:Any]]) -> [UsergridEntity]
    @@ -875,7 +874,7 @@

    Parameters

    Return Value

    -

    An array of UsergridEntity.

    +

    An array of UsergridEntity.

  • @@ -938,7 +937,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridEntity object.

    @@ -947,9 +946,9 @@

    Return Value

  • @@ -964,7 +963,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    open func encode(with aCoder: NSCoder)
    @@ -1005,9 +1004,9 @@

    Property Manipulation

  • @@ -1022,7 +1021,7 @@

    Property Manipulation

    Declaration

    Swift

    -
    public func putProperty(name:String,value:AnyObject?)
    +
    public func putProperty(_ name:String,value:Any?)
    @@ -1065,9 +1064,9 @@

    Parameters

  • @@ -1082,7 +1081,7 @@

    Parameters

    Declaration

    Swift

    -
    public func putProperties(properties:[String:AnyObject])
    +
    public func putProperties(_ properties:[String:Any])
    @@ -1129,7 +1128,7 @@

    Parameters

    Declaration

    Swift

    -
    public func removeProperty(name:String)
    +
    public func removeProperty(_ name:String)
    @@ -1176,7 +1175,7 @@

    Parameters

    Declaration

    Swift

    -
    public func removeProperties(propertyNames:[String])
    +
    public func removeProperties(_ propertyNames:[String])
    @@ -1206,9 +1205,9 @@

    Parameters

  • @@ -1223,7 +1222,7 @@

    Parameters

    Declaration

    Swift

    -
    public func append(name:String, value:AnyObject)
    +
    public func append(_ name:String, value:Any)
    @@ -1266,9 +1265,9 @@

    Parameters

  • @@ -1283,7 +1282,7 @@

    Parameters

    Declaration

    Swift

    -
    public func insert(name:String, value:AnyObject, index:Int = 0)
    +
    public func insert(_ name:String, value:Any, index:Int = 0)
    @@ -1356,7 +1355,7 @@

    Parameters

    Declaration

    Swift

    -
    public func pop(name:String)
    +
    public func pop(_ name:String)
    @@ -1403,7 +1402,7 @@

    Parameters

    Declaration

    Swift

    -
    public func shift(name:String)
    +
    public func shift(_ name:String)
    @@ -1444,9 +1443,9 @@

    CRUD Convenience Methods

  • @@ -1454,14 +1453,14 @@

    CRUD Convenience Methods

    -

    Performs a GET on the UsergridEntity using the shared instance of UsergridClient.

    +

    Performs a GET on the UsergridEntity using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func reload(completion: UsergridResponseCompletion? = nil)
    +
    public func reload(_ completion: UsergridResponseCompletion? = nil)
    @@ -1491,9 +1490,9 @@

    Parameters

  • @@ -1501,14 +1500,14 @@

    Parameters

    -

    Performs a GET on the UsergridEntity.

    +

    Performs a GET on the UsergridEntity.

    Declaration

    Swift

    -
    public func reload(client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    +
    public func reload(_ client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    @@ -1551,9 +1550,9 @@

    Parameters

  • - + - save(_:) + save(_:)
    @@ -1561,14 +1560,14 @@

    Parameters

    -

    Performs a PUT (or POST if no UUID is found) on the UsergridEntity using the shared instance of UsergridClient.

    +

    Performs a PUT (or POST if no UUID is found) on the UsergridEntity using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func save(completion: UsergridResponseCompletion? = nil)
    +
    public func save(_ completion: UsergridResponseCompletion? = nil)
    @@ -1598,9 +1597,9 @@

    Parameters

  • @@ -1608,14 +1607,14 @@

    Parameters

    -

    Performs a PUT (or POST if no UUID is found) on the UsergridEntity.

    +

    Performs a PUT (or POST if no UUID is found) on the UsergridEntity.

    Declaration

    Swift

    -
    public func save(client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    +
    public func save(_ client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    @@ -1658,9 +1657,9 @@

    Parameters

  • @@ -1668,14 +1667,14 @@

    Parameters

    -

    Performs a DELETE on the UsergridEntity using the shared instance of the UsergridClient.

    +

    Performs a DELETE on the UsergridEntity using the shared instance of the UsergridClient.

    Declaration

    Swift

    -
    public func remove(completion: UsergridResponseCompletion? = nil)
    +
    public func remove(_ completion: UsergridResponseCompletion? = nil)
    @@ -1705,9 +1704,9 @@

    Parameters

  • @@ -1715,14 +1714,14 @@

    Parameters

    -

    Performs a DELETE on the UsergridEntity.

    +

    Performs a DELETE on the UsergridEntity.

    Declaration

    Swift

    -
    public func remove(client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    +
    public func remove(_ client:UsergridClient, completion: UsergridResponseCompletion? = nil)
    @@ -1776,9 +1775,9 @@

    Asset Management

  • @@ -1786,14 +1785,14 @@

    Asset Management

    -

    Uploads the given UsergridAsset and the data within it and creates an association between this UsergridEntity with the given UsergridAsset using the shared instance of UsergridClient.

    +

    Uploads the given UsergridAsset and the data within it and creates an association between this UsergridEntity with the given UsergridAsset using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func uploadAsset(asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    +
    public func uploadAsset(_ asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    @@ -1849,9 +1848,9 @@

    Parameters

  • @@ -1859,14 +1858,14 @@

    Parameters

    -

    Uploads the given UsergridAsset and the data within it and creates an association between this UsergridEntity with the given UsergridAsset.

    +

    Uploads the given UsergridAsset and the data within it and creates an association between this UsergridEntity with the given UsergridAsset.

    Declaration

    Swift

    -
    public func uploadAsset(client:UsergridClient, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    +
    public func uploadAsset(_ client:UsergridClient, asset:UsergridAsset, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetUploadCompletion? = nil)
    @@ -1935,9 +1934,9 @@

    Parameters

  • @@ -1945,14 +1944,14 @@

    Parameters

    -

    Downloads the UsergridAsset that is associated with this UsergridEntity using the shared instance of UsergridClient.

    +

    Downloads the UsergridAsset that is associated with this UsergridEntity using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func downloadAsset(contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    +
    public func downloadAsset(_ contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    @@ -2008,9 +2007,9 @@

    Parameters

  • @@ -2018,14 +2017,14 @@

    Parameters

    -

    Downloads the UsergridAsset that is associated with this UsergridEntity.

    +

    Downloads the UsergridAsset that is associated with this UsergridEntity.

    Declaration

    Swift

    -
    public func downloadAsset(client:UsergridClient, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    +
    public func downloadAsset(_ client:UsergridClient, contentType:String, progress:UsergridAssetRequestProgress? = nil, completion:UsergridAssetDownloadCompletion? = nil)
    @@ -2105,9 +2104,9 @@

    Connection Management

  • @@ -2115,14 +2114,14 @@

    Connection Management

    -

    Creates a relationship between this UsergridEntity and the given entity using the shared instance of UsergridClient.

    +

    Creates a relationship between this UsergridEntity and the given entity using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func connect(relationship:String, toEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func connect(_ relationship:String, toEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2178,9 +2177,9 @@

    Parameters

  • @@ -2188,14 +2187,14 @@

    Parameters

    -

    Creates a relationship between this UsergridEntity and the given entity.

    +

    Creates a relationship between this UsergridEntity and the given entity.

    Declaration

    Swift

    -
    public func connect(client:UsergridClient, relationship:String, toEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func connect(_ client:UsergridClient, relationship:String, toEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2264,9 +2263,9 @@

    Parameters

  • @@ -2274,14 +2273,14 @@

    Parameters

    -

    Removes a relationship between this UsergridEntity and the given entity using the shared instance of UsergridClient.

    +

    Removes a relationship between this UsergridEntity and the given entity using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func disconnect(relationship:String, fromEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func disconnect(_ relationship:String, fromEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2337,9 +2336,9 @@

    Parameters

  • @@ -2347,14 +2346,14 @@

    Parameters

    -

    Removes a relationship between this UsergridEntity and the given entity.

    +

    Removes a relationship between this UsergridEntity and the given entity.

    Declaration

    Swift

    -
    public func disconnect(client:UsergridClient, relationship:String, fromEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    +
    public func disconnect(_ client:UsergridClient, relationship:String, fromEntity:UsergridEntity, completion: UsergridResponseCompletion? = nil)
    @@ -2423,9 +2422,9 @@

    Parameters

  • @@ -2433,14 +2432,14 @@

    Parameters

    -

    Gets the UsergridEntity objects, if any, which are connected via the relationship using the shared instance of UsergridClient.

    +

    Gets the UsergridEntity objects, if any, which are connected via the relationship using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func getConnections(direction:UsergridDirection, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnections(_ direction:UsergridDirection, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2509,9 +2508,9 @@

    Parameters

  • @@ -2519,14 +2518,14 @@

    Parameters

    -

    Gets the UsergridEntity objects, if any, which are connected via the relationship.

    +

    Gets the UsergridEntity objects, if any, which are connected via the relationship.

    Declaration

    Swift

    -
    public func getConnections(client:UsergridClient, direction:UsergridDirection, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnections(_ client:UsergridClient, direction:UsergridDirection, relationship:String, query:UsergridQuery? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2629,14 +2628,14 @@

    Helper methods

    -

    Determines if the two UsergridEntity objects are equal. i.e. they have the same non nil uuidOrName.

    +

    Determines if the two UsergridEntity objects are equal. i.e. they have the same non nil uuidOrName.

    Declaration

    Swift

    -
    public func isEqualToEntity(entity: UsergridEntity?) -> Bool
    +
    public func isEqualToEntity(_ entity: UsergridEntity?) -> Bool
    @@ -2662,7 +2661,7 @@

    Parameters

    Return Value

    -

    If the two UsergridEntity objects are equal. i.e. they have the same non nil uuidOrName.

    +

    If the two UsergridEntity objects are equal. i.e. they have the same non nil uuidOrName.

  • @@ -2673,8 +2672,8 @@

    Return Value

  • diff --git a/docs/Classes/UsergridFileMetaData.html b/docs/Classes/UsergridFileMetaData.html index 1cc8ccf..f7b425c 100644 --- a/docs/Classes/UsergridFileMetaData.html +++ b/docs/Classes/UsergridFileMetaData.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -320,9 +320,9 @@

    Declaration

  • @@ -330,14 +330,14 @@

    Declaration

    -

    The NSDate object corresponding to the last modified time stamp.

    +

    The NSDate object corresponding to the last modified time stamp.

    Declaration

    Swift

    -
    public let lastModifiedDate: NSDate?
    +
    public let lastModifiedDate: Date?
    @@ -358,9 +358,9 @@

    Initialization

  • @@ -368,14 +368,14 @@

    Initialization

    -

    Designated initializer for UsergridFileMetaData objects.

    +

    Designated initializer for UsergridFileMetaData objects.

    Declaration

    Swift

    -
    public init(fileMetaDataJSON:[String:AnyObject])
    +
    public init(fileMetaDataJSON:[String:Any])
    @@ -401,7 +401,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridFileMetaData.

    +

    A new instance of UsergridFileMetaData.

  • @@ -464,7 +464,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridFileMetaData object.

  • @@ -473,9 +473,9 @@

    Return Value

  • @@ -490,7 +490,7 @@

    Return Value

    Declaration

    Swift

    -
    public func encodeWithCoder(aCoder: NSCoder)
    +
    public func encode(with aCoder: NSCoder)
    @@ -522,8 +522,8 @@

    Parameters

  • diff --git a/docs/Classes/UsergridQuery.html b/docs/Classes/UsergridQuery.html index 5b8d3e5..d52aa09 100644 --- a/docs/Classes/UsergridQuery.html +++ b/docs/Classes/UsergridQuery.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -187,9 +187,9 @@

    Initialization

  • - + - init(_:) + init(_:)
    @@ -197,7 +197,7 @@

    Initialization

    -

    Desingated initializer for UsergridQuery objects.

    +

    Desingated initializer for UsergridQuery objects.

    @@ -230,7 +230,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridQuery.

    +

    A new instance of UsergridQuery.

    @@ -250,9 +250,9 @@

    NSCopying

  • @@ -267,7 +267,7 @@

    NSCopying

    Declaration

    Swift

    -
    public func copyWithZone(zone: NSZone) -> AnyObject
    +
    public func copy(with zone: NSZone?) -> Any
    @@ -313,9 +313,9 @@

    Building

  • @@ -330,7 +330,7 @@

    Building

    Declaration

    Swift

    -
    public func build(autoURLEncode: Bool = true) -> String
    +
    public func build(_ autoURLEncode: Bool = true) -> String
    @@ -393,7 +393,7 @@

    Builder Methods

    Declaration

    Swift

    -
    public func contains(term: String, value: String) -> Self { return self.containsWord(term, value: value) }
    +
    public func contains(_ term: String, value: String) -> Self
  • @@ -458,7 +458,7 @@

    Return Value

    Declaration

    Swift

    -
    public func containsString(term: String, value: String) -> Self { return self.containsWord(term, value: value) }
    +
    public func containsString(_ term: String, value: String) -> Self
  • @@ -523,7 +523,7 @@

    Return Value

    Declaration

    Swift

    -
    public func containsWord(term: String, value: String) -> Self { return self.addRequirement(term + UsergridQuery.SPACE + UsergridQuery.CONTAINS + UsergridQuery.SPACE + ((value.isUuid()) ? UsergridQuery.EMPTY_STRING : UsergridQuery.APOSTROPHE) + value + ((value.isUuid()) ? UsergridQuery.EMPTY_STRING : UsergridQuery.APOSTROPHE)) }
    +
    public func containsWord(_ term: String, value: String) -> Self
  • @@ -588,7 +588,7 @@

    Return Value

    Declaration

    Swift

    -
    public func ascending(term: String) -> Self { return self.asc(term) }
    +
    public func ascending(_ term: String) -> Self
  • @@ -640,7 +640,7 @@

    Return Value

    Declaration

    Swift

    -
    public func asc(term: String) -> Self { return self.sort(term, sortOrder: .Asc) }
    +
    public func asc(_ term: String) -> Self
  • @@ -692,7 +692,7 @@

    Return Value

    Declaration

    Swift

    -
    public func descending(term: String) -> Self { return self.desc(term) }
    +
    public func descending(_ term: String) -> Self
  • @@ -744,7 +744,7 @@

    Return Value

    Declaration

    Swift

    -
    public func desc(term: String) -> Self { return self.sort(term, sortOrder: .Desc) }
    +
    public func desc(_ term: String) -> Self
  • @@ -779,9 +779,9 @@

    Return Value

  • @@ -796,7 +796,7 @@

    Return Value

    Declaration

    Swift

    -
    public func filter(term: String, value: AnyObject) -> Self { return self.eq(term, value: value) }
    +
    public func filter(_ term: String, value: Any) -> Self
    @@ -844,9 +844,9 @@

    Return Value

  • @@ -861,7 +861,7 @@

    Return Value

    Declaration

    Swift

    -
    public func equals(term: String, value: AnyObject) -> Self { return self.eq(term, value: value) }
    +
    public func equals(_ term: String, value: Any) -> Self
    @@ -909,9 +909,9 @@

    Return Value

  • @@ -926,7 +926,7 @@

    Return Value

    Declaration

    Swift

    -
    public func eq(term: String, value: AnyObject) -> Self { return self.addOperationRequirement(term, operation:.Equal, value: value) }
    +
    public func eq(_ term: String, value: Any) -> Self
    @@ -974,9 +974,9 @@

    Return Value

  • @@ -991,7 +991,7 @@

    Return Value

    Declaration

    Swift

    -
    public func greaterThan(term: String, value: AnyObject) -> Self { return self.gt(term, value: value) }
    +
    public func greaterThan(_ term: String, value: Any) -> Self
    @@ -1039,9 +1039,9 @@

    Return Value

  • @@ -1056,7 +1056,7 @@

    Return Value

    Declaration

    Swift

    -
    public func gt(term: String, value: AnyObject) -> Self { return self.addOperationRequirement(term, operation:.GreaterThan, value: value) }
    +
    public func gt(_ term: String, value: Any) -> Self
    @@ -1104,9 +1104,9 @@

    Return Value

  • @@ -1121,7 +1121,7 @@

    Return Value

    Declaration

    Swift

    -
    public func greaterThanOrEqual(term: String, value: AnyObject) -> Self { return self.gte(term, value: value) }
    +
    public func greaterThanOrEqual(_ term: String, value: Any) -> Self
    @@ -1169,9 +1169,9 @@

    Return Value

  • @@ -1186,7 +1186,7 @@

    Return Value

    Declaration

    Swift

    -
    public func gte(term: String, value: AnyObject) -> Self { return self.addOperationRequirement(term, operation:.GreaterThanEqualTo, value: value) }
    +
    public func gte(_ term: String, value: Any) -> Self
    @@ -1234,9 +1234,9 @@

    Return Value

  • @@ -1251,7 +1251,7 @@

    Return Value

    Declaration

    Swift

    -
    public func lessThan(term: String, value: AnyObject) -> Self { return self.lt(term, value: value) }
    +
    public func lessThan(_ term: String, value: Any) -> Self
    @@ -1299,9 +1299,9 @@

    Return Value

  • @@ -1316,7 +1316,7 @@

    Return Value

    Declaration

    Swift

    -
    public func lt(term: String, value: AnyObject) -> Self { return self.addOperationRequirement(term, operation:.LessThan, value: value) }
    +
    public func lt(_ term: String, value: Any) -> Self
    @@ -1364,9 +1364,9 @@

    Return Value

  • @@ -1381,7 +1381,7 @@

    Return Value

    Declaration

    Swift

    -
    public func lessThanOrEqual(term: String, value: AnyObject) -> Self { return self.lte(term, value: value) }
    +
    public func lessThanOrEqual(_ term: String, value: Any) -> Self
    @@ -1429,9 +1429,9 @@

    Return Value

  • @@ -1446,7 +1446,7 @@

    Return Value

    Declaration

    Swift

    -
    public func lte(term: String, value: AnyObject) -> Self { return self.addOperationRequirement(term, operation:.LessThanEqualTo, value: value) }
    +
    public func lte(_ term: String, value: Any) -> Self
    @@ -1511,7 +1511,7 @@

    Return Value

    Declaration

    Swift

    -
    public func locationWithin(distance: Float, latitude: Float, longitude: Float) -> Self
    +
    public func locationWithin(_ distance: Float, latitude: Float, longitude: Float) -> Self
  • @@ -1685,7 +1685,7 @@

    Return Value

    Declaration

    Swift

    -
    public func sort(term: String, sortOrder: UsergridQuerySortOrder) -> Self
    +
    public func sort(_ term: String, sortOrder: UsergridQuerySortOrder) -> Self
  • @@ -1750,7 +1750,7 @@

    Return Value

    Declaration

    Swift

    -
    public func collection(collectionName: String) -> Self
    +
    public func collection(_ collectionName: String) -> Self
    @@ -1802,7 +1802,7 @@

    Return Value

    Declaration

    Swift

    -
    public func type(type: String) -> Self
    +
    public func type(_ type: String) -> Self
    @@ -1854,7 +1854,7 @@

    Return Value

    Declaration

    Swift

    -
    public func limit(limit: Int) -> Self
    +
    public func limit(_ limit: Int) -> Self
    @@ -1906,7 +1906,7 @@

    Return Value

    Declaration

    Swift

    -
    public func ql(value: String) -> Self
    +
    public func ql(_ value: String) -> Self
    @@ -1958,7 +1958,7 @@

    Return Value

    Declaration

    Swift

    -
    public func cursor(value: String?) -> Self
    +
    public func cursor(_ value: String?) -> Self
    @@ -2010,7 +2010,7 @@

    Return Value

    Declaration

    Swift

    -
    public func fromString(value: String?) -> Self
    +
    public func fromString(_ value: String?) -> Self
    @@ -2062,7 +2062,7 @@

    Return Value

    Declaration

    Swift

    -
    public func urlTerm(term: String, equalsValue: String) -> Self
    +
    public func urlTerm(_ term: String, equalsValue: String) -> Self
    @@ -2127,7 +2127,7 @@

    Return Value

    Declaration

    Swift

    -
    public func addOperationRequirement(term: String, operation: UsergridQueryOperator, stringValue: String) -> Self
    +
    public func addOperationRequirement(_ term: String, operation: UsergridQueryOperator, stringValue: String) -> Self
    @@ -2205,7 +2205,7 @@

    Return Value

    Declaration

    Swift

    -
    public func addOperationRequirement(term: String, operation: UsergridQueryOperator, intValue: Int) -> Self
    +
    public func addOperationRequirement(_ term: String, operation: UsergridQueryOperator, intValue: Int) -> Self
    @@ -2268,8 +2268,8 @@

    Return Value

    diff --git a/docs/Classes/UsergridRequest.html b/docs/Classes/UsergridRequest.html index 0405ff5..8a730f7 100644 --- a/docs/Classes/UsergridRequest.html +++ b/docs/Classes/UsergridRequest.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -204,7 +204,7 @@

    Instance Properties

    Declaration

    Swift

    -
    public let method: UsergridHttpMethod
    +
    public let method: UsergridHttpMethod
    @@ -285,7 +285,7 @@

    Declaration

    Declaration

    Swift

    -
    public let query: UsergridQuery?
    +
    public let query: UsergridQuery?
    @@ -312,7 +312,7 @@

    Declaration

    Declaration

    Swift

    -
    public let auth: UsergridAuth?
    +
    public let auth: UsergridAuth?
    @@ -349,9 +349,9 @@

    Declaration

  • - + - jsonBody + jsonBody
    @@ -366,7 +366,7 @@

    Declaration

    Declaration

    Swift

    -
    public let jsonBody: AnyObject?
    +
    public let jsonBody: Any?
    @@ -414,9 +414,9 @@

    Initialization

  • @@ -424,20 +424,20 @@

    Initialization

    -

    The designated initializer for UsergridRequest objects.

    +

    The designated initializer for UsergridRequest objects.

    Declaration

    Swift

    -
    public init(method:UsergridHttpMethod,
    +                          
    public init(method:UsergridHttpMethod,
             baseUrl:String,
             paths:[String]? = nil,
    -        query:UsergridQuery? = nil,
    -        auth:UsergridAuth? = nil,
    +        query:UsergridQuery? = nil,
    +        auth:UsergridAuth? = nil,
             headers:[String:String]? = nil,
    -        jsonBody:AnyObject? = nil,
    +        jsonBody:Any? = nil,
             queryParams:[String:String]? = nil)
    @@ -555,7 +555,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridRequest.

    +

    A new instance of UsergridRequest.

    @@ -575,9 +575,9 @@

    Instance Methods

  • @@ -592,7 +592,7 @@

    Instance Methods

    Declaration

    Swift

    -
    public func buildNSURLRequest() -> NSURLRequest
    +
    public func buildNSURLRequest() -> URLRequest
    @@ -609,8 +609,8 @@

    Return Value

    diff --git a/docs/Classes/UsergridResponse.html b/docs/Classes/UsergridResponse.html index 6ff0433..6a17ec3 100644 --- a/docs/Classes/UsergridResponse.html +++ b/docs/Classes/UsergridResponse.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -206,7 +206,7 @@

    Instance Properties

    Declaration

    Swift

    -
    public weak var client: UsergridClient?
    +
    public weak var client: UsergridClient?
    @@ -216,9 +216,9 @@

    Declaration

  • @@ -233,7 +233,7 @@

    Declaration

    Declaration

    Swift

    -
    internal(set) public var responseJSON: [String:AnyObject]?
    +
    internal(set) public var responseJSON: [String:Any]?
    @@ -260,7 +260,7 @@

    Declaration

    Declaration

    Swift

    -
    internal(set) public var query: UsergridQuery?
    +
    internal(set) public var query: UsergridQuery?
    @@ -314,7 +314,7 @@

    Declaration

    Declaration

    Swift

    -
    internal(set) public var entities: [UsergridEntity]?
    +
    internal(set) public var entities: [UsergridEntity]?
    @@ -395,7 +395,7 @@

    Declaration

    Declaration

    Swift

    -
    internal(set) public var error: UsergridResponseError?
    +
    internal(set) public var error: UsergridResponseError?
    @@ -449,7 +449,7 @@

    Declaration

    Declaration

    Swift

    -
    public var count: Int { return self.entities?.count ?? 0 }
    +
    public var count: Int
    @@ -476,7 +476,7 @@

    Declaration

    Declaration

    Swift

    -
    public var first: UsergridEntity? { return self.entities?.first }
    +
    public var first: UsergridEntity?
    @@ -503,7 +503,7 @@

    Declaration

    Declaration

    Swift

    -
    public var last: UsergridEntity? { return self.entities?.last }
    +
    public var last: UsergridEntity?
    @@ -530,7 +530,7 @@

    Declaration

    Declaration

    Swift

    -
    public var entity: UsergridEntity? { return self.first }
    +
    public var entity: UsergridEntity?
    @@ -557,7 +557,7 @@

    Declaration

    Declaration

    Swift

    -
    public var user: UsergridUser? { return self.entities?.first as? UsergridUser }
    +
    public var user: UsergridUser?
    @@ -584,7 +584,7 @@

    Declaration

    Declaration

    Swift

    -
    public var users: [UsergridUser]? { return self.entities as? [UsergridUser] }
    +
    public var users: [UsergridUser]?
    @@ -611,7 +611,7 @@

    Declaration

    Declaration

    Swift

    -
    public var hasNextPage: Bool { return self.cursor != nil }
    +
    public var hasNextPage: Bool
    @@ -723,7 +723,7 @@

    Initialization

    -

    Designated initializer for UsergridResponse objects that contain errors.

    +

    Designated initializer for UsergridResponse objects that contain errors.

    These types of responses are usually created because request conditions are not met.

    @@ -732,7 +732,7 @@

    Initialization

    Declaration

    Swift

    -
    public init(client: UsergridClient?, errorName: String, errorDescription: String)
    +
    public init(client: UsergridClient?, errorName: String, errorDescription: String)
    @@ -784,7 +784,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridResponse.

    +

    A new instance of UsergridResponse.

    @@ -793,9 +793,9 @@

    Return Value

  • @@ -803,14 +803,14 @@

    Return Value

    -

    Designated initializer for UsergridResponse objects finished but still may contain errors.

    +

    Designated initializer for UsergridResponse objects finished but still may contain errors.

    Declaration

    Swift

    -
    public init(client:UsergridClient?, data:NSData?, response:NSHTTPURLResponse?, error:NSError?, query:UsergridQuery? = nil)
    +
    public init(client:UsergridClient?, data:Data?, response:HTTPURLResponse?, error:NSError?, query:UsergridQuery? = nil)
    @@ -888,7 +888,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridResponse.

    +

    A new instance of UsergridResponse.

    @@ -908,9 +908,9 @@

    Instance Methods

  • @@ -927,7 +927,7 @@

    Instance Methods

    Declaration

    Swift

    -
    public func loadNextPage(completion: UsergridResponseCompletion)
    +
    public func loadNextPage(_ completion: @escaping UsergridResponseCompletion)
    @@ -959,8 +959,8 @@

    Parameters

    diff --git a/docs/Classes/UsergridResponseError.html b/docs/Classes/UsergridResponseError.html index 46fd05a..7b74908 100644 --- a/docs/Classes/UsergridResponseError.html +++ b/docs/Classes/UsergridResponseError.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -341,7 +341,7 @@

    Initialization

    -

    Designated initializer for UsergridResponseError.

    +

    Designated initializer for UsergridResponseError.

    @@ -364,7 +364,7 @@

    Parameters

    -

    The error’s name.

    +

    The error’s name.

    @@ -377,7 +377,7 @@

    Parameters

    -

    The error’s description.

    +

    The error’s description.

    @@ -400,7 +400,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridResponseError

    +

    A new instance of UsergridResponseError

    @@ -409,9 +409,9 @@

    Return Value

  • @@ -419,14 +419,14 @@

    Return Value

    -

    Convenience initializer for UsergridResponseError that determines if the given jsonDictionary contains an error.

    +

    Convenience initializer for UsergridResponseError that determines if the given jsonDictionary contains an error.

    Declaration

    Swift

    -
    public convenience init?(jsonDictionary:[String:AnyObject])
    +
    public convenience init?(jsonDictionary:[String:Any])
    @@ -452,7 +452,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridResponseError if the JSON dictionary did indeed contain error information.

    +

    A new instance of UsergridResponseError if the JSON dictionary did indeed contain error information.

    @@ -463,8 +463,8 @@

    Return Value

    diff --git a/docs/Classes/UsergridUser.html b/docs/Classes/UsergridUser.html index aa93547..3149f0b 100644 --- a/docs/Classes/UsergridUser.html +++ b/docs/Classes/UsergridUser.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -165,7 +165,7 @@

    UsergridUser

    -
    public class UsergridUser : UsergridEntity
    +
    public class UsergridUser : UsergridEntity
    @@ -178,9 +178,9 @@

    UsergridUser

  • @@ -188,7 +188,7 @@

    UsergridUser

    -

    Subscript for the UsergridUser class.

    +

    Subscript for the UsergridUser class.

    Warning

    @@ -196,19 +196,17 @@

    UsergridUser

    -

  • Example usage: -“` -let someName = usergridUser[name]

  • - -

    usergridUser[name] = someName -”`

    +

  • Example usage:

    +
    let someName = usergridUser[name]
    +usergridUser[name] = someName
    +
  • Declaration

    Swift

    -
    override public subscript(propertyName: String) -> AnyObject?
    +
    override public subscript(propertyName: String) -> Any?
    @@ -246,7 +244,7 @@

    Instance Properties

    Declaration

    Swift

    -
    public var auth: UsergridUserAuth?
    +
    public var auth: UsergridUserAuth?
    @@ -266,9 +264,9 @@

    Declaration

    -

    Property helper method for the UsergridUser objects UsergridUserProperties.Name.

    +

    Property helper method for the UsergridUser objects UsergridUserProperties.Name.

    -

    Unlike UsergridEntity objects, UsergridUser’s can change their name property which is why we provide a getter here.

    +

    Unlike UsergridEntity objects, UsergridUser’s can change their name property which is why we provide a getter here.

    @@ -295,7 +293,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Username.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Username.

    @@ -322,7 +320,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Password.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Password.

    @@ -349,7 +347,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Email.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Email.

    @@ -376,7 +374,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Age.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Age.

    @@ -403,14 +401,14 @@

    Declaration

    -

    Property helper method to get the username or email of the UsergridUser.

    +

    Property helper method to get the username or email of the UsergridUser.

    Declaration

    Swift

    -
    public var usernameOrEmail: String? { return self.username ?? self.email }
    +
    public var usernameOrEmail: String?
    @@ -430,7 +428,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Activated.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Activated.

    Indicates whether the user account has been activated or not.

    @@ -459,7 +457,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Disabled.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Disabled.

    @@ -486,7 +484,7 @@

    Declaration

    -

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Picture.

    +

    Property getter and setter helpers for the UsergridUser objects UsergridUserProperties.Picture.

    URL path to user’s profile picture. Defaults to Gravatar for email address.

    @@ -522,7 +520,7 @@

    Declaration

    Declaration

    Swift

    -
    public var uuidOrUsername: String? { return self.uuid ?? self.username }
    +
    public var uuidOrUsername: String?
    @@ -553,7 +551,7 @@

    Initialization

    -

    Designated initializer for UsergridUser objects.

    +

    Designated initializer for UsergridUser objects.

    @@ -586,7 +584,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -595,9 +593,9 @@

    Return Value

  • @@ -612,7 +610,7 @@

    Return Value

    Declaration

    Swift

    -
    required public init(type: String, name: String?, propertyDict: [String : AnyObject]?)
    +
    required public init(type: String, name: String?, propertyDict: [String : Any]?)
    @@ -664,7 +662,7 @@

    Parameters

  • Return Value

    -

    A new UsergridUser object.

    +

    A new UsergridUser object.

    @@ -673,9 +671,9 @@

    Return Value

  • @@ -683,14 +681,14 @@

    Return Value

    -

    Designated initializer for UsergridUser objects.

    +

    Designated initializer for UsergridUser objects.

    Declaration

    Swift

    -
    public init(name:String,propertyDict:[String:AnyObject]? = nil)
    +
    public init(name:String,propertyDict:[String:Any]? = nil)
    @@ -729,7 +727,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

  • @@ -748,7 +746,7 @@

    Return Value

    -

    Convenience initializer for UsergridUser objects.

    +

    Convenience initializer for UsergridUser objects.

    @@ -784,7 +782,7 @@

    Parameters

    -

    The user’s email.

    +

    The user’s email.

    @@ -797,7 +795,7 @@

    Parameters

    -

    The optional user’s password.

    +

    The optional user’s password.

    @@ -807,7 +805,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -826,7 +824,7 @@

    Return Value

    -

    Convenience initializer for UsergridUser objects.

    +

    Convenience initializer for UsergridUser objects.

    @@ -849,7 +847,7 @@

    Parameters

    -

    The user’s email.

    +

    The user’s email.

    @@ -862,7 +860,7 @@

    Parameters

    -

    The optional user’s password.

    +

    The optional user’s password.

    @@ -872,7 +870,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -891,7 +889,7 @@

    Return Value

    -

    Convenience initializer for UsergridUser objects.

    +

    Convenience initializer for UsergridUser objects.

    @@ -940,7 +938,7 @@

    Parameters

    -

    The optional user’s password.

    +

    The optional user’s password.

    @@ -950,7 +948,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -969,7 +967,7 @@

    Return Value

    -

    Convenience initializer for UsergridUser objects.

    +

    Convenience initializer for UsergridUser objects.

    @@ -1005,7 +1003,7 @@

    Parameters

    -

    The optional user’s password.

    +

    The optional user’s password.

    @@ -1015,7 +1013,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -1034,7 +1032,7 @@

    Return Value

    -

    Convenience initializer for UsergridUser objects.

    +

    Convenience initializer for UsergridUser objects.

    @@ -1070,7 +1068,7 @@

    Parameters

    -

    The optional user’s email.

    +

    The optional user’s email.

    @@ -1096,7 +1094,7 @@

    Parameters

    -

    The optional user’s password.

    +

    The optional user’s password.

    @@ -1106,7 +1104,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUser.

    +

    A new instance of UsergridUser.

    @@ -1169,7 +1167,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUser object.

    +

    A decoded UsergridUser object.

    @@ -1178,9 +1176,9 @@

    Return Value

  • @@ -1195,7 +1193,7 @@

    Return Value

    Declaration

    Swift

    -
    public override func encodeWithCoder(aCoder: NSCoder)
    +
    public override func encode(with aCoder: NSCoder)
    @@ -1236,9 +1234,9 @@

    Class Methods

  • @@ -1246,14 +1244,14 @@

    Class Methods

    -

    Checks the given email and/or username availablity for new UsergridUser objects using the shared instance of UsergridClient.

    +

    Checks the given email and/or username availablity for new UsergridUser objects using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public static func checkAvailable(email:String?, username:String?, completion:UsergridUserAvailabilityCompletion)
    +
    public static func checkAvailable(_ email:String?, username:String?, completion:@escaping UsergridUserAvailabilityCompletion)
    @@ -1309,9 +1307,9 @@

    Parameters

  • @@ -1319,14 +1317,14 @@

    Parameters

    -

    Checks the given email and/or username availablity for new UsergridUser objects using with the given UsergridClient.

    +

    Checks the given email and/or username availablity for new UsergridUser objects using with the given UsergridClient.

    Declaration

    Swift

    -
    public static func checkAvailable(client: UsergridClient, email:String?, username:String?, completion:UsergridUserAvailabilityCompletion)
    +
    public static func checkAvailable(_ client: UsergridClient, email:String?, username:String?, completion:@escaping UsergridUserAvailabilityCompletion)
    @@ -1406,9 +1404,9 @@

    Instance Methods

  • @@ -1423,7 +1421,7 @@

    Instance Methods

    Declaration

    Swift

    -
    public func create(completion: UsergridResponseCompletion? = nil)
    +
    public func create(_ completion: UsergridResponseCompletion? = nil)
    @@ -1453,9 +1451,9 @@

    Parameters

  • @@ -1470,7 +1468,7 @@

    Parameters

    Declaration

    Swift

    -
    public func create(client: UsergridClient, completion: UsergridResponseCompletion? = nil)
    +
    public func create(_ client: UsergridClient, completion: UsergridResponseCompletion? = nil)
    @@ -1513,9 +1511,9 @@

    Parameters

  • @@ -1532,7 +1530,7 @@

    Parameters

    Declaration

    Swift

    -
    public func login(username:String, password:String, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func login(_ username:String, password:String, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1588,9 +1586,9 @@

    Parameters

  • @@ -1607,7 +1605,7 @@

    Parameters

    Declaration

    Swift

    -
    public func login(client: UsergridClient, username:String, password:String, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func login(_ client: UsergridClient, username:String, password:String, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1676,9 +1674,9 @@

    Parameters

  • @@ -1693,7 +1691,7 @@

    Parameters

    Declaration

    Swift

    -
    public func resetPassword(old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    +
    public func resetPassword(_ old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    @@ -1749,9 +1747,9 @@

    Parameters

  • @@ -1766,7 +1764,7 @@

    Parameters

    Declaration

    Swift

    -
    public func resetPassword(client: UsergridClient, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    +
    public func resetPassword(_ client: UsergridClient, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil)
    @@ -1835,9 +1833,9 @@

    Parameters

  • @@ -1852,7 +1850,7 @@

    Parameters

    Declaration

    Swift

    -
    public func reauthenticate(completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func reauthenticate(_ completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1882,9 +1880,9 @@

    Parameters

  • @@ -1899,7 +1897,7 @@

    Parameters

    Declaration

    Swift

    -
    public func reauthenticate(client: UsergridClient, completion: UsergridUserAuthCompletionBlock? = nil)
    +
    public func reauthenticate(_ client: UsergridClient, completion: UsergridUserAuthCompletionBlock? = nil)
    @@ -1942,9 +1940,9 @@

    Parameters

  • @@ -1959,7 +1957,7 @@

    Parameters

    Declaration

    Swift

    -
    public func logout(completion:UsergridResponseCompletion? = nil)
    +
    public func logout(_ completion:UsergridResponseCompletion? = nil)
    @@ -1989,9 +1987,9 @@

    Parameters

  • @@ -2006,7 +2004,7 @@

    Parameters

    Declaration

    Swift

    -
    public func logout(client: UsergridClient, completion:UsergridResponseCompletion? = nil)
    +
    public func logout(_ client: UsergridClient, completion:UsergridResponseCompletion? = nil)
    @@ -2049,9 +2047,9 @@

    Parameters

  • @@ -2059,14 +2057,14 @@

    Parameters

    -

    A special convenience function that connects a UsergridDevice to this UsergridUser using the shared instance of UsergridClient.

    +

    A special convenience function that connects a UsergridDevice to this UsergridUser using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func connectToDevice(device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func connectToDevice(_ device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2109,9 +2107,9 @@

    Parameters

  • @@ -2119,14 +2117,14 @@

    Parameters

    -

    A special convenience function that connects a UsergridDevice to this UsergridUser.

    +

    A special convenience function that connects a UsergridDevice to this UsergridUser.

    Declaration

    Swift

    -
    public func connectToDevice(client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func connectToDevice(_ client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2182,9 +2180,9 @@

    Parameters

  • @@ -2199,7 +2197,7 @@

    Parameters

    Declaration

    Swift

    -
    public func getConnectedDevice(completion:UsergridResponseCompletion? = nil)
    +
    public func getConnectedDevice(_ completion:UsergridResponseCompletion? = nil)
    @@ -2229,9 +2227,9 @@

    Parameters

  • @@ -2246,7 +2244,7 @@

    Parameters

    Declaration

    Swift

    -
    public func getConnectedDevice(client:UsergridClient, completion:UsergridResponseCompletion? = nil)
    +
    public func getConnectedDevice(_ client:UsergridClient, completion:UsergridResponseCompletion? = nil)
    @@ -2289,9 +2287,9 @@

    Parameters

  • @@ -2299,14 +2297,14 @@

    Parameters

    -

    A special convenience function that disconnects a UsergridDevice from this UsergridUser using the shared instance of UsergridClient.

    +

    A special convenience function that disconnects a UsergridDevice from this UsergridUser using the shared instance of UsergridClient.

    Declaration

    Swift

    -
    public func disconnectFromDevice(device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func disconnectFromDevice(_ device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2349,9 +2347,9 @@

    Parameters

  • @@ -2359,14 +2357,14 @@

    Parameters

    -

    A special convenience function that disconnects a UsergridDevice from this UsergridUser.

    +

    A special convenience function that disconnects a UsergridDevice from this UsergridUser.

    Declaration

    Swift

    -
    public func disconnectFromDevice(client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    +
    public func disconnectFromDevice(_ client:UsergridClient, device:UsergridDevice? = nil, completion:UsergridResponseCompletion? = nil)
    @@ -2424,8 +2422,8 @@

    Parameters

  • diff --git a/docs/Classes/UsergridUserAuth.html b/docs/Classes/UsergridUserAuth.html index 15b46fb..be0c511 100644 --- a/docs/Classes/UsergridUserAuth.html +++ b/docs/Classes/UsergridUserAuth.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -165,7 +165,7 @@

    UsergridUserAuth

    -
    public class UsergridUserAuth : UsergridAuth
    +
    public class UsergridUserAuth : UsergridAuth
    @@ -233,7 +233,7 @@

    Initialization

    -

    Designated initializer for UsergridUserAuth objects.

    +

    Designated initializer for UsergridUserAuth objects.

    @@ -279,7 +279,7 @@

    Parameters

    Return Value

    -

    A new instance of UsergridUserAuth.

    +

    A new instance of UsergridUserAuth.

    @@ -342,7 +342,7 @@

    Parameters

    Return Value

    -

    A decoded UsergridUserAuth object.

    +

    A decoded UsergridUserAuth object.

  • @@ -351,9 +351,9 @@

    Return Value

  • @@ -368,7 +368,7 @@

    Return Value

    Declaration

    Swift

    -
    override public func encodeWithCoder(aCoder: NSCoder)
    +
    override public func encode(with aCoder: NSCoder)
    @@ -400,8 +400,8 @@

    Parameters

  • diff --git a/docs/Enums.html b/docs/Enums.html index 56fabb8..10490e8 100644 --- a/docs/Enums.html +++ b/docs/Enums.html @@ -13,12 +13,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -123,7 +123,7 @@ Extensions
  • @@ -425,8 +425,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridAuthMode.html b/docs/Enums/UsergridAuthMode.html index 7ed672a..8080739 100644 --- a/docs/Enums/UsergridAuthMode.html +++ b/docs/Enums/UsergridAuthMode.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridAuthMode

  • - - - None + + + none
    @@ -195,7 +195,7 @@

    UsergridAuthMode

    Declaration

    Swift

    -
    case None
    +
    case none
    @@ -209,9 +209,9 @@

    Declaration

  • - - - User + + + user
    @@ -228,7 +228,7 @@

    Declaration

    Declaration

    Swift

    -
    case User
    +
    case user
    @@ -242,9 +242,9 @@

    Declaration

  • - - - App + + + app
    @@ -261,7 +261,7 @@

    Declaration

    Declaration

    Swift

    -
    case App
    +
    case app
    @@ -273,8 +273,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridDeviceProperties.html b/docs/Enums/UsergridDeviceProperties.html index a4736a3..ea84b91 100644 --- a/docs/Enums/UsergridDeviceProperties.html +++ b/docs/Enums/UsergridDeviceProperties.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridDeviceProperties

  • - - - Model + + + model
    @@ -195,7 +195,7 @@

    UsergridDeviceProperties

    Declaration

    Swift

    -
    case Model
    +
    case model
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Platform + + + platform
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Platform
    +
    case platform
    @@ -240,9 +240,9 @@

    Declaration

  • - - - OSVersion + + + osVersion
    @@ -257,7 +257,7 @@

    Declaration

    Declaration

    Swift

    -
    case OSVersion
    +
    case osVersion
    @@ -288,14 +288,14 @@

    Methods

    -

    Gets the corresponding UsergridDeviceProperties from a string if it’s valid.

    +

    Gets the corresponding UsergridDeviceProperties from a string if it’s valid.

    Declaration

    Swift

    -
    public static func fromString(stringValue: String) -> UsergridDeviceProperties?
    +
    public static func fromString(_ stringValue: String) -> UsergridDeviceProperties?
    @@ -321,7 +321,7 @@

    Parameters

    Return Value

    -

    The corresponding UsergridDeviceProperties or nil.

    +

    The corresponding UsergridDeviceProperties or nil.

    @@ -359,8 +359,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridDirection.html b/docs/Enums/UsergridDirection.html index d11978c..9f89231 100644 --- a/docs/Enums/UsergridDirection.html +++ b/docs/Enums/UsergridDirection.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridDirection

  • - - - In + + + in
    @@ -195,7 +195,7 @@

    UsergridDirection

    Declaration

    Swift

    -
    case In
    +
    case `in`
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Out + + + out
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Out
    +
    case out
    @@ -276,8 +276,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridEntityProperties.html b/docs/Enums/UsergridEntityProperties.html index b9b3278..ebae710 100644 --- a/docs/Enums/UsergridEntityProperties.html +++ b/docs/Enums/UsergridEntityProperties.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridEntityProperties

  • - - - EntityType + + + type
    @@ -195,7 +195,7 @@

    UsergridEntityProperties

    Declaration

    Swift

    -
    case EntityType
    +
    case type
    @@ -209,9 +209,9 @@

    Declaration

  • - - - UUID + + + uuid
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case UUID
    +
    case uuid
    @@ -240,9 +240,9 @@

    Declaration

  • - - - Name + + + name
    @@ -257,7 +257,7 @@

    Declaration

    Declaration

    Swift

    -
    case Name
    +
    case name
    @@ -271,9 +271,9 @@

    Declaration

  • - - - Created + + + created
    @@ -288,7 +288,7 @@

    Declaration

    Declaration

    Swift

    -
    case Created
    +
    case created
    @@ -302,9 +302,9 @@

    Declaration

  • - - - Modified + + + modified
    @@ -319,7 +319,7 @@

    Declaration

    Declaration

    Swift

    -
    case Modified
    +
    case modified
    @@ -333,9 +333,9 @@

    Declaration

  • - - - Location + + + location
    @@ -350,7 +350,7 @@

    Declaration

    Declaration

    Swift

    -
    case Location
    +
    case location
    @@ -381,14 +381,14 @@

    Methods

    -

    Gets the corresponding UsergridEntityProperties from a string if it’s valid.

    +

    Gets the corresponding UsergridEntityProperties from a string if it’s valid.

    Declaration

    Swift

    -
    public static func fromString(stringValue: String) -> UsergridEntityProperties?
    +
    public static func fromString(_ stringValue: String) -> UsergridEntityProperties?
    @@ -414,7 +414,7 @@

    Parameters

    Return Value

    -

    The corresponding UsergridEntityProperties or nil.

    +

    The corresponding UsergridEntityProperties or nil.

    @@ -460,14 +460,14 @@

    Declaration

    -

    Determines if the UsergridEntityProperties is mutable for the given entity.

    +

    Determines if the UsergridEntityProperties is mutable for the given entity.

    Declaration

    Swift

    -
    public func isMutableForEntity(entity:UsergridEntity) -> Bool
    +
    public func isMutableForEntity(_ entity:UsergridEntity) -> Bool
    @@ -493,7 +493,7 @@

    Parameters

    Return Value

    -

    If the UsergridEntityProperties is mutable for the given entity

    +

    If the UsergridEntityProperties is mutable for the given entity

    @@ -504,8 +504,8 @@

    Return Value

    diff --git a/docs/Enums/UsergridHttpMethod.html b/docs/Enums/UsergridHttpMethod.html index 1ad6cbb..e1d8770 100644 --- a/docs/Enums/UsergridHttpMethod.html +++ b/docs/Enums/UsergridHttpMethod.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridHttpMethod

  • - - - Get + + + get
    @@ -195,7 +195,7 @@

    UsergridHttpMethod

    Declaration

    Swift

    -
    case Get
    +
    case get
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Put + + + put
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Put
    +
    case put
    @@ -240,9 +240,9 @@

    Declaration

  • - - - Post + + + post
    @@ -257,7 +257,7 @@

    Declaration

    Declaration

    Swift

    -
    case Post
    +
    case post
    @@ -271,9 +271,9 @@

    Declaration

  • - - - Delete + + + delete
    @@ -288,7 +288,7 @@

    Declaration

    Declaration

    Swift

    -
    case Delete
    +
    case delete
    @@ -331,8 +331,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridImageContentType.html b/docs/Enums/UsergridImageContentType.html index 224450b..f50b627 100644 --- a/docs/Enums/UsergridImageContentType.html +++ b/docs/Enums/UsergridImageContentType.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridImageContentType

  • - - - Png + + + png
    @@ -195,7 +195,7 @@

    UsergridImageContentType

    Declaration

    Swift

    -
    case Png
    +
    case png
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Jpeg + + + jpeg
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Jpeg
    +
    case jpeg
    @@ -276,8 +276,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridQueryOperator.html b/docs/Enums/UsergridQueryOperator.html index fc07091..4fc4993 100644 --- a/docs/Enums/UsergridQueryOperator.html +++ b/docs/Enums/UsergridQueryOperator.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridQueryOperator

  • - - - Equal + + + equal
    @@ -195,7 +195,7 @@

    UsergridQueryOperator

    Declaration

    Swift

    -
    case Equal
    +
    case equal
    @@ -209,9 +209,9 @@

    Declaration

  • - - - GreaterThan + + + greaterThan
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case GreaterThan
    +
    case greaterThan
    @@ -240,9 +240,9 @@

    Declaration

  • @@ -257,7 +257,7 @@

    Declaration

    Declaration

    Swift

    -
    case GreaterThanEqualTo
    +
    case greaterThanEqualTo
    @@ -271,9 +271,9 @@

    Declaration

  • - - - LessThan + + + lessThan
    @@ -288,7 +288,7 @@

    Declaration

    Declaration

    Swift

    -
    case LessThan
    +
    case lessThan
    @@ -302,9 +302,9 @@

    Declaration

  • @@ -319,7 +319,7 @@

    Declaration

    Declaration

    Swift

    -
    case LessThanEqualTo
    +
    case lessThanEqualTo
    @@ -350,14 +350,14 @@

    Methods

    -

    Gets the corresponding UsergridQueryOperator from a string if it’s valid.

    +

    Gets the corresponding UsergridQueryOperator from a string if it’s valid.

    Declaration

    Swift

    -
    public static func fromString(stringValue: String) -> UsergridQueryOperator?
    +
    public static func fromString(_ stringValue: String) -> UsergridQueryOperator?
    @@ -383,7 +383,7 @@

    Parameters

    Return Value

    -

    The corresponding UsergridQueryOperator or nil.

    +

    The corresponding UsergridQueryOperator or nil.

    @@ -421,8 +421,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridQuerySortOrder.html b/docs/Enums/UsergridQuerySortOrder.html index 3758d3f..c5b1561 100644 --- a/docs/Enums/UsergridQuerySortOrder.html +++ b/docs/Enums/UsergridQuerySortOrder.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridQuerySortOrder

  • - - - Asc + + + asc
    @@ -195,7 +195,7 @@

    UsergridQuerySortOrder

    Declaration

    Swift

    -
    case Asc
    +
    case asc
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Desc + + + desc
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Desc
    +
    case desc
    @@ -257,14 +257,14 @@

    Methods

    -

    Gets the corresponding UsergridQuerySortOrder from a string if it’s valid.

    +

    Gets the corresponding UsergridQuerySortOrder from a string if it’s valid.

    Declaration

    Swift

    -
    public static func fromString(stringValue: String) -> UsergridQuerySortOrder?
    +
    public static func fromString(_ stringValue: String) -> UsergridQuerySortOrder?
    @@ -290,7 +290,7 @@

    Parameters

    Return Value

    -

    The corresponding UsergridQuerySortOrder or nil.

    +

    The corresponding UsergridQuerySortOrder or nil.

    @@ -328,8 +328,8 @@

    Declaration

    diff --git a/docs/Enums/UsergridUserProperties.html b/docs/Enums/UsergridUserProperties.html index eff2cdc..36a4943 100644 --- a/docs/Enums/UsergridUserProperties.html +++ b/docs/Enums/UsergridUserProperties.html @@ -14,12 +14,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -124,7 +124,7 @@ Extensions
  • @@ -178,9 +178,9 @@

    UsergridUserProperties

  • - - - Name + + + name
    @@ -195,7 +195,7 @@

    UsergridUserProperties

    Declaration

    Swift

    -
    case Name
    +
    case name
    @@ -209,9 +209,9 @@

    Declaration

  • - - - Username + + + username
    @@ -226,7 +226,7 @@

    Declaration

    Declaration

    Swift

    -
    case Username
    +
    case username
    @@ -240,9 +240,9 @@

    Declaration

  • - - - Password + + + password
    @@ -257,7 +257,7 @@

    Declaration

    Declaration

    Swift

    -
    case Password
    +
    case password
    @@ -271,9 +271,9 @@

    Declaration

  • - - - Email + + + email
    @@ -288,7 +288,7 @@

    Declaration

    Declaration

    Swift

    -
    case Email
    +
    case email
    @@ -302,9 +302,9 @@

    Declaration

  • - - - Age + + + age
    @@ -319,7 +319,7 @@

    Declaration

    Declaration

    Swift

    -
    case Age
    +
    case age
    @@ -333,9 +333,9 @@

    Declaration

  • - - - Activated + + + activated
    @@ -350,7 +350,7 @@

    Declaration

    Declaration

    Swift

    -
    case Activated
    +
    case activated
    @@ -364,9 +364,9 @@

    Declaration

  • - - - Disabled + + + disabled
    @@ -381,7 +381,7 @@

    Declaration

    Declaration

    Swift

    -
    case Disabled
    +
    case disabled
    @@ -395,9 +395,9 @@

    Declaration

  • - - - Picture + + + picture
    @@ -412,7 +412,7 @@

    Declaration

    Declaration

    Swift

    -
    case Picture
    +
    case picture
    @@ -443,14 +443,14 @@

    Methods

    -

    Gets the corresponding UsergridUserProperties from a string if it’s valid.

    +

    Gets the corresponding UsergridUserProperties from a string if it’s valid.

    Declaration

    Swift

    -
    public static func fromString(stringValue: String) -> UsergridUserProperties?
    +
    public static func fromString(_ stringValue: String) -> UsergridUserProperties?
    @@ -476,7 +476,7 @@

    Parameters

    Return Value

    -

    The corresponding UsergridUserProperties or nil.

    +

    The corresponding UsergridUserProperties or nil.

    @@ -514,8 +514,8 @@

    Declaration

    diff --git a/docs/Extensions.html b/docs/Extensions.html index a5c3fb5..1a9d96f 100644 --- a/docs/Extensions.html +++ b/docs/Extensions.html @@ -13,12 +13,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -123,7 +123,7 @@ Extensions
  • @@ -171,9 +171,9 @@

    Extensions

  • - - - NSDate + + + Date
    @@ -181,9 +181,16 @@

    Extensions

    -

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Date : ReferenceConvertible, Comparable, Equatable
    - See more +
    @@ -193,8 +200,8 @@

    Extensions

    diff --git a/docs/Extensions/Date.html b/docs/Extensions/Date.html new file mode 100644 index 0000000..90257ae --- /dev/null +++ b/docs/Extensions/Date.html @@ -0,0 +1,453 @@ + + + + Date Extension Reference + + + + + + + + + + +
    +
    +

    UsergridSDK Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    Date

    +
    +
    +
    struct Date : ReferenceConvertible, Comparable, Equatable
    + +
    +
    + +
    +
    +
    +
      +
    • +
      + + + + init(milliseconds:) + +
      +
      +
      +
      +
      +
      +

      Creates a new NSDate object with the given milliseconds.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public init(milliseconds: String)
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + milliseconds + + +
      +

      the milliseconds

      + +
      +
      +
      +
      +

      Return Value

      +

      A new NSDate object.

      + +
      +
      +
      +
    • +
    • +
      + + + + dateAsMilliseconds() + +
      +
      +
      +
      +
      +
      +

      Converts the NSDate object to milliseconds.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func dateAsMilliseconds() -> Int
      + +
      +
      +
      +

      Return Value

      +

      The number of milliseconds corresponding to the date.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Converts the NSDate object to milliseconds and returns the value as a string.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func dateAsMillisecondsString() -> String
      + +
      +
      +
      +

      Return Value

      +

      The number of milliseconds corresponding to the date as a string.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Converts the number of milliseconds to a string.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func stringFromMilleseconds(_ milliseconds:Int) -> String
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + milliseconds + + +
      +

      the milliseconds to convert

      + +
      +
      +
      +
      +

      Return Value

      +

      The milliseconds as a string.

      + +
      +
      +
      +
    • +
    • +
      + + + + unixTimeStampString() + +
      +
      +
      +
      +
      +
      +

      Converts the NSDate object to the corresponding UNIX time stamp as a string.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func unixTimeStampString() -> String
      + +
      +
      +
      +

      Return Value

      +

      The UNIX time stamp as a string.

      + +
      +
      +
      +
    • +
    • +
      + + + + unixTimeStamp() + +
      +
      +
      +
      +
      +
      +

      Converts the NSDate object to the corresponding UNIX time stamp.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func unixTimeStamp() -> Int
      + +
      +
      +
      +

      Return Value

      +

      The UNIX time stamp.

      + +
      +
      +
      +
    • +
    • +
      + + + + nowAsMilliseconds() + +
      +
      +
      +
      +
      +
      +

      Converts the current date to milliseconds.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func nowAsMilliseconds() -> Int
      + +
      +
      +
      +

      Return Value

      +

      The milliseconds of the current date.

      + +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + + diff --git a/docs/Extensions/UsergridSessionDelegate.html b/docs/Extensions/UsergridSessionDelegate.html new file mode 100644 index 0000000..0fc051e --- /dev/null +++ b/docs/Extensions/UsergridSessionDelegate.html @@ -0,0 +1,225 @@ + + + + UsergridSessionDelegate Extension Reference + + + + + + + + + + +
    + +
    +
    + +
    + + + + diff --git a/docs/Global Variables.html b/docs/Global Variables.html index 2685313..1ca08e5 100644 --- a/docs/Global Variables.html +++ b/docs/Global Variables.html @@ -13,12 +13,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -123,7 +123,7 @@ Extensions
  • @@ -188,7 +188,7 @@

    Global Variables

    Declaration

    Swift

    -
    public let UsergridSDKVersion = "2.1.1"
    +
    public let UsergridSDKVersion = "2.1.3"
    @@ -200,8 +200,8 @@

    Declaration

    diff --git a/docs/Typealiases.html b/docs/Typealiases.html index 4a5b04a..1715af9 100644 --- a/docs/Typealiases.html +++ b/docs/Typealiases.html @@ -13,12 +13,12 @@
    -

    Docs (100% documented)

    +

    UsergridSDK Docs (100% documented)

    @@ -123,7 +123,7 @@ Extensions @@ -188,7 +188,7 @@

    Typealiases

    Declaration

    Swift

    -
    public typealias UsergridAppAuthCompletionBlock = (auth:UsergridAppAuth?, error: UsergridResponseError?) -> Void
    +
    public typealias UsergridAppAuthCompletionBlock = (_ auth:UsergridAppAuth?, _ error: UsergridResponseError?) -> Void
    @@ -215,7 +215,7 @@

    Declaration

    Declaration

    Swift

    -
    public typealias UsergridUserAuthCompletionBlock = (auth:UsergridUserAuth?, user:UsergridUser?, error: UsergridResponseError?) -> Void
    +
    public typealias UsergridUserAuthCompletionBlock = (_ auth:UsergridUserAuth?, _ user:UsergridUser?, _ error: UsergridResponseError?) -> Void
    @@ -246,7 +246,7 @@

    Declaration

    Declaration

    Swift

    -
    public typealias UsergridUserAvailabilityCompletion = (error: UsergridResponseError?, available:Bool) -> Void
    +
    public typealias UsergridUserAvailabilityCompletion = (_ error: UsergridResponseError?, _ available:Bool) -> Void
    @@ -273,7 +273,7 @@

    Declaration

    Declaration

    Swift

    -
    public typealias UsergridUserResetPasswordCompletion = (error: UsergridResponseError?, didSucceed:Bool) -> Void
    +
    public typealias UsergridUserResetPasswordCompletion = (_ error: UsergridResponseError?, _ didSucceed:Bool) -> Void
    @@ -304,7 +304,7 @@

    Declaration

    Declaration

    Swift

    -
    public typealias UsergridResponseCompletion = (response: UsergridResponse) -> Void
    +
    public typealias UsergridResponseCompletion = (_ response: UsergridResponse) -> Void
    @@ -335,7 +335,7 @@

    Declaration

    Declaration

    Swift

    -
    public typealias UsergridAssetRequestProgress = (bytesFinished:Int64, bytesExpected: Int64) -> Void
    +
    public typealias UsergridAssetRequestProgress = (_ bytesFinished:Int64, _ bytesExpected: Int64) -> Void
    @@ -345,9 +345,9 @@

    Declaration

  • @@ -355,14 +355,14 @@

    Declaration

    -

    The completion block used in UsergridAsset are finished uploading.

    +

    The completion block used in UsergridAsset are finished downloading.

    Declaration

    Swift

    -
    public typealias UsergridAssetUploadCompletion = (asset:UsergridAsset?, response: UsergridResponse) -> Void
    +
    public typealias UsergridAssetDownloadCompletion = (_ asset:UsergridAsset?, _ error: UsergridResponseError?) -> Void
    @@ -372,9 +372,9 @@

    Declaration

  • @@ -382,14 +382,14 @@

    Declaration

    -

    The completion block used in UsergridAsset are finished downloading.

    +

    The completion block used in UsergridAsset are finished uploading.

    Declaration

    Swift

    -
    public typealias UsergridAssetDownloadCompletion = (asset:UsergridAsset?, error: UsergridResponseError?) -> Void
    +
    public typealias UsergridAssetUploadCompletion = (_ asset:UsergridAsset?, _ response: UsergridResponse) -> Void
    @@ -401,8 +401,8 @@

    Declaration

  • diff --git a/docs/css/jazzy.css b/docs/css/jazzy.css index 2a7da3a..d6d65b7 100644 --- a/docs/css/jazzy.css +++ b/docs/css/jazzy.css @@ -139,7 +139,8 @@ header { .nav-group-task { font-size: 0.9em; - list-style-type: none; } + list-style-type: none; + white-space: nowrap; } .nav-group-task a { color: #888; } diff --git a/docs/docsets/UsergridSDK.docset/Contents/Info.plist b/docs/docsets/UsergridSDK.docset/Contents/Info.plist index 66e4f3b..9b0553f 100644 --- a/docs/docsets/UsergridSDK.docset/Contents/Info.plist +++ b/docs/docsets/UsergridSDK.docset/Contents/Info.plist @@ -7,7 +7,7 @@ CFBundleName UsergridSDK DocSetPlatformFamily - jazzy + usergridsdk isDashDocset dashIndexFilePath diff --git a/docs/docsets/UsergridSDK.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/UsergridSDK.docset/Contents/Resources/Documents/Classes.html index c867dcf..6f522f6 100644 --- a/docs/docsets/UsergridSDK.docset/Contents/Resources/Documents/Classes.html +++ b/docs/docsets/UsergridSDK.docset/Contents/Resources/Documents/Classes.html @@ -91,7 +91,7 @@ Enums
  • +