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 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" 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) 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) 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