From 705d0255f939d0ce8881f9fac7e53adf8479d1f5 Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 14:13:15 -0400 Subject: [PATCH 1/6] MLIBZ-1902: ObjectMapper causing compilation problems because of a breaking change --- Kinvey/Kinvey/FileStore.swift | 4 ++-- Kinvey/Kinvey/FindOperation.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Kinvey/Kinvey/FileStore.swift b/Kinvey/Kinvey/FileStore.swift index 8f3926171..0328d8e6f 100644 --- a/Kinvey/Kinvey/FileStore.swift +++ b/Kinvey/Kinvey/FileStore.swift @@ -705,9 +705,9 @@ open class FileStore { request.execute { (data, response, error) -> Void in if let response = response, response.isOK, - let jsonArray = self.client.responseParser.parseArray(data), - let files = [FileType](JSONArray: jsonArray) + let jsonArray = self.client.responseParser.parseArray(data) { + let files = [FileType](JSONArray: jsonArray) fulfill(files) } else { reject(buildError(data, response, error, self.client)) diff --git a/Kinvey/Kinvey/FindOperation.swift b/Kinvey/Kinvey/FindOperation.swift index 8f4366d75..4ad3b75a1 100644 --- a/Kinvey/Kinvey/FindOperation.swift +++ b/Kinvey/Kinvey/FindOperation.swift @@ -121,7 +121,7 @@ internal class FindOperation: ReadOperation self.executeLocal(completionHandler) } } else { - let entities = [T](JSONArray: jsonArray)! + let entities = [T](JSONArray: jsonArray) if let cache = self.cache { if self.mustRemoveCachedRecords { let refObjs = self.reduceToIdsLmts(jsonArray) From ad33de024dcbd8c090fd96695048531c9e7ee497 Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 14:21:02 -0400 Subject: [PATCH 2/6] updating dependencies --- Cartfile.resolved | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index fa9b9cf4b..b78d30ab9 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,8 +1,8 @@ +github "DaveWoodCom/XCGLogger" "4.0.0" +github "Hearst-DD/ObjectMapper" "2.2.7" +github "Quick/Nimble" "v7.0.1" github "kif-framework/KIF" "v3.5.2" github "kishikawakatsumi/KeychainAccess" "v3.0.2" +github "mxcl/PromiseKit" "4.2.2" +github "realm/realm-cocoa" "v2.8.0" github "tjboneman/NSPredicate-MongoDB-Adaptor" "2444d4a790527eb5c9fcb4e4f7b4af417048ae18" -github "Quick/Nimble" "v7.0.0" -github "Hearst-DD/ObjectMapper" "2.2.6" -github "mxcl/PromiseKit" "4.2.1" -github "DaveWoodCom/XCGLogger" "4.0.0" -github "realm/realm-cocoa" "v2.7.0" From 411dcac49c1cfcd34d0cf540a9b65e099f88baec Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 15:01:17 -0400 Subject: [PATCH 3/6] fixing the simulator version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91cedba46..df9840a2f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CONFIGURATION?=Release VERSION=$(shell /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${PWD}/Kinvey/Kinvey/Info.plist") -IPHONE_SE_SIMULATOR_ID=$(shell instruments -s | grep 'iPhone SE (10.3)' | awk '{ print substr($$4, 2, 36) }' | head -n 1) +IPHONE_SE_SIMULATOR_ID=$(shell instruments -s | grep 'iPhone SE (10.3.1)' | awk '{ print substr($$4, 2, 36) }' | head -n 1) all: build archive pack docs From 90b841a83ba6f850d5df94017de0c50002c10974 Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 15:38:41 -0400 Subject: [PATCH 4/6] set the pipefail --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f407181eb..d4ef3beff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_script: fi - date script: -- travis_retry make test +- set -o pipefail; travis_retry make test after_script: - date - security delete-keychain ios-build.keychain From d8ea386be40ad8f5d24ab3911824a1cb2f20a6d9 Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 16:27:43 -0400 Subject: [PATCH 5/6] removing primary key from the migration object --- Kinvey/Kinvey/Migration.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kinvey/Kinvey/Migration.swift b/Kinvey/Kinvey/Migration.swift index 3ab8df444..9ccb3c9d8 100644 --- a/Kinvey/Kinvey/Migration.swift +++ b/Kinvey/Kinvey/Migration.swift @@ -78,7 +78,10 @@ open class Migration: NSObject { if let oldObject = oldObject, let newObject = newObject { let oldDictionary = oldObject.dictionaryWithValues(forKeys: oldProperties) - if let newDictionary = migrationObjectHandler?(oldDictionary) { + if var newDictionary = migrationObjectHandler?(oldDictionary) { + if let primaryKeyProperty = oldObjectSchema.primaryKeyProperty { + newDictionary.removeValue(forKey: primaryKeyProperty.name) + } newObject.setValuesForKeys(newDictionary) } else { self.realmMigration.delete(newObject) From 387ff1c69b9a3c07ce231965d6d46b3108a263d8 Mon Sep 17 00:00:00 2001 From: Victor Barros Date: Mon, 12 Jun 2017 16:50:02 -0400 Subject: [PATCH 6/6] bump version to 3.5.3 --- Kinvey.podspec | 2 +- Kinvey/Kinvey/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kinvey.podspec b/Kinvey.podspec index 0881fb944..00299d6c5 100644 --- a/Kinvey.podspec +++ b/Kinvey.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "Kinvey" - s.version = "3.5.2" + s.version = "3.5.3" s.summary = "Kinvey iOS SDK" # This description is used to generate tags and improve search results. diff --git a/Kinvey/Kinvey/Info.plist b/Kinvey/Kinvey/Info.plist index cb3e1f5fb..d2fe347a0 100644 --- a/Kinvey/Kinvey/Info.plist +++ b/Kinvey/Kinvey/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.5.2 + 3.5.3 CFBundleSignature ???? CFBundleVersion