diff --git a/CHANGELOG.md b/CHANGELOG.md index 6887ea9..67f494d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All changes to this project will be documented in this file. #### 0.x Releases -- `0.4.x` Releases - [0.4.0](#040) +- `0.4.x` Releases - [0.4.0](#040) | [0.4.1](#041) - `0.3.x` Releases - [0.3.0](#030) - `0.2.x` Releases - [0.2.0](#020) - `0.1.x` Releases - [0.1.0](#010) @@ -10,6 +10,17 @@ All changes to this project will be documented in this file. --- +## [0.4.1](https://github.com/commercetools/commercetools-ios-sdk/releases/tag/0.4.1) +Released on 2016-10-31. + +#### Added +- Support for carts and orders migration on successful log in or sign up, if using an anonymous session. +- Centralized customer authorization methods. + +#### Removed +- Direct access to `AuthManager` `login` and `logut` method. From now on, `Commercetools.loginCustomer` and `Commercetools.logoutCustomer` should be used. +- Direct access to `Customer` `signUp` method. From now on, `Commercetools.signUpCustomer` should be used. + ## [0.4.0](https://github.com/commercetools/commercetools-ios-sdk/releases/tag/0.4.0) Released on 2016-10-25. diff --git a/Commercetools.podspec b/Commercetools.podspec index 1674299..81a4d0e 100644 --- a/Commercetools.podspec +++ b/Commercetools.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Commercetools" - s.version = "0.4.0" + s.version = "0.4.1" s.summary = "The e-commerce iOS SDK from commercetools" s.homepage = "https://github.com/commercetools/commercetools-ios-sdk" s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.source_files = 'Source/**/*.swift' s.dependency 'Alamofire', '~> 4.0' - s.dependency 'ObjectMapper', '~> 2.0' + s.dependency 'ObjectMapper', '~> 2.2' end diff --git a/Podfile b/Podfile index aee3aff..b259e25 100644 --- a/Podfile +++ b/Podfile @@ -3,7 +3,7 @@ use_frameworks! def common_pods pod 'Alamofire', '~> 4.0' - pod 'ObjectMapper', '~> 2.0' + pod 'ObjectMapper', '~> 2.2' end target 'Commercetools' do diff --git a/Source/AuthManager.swift b/Source/AuthManager.swift index 92e8188..e268e5b 100644 --- a/Source/AuthManager.swift +++ b/Source/AuthManager.swift @@ -138,7 +138,7 @@ open class AuthManager { - parameter password: The user's password. - parameter completionHandler: The code to be executed once the token fetching completes. */ - open func loginCustomer(username: String, password: String, completionHandler: @escaping (Error?) -> Void) { + func loginCustomer(username: String, password: String, completionHandler: @escaping (Error?) -> Void) { // Process all token requests using private serial queue to avoid issues with race conditions // when multiple credentials / login requests can lead auth manager in an unpredictable state serialQueue.async(execute: { @@ -158,7 +158,7 @@ open class AuthManager { This method will clear all tokens both from memory and persistent storage. Most common use case for this method is user logout. */ - open func logoutCustomer() { + func logoutCustomer() { clearAllTokens() Log.debug("Getting new anonymous access token after user logout") diff --git a/Source/Endpoints/Customer.swift b/Source/Endpoints/Customer.swift index bd6ac7e..076f556 100644 --- a/Source/Endpoints/Customer.swift +++ b/Source/Endpoints/Customer.swift @@ -55,7 +55,7 @@ open class Customer: Endpoint, Mappable { - parameter profile: Dictionary representation of the draft customer profile to be created. - parameter result: The code to be executed after processing the response. */ - open static func signUp(_ profile: [String: Any], result: @escaping (Result) -> Void) { + static func signUp(_ profile: [String: Any], result: @escaping (Result) -> Void) { requestWithTokenAndPath(result, { token, path in Alamofire.request("\(path)signup", method: .post, parameters: profile, encoding: JSONEncoding.default, headers: self.headers(token)) .responseJSON(queue: DispatchQueue.global(), completionHandler: { response in diff --git a/Source/Info.plist b/Source/Info.plist index 7be74c7..2bb1ea9 100644 --- a/Source/Info.plist +++ b/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.4 + 0.4.1 CFBundleSignature ???? CFBundleVersion