Updated sdk/pod version numbers. Fixed comments. Added missing method in Usergrid.swift.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e7259b57 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e7259b57 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e7259b57 Branch: refs/heads/master Commit: e7259b574e149c0bf49edfc0f3e4e15f1939116c Parents: c733f01 Author: Robert Walsh <[email protected]> Authored: Thu Apr 14 11:30:51 2016 -0500 Committer: Robert Walsh <[email protected]> Committed: Thu Apr 14 11:30:51 2016 -0500 ---------------------------------------------------------------------- UsergridSDK.podspec | 2 +- sdks/swift/Source/Usergrid.swift | 16 ++++++++++++++-- sdks/swift/Source/UsergridAuth.swift | 6 +++--- sdks/swift/Source/UsergridClient.swift | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/e7259b57/UsergridSDK.podspec ---------------------------------------------------------------------- diff --git a/UsergridSDK.podspec b/UsergridSDK.podspec index a4ee606..136ecd5 100644 --- a/UsergridSDK.podspec +++ b/UsergridSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'UsergridSDK' - s.version = '2.1.0' + s.version = '2.1.1' s.summary = 'Usergrid SDK written in Swift' s.homepage = 'https://github.com/apache/usergrid/tree/master/sdks/swift' s.license = 'Apache 2.0' http://git-wip-us.apache.org/repos/asf/usergrid/blob/e7259b57/sdks/swift/Source/Usergrid.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Source/Usergrid.swift b/sdks/swift/Source/Usergrid.swift index 14bda2f..a6f595b 100644 --- a/sdks/swift/Source/Usergrid.swift +++ b/sdks/swift/Source/Usergrid.swift @@ -27,7 +27,7 @@ import Foundation /// The version number for the Usergrid Swift SDK. -public let UsergridSDKVersion = "2.1.0" +public let UsergridSDKVersion = "2.1.1" /** The `Usergrid` class acts as a static shared instance manager for the `UsergridClient` class. @@ -255,7 +255,19 @@ public class Usergrid: NSObject { } /** - Logs out the current user of the shared instance locally and remotely. + Changes the given `UsergridUser`'s current password with the shared instance of `UsergridClient`. + + - parameter user: The user. + - parameter old: The old password. + - parameter new: The new password. + - parameter completion: The optional completion block. + */ + public static func resetPassword(user: UsergridUser, old:String, new:String, completion:UsergridUserResetPasswordCompletion? = nil) { + Usergrid.sharedInstance.resetPassword(user, old: old, new: new, completion: completion) + } + + /** + Logs out the current user of the shared instance locally and remotely using the shared instance of `UsergridClient`. - parameter completion: The completion block that will be called after logout has completed. */ http://git-wip-us.apache.org/repos/asf/usergrid/blob/e7259b57/sdks/swift/Source/UsergridAuth.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Source/UsergridAuth.swift b/sdks/swift/Source/UsergridAuth.swift index a8879b2..e87e9c1 100644 --- a/sdks/swift/Source/UsergridAuth.swift +++ b/sdks/swift/Source/UsergridAuth.swift @@ -104,7 +104,7 @@ public class UsergridAuth : NSObject, NSCoding { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridAuth` object. */ required public init?(coder aDecoder: NSCoder) { self.accessToken = aDecoder.decodeObjectForKey("accessToken") as? String @@ -177,7 +177,7 @@ public class UsergridUserAuth : UsergridAuth { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridUserAuth` object. */ required public init?(coder aDecoder: NSCoder) { guard let username = aDecoder.decodeObjectForKey("username") as? String, @@ -247,7 +247,7 @@ public class UsergridAppAuth : UsergridAuth { - parameter aDecoder: The decoder. - - returns: A decoded `UsergridUser` object. + - returns: A decoded `UsergridAppAuth` object. */ required public init?(coder aDecoder: NSCoder) { guard let clientId = aDecoder.decodeObjectForKey("clientId") as? String, http://git-wip-us.apache.org/repos/asf/usergrid/blob/e7259b57/sdks/swift/Source/UsergridClient.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Source/UsergridClient.swift b/sdks/swift/Source/UsergridClient.swift index 41cf8e6..ba4ba7d 100644 --- a/sdks/swift/Source/UsergridClient.swift +++ b/sdks/swift/Source/UsergridClient.swift @@ -338,7 +338,7 @@ public class UsergridClient: NSObject, NSCoding { } /** - Changes the give `UsergridUser`'s current password with the shared instance of `UsergridClient`. + Changes the given `UsergridUser`'s current password. - parameter user: The user. - parameter old: The old password.
