Kinvey SDK Download

Version 6.0.0 - Sep 30, 2021
or download the library directly
Download

Changelog

Want to see how the rest of your backend is evolving? Check out the timeline.

6.0.0
- Feb 17, 2022

  • Improvement: Update all dependencies to latest versions with support for Xcode 13 and iOS 15
  • Improvement: Most notably Realm from v3.21.0 to v10.15.1
  • Breaking Change: The designated initializers defined by RLMObject and RealmSwift.Object when inheriting Entity, File, etc. are no longer required and should be removed.
  • Breaking Change: Carthage:
  • Breaking Change: We are using xcframeworks now
  • Breaking Change: SPM:
  • Breaking Change: The Package.swift file was updated to use the exact version of dependencies matching the ones from Cartfile.resolved
  • Breaking Change: The tests related dependencies are removed from Package.swift
  • Bug Fixes: Fix build error on Cocoapods for WatchOS.

6.0.0-rc.1
- Sep 30, 2021

  • Improvement: Update all dependencies to latest versions with support for Xcode 13 and iOS 15. Most notably Realm from v3.21.0 to v10.15.1
  • Breaking Change: The designated initializers defined by RLMObject and RealmSwift.Object when inheriting Entity, File, etc. are no longer required and should be removed.
  • Breaking Change: We are using xcframeworks now for Carthage
  • Breaking Change: The tests related dependencies are removed from Package.swift

5.0.1
- Nov 3, 2020

  • Bugfix: Fix the EntityLimitExceeded error when more than 100 new items are pushed or synced (#384)

5.0.0
- Jul 30, 2020

  • Improvement: Set default API version to 5 (#381)
  • Bugfix: Update dependencies and fix incompatibility with PubNub v4.14.2 (#382)
  • Bugfix: Consistent MultiSaveError behavior (#383)
  • Bugfix: Fix multi insert errors parsing (#381)

4.1.2
- Apr 7, 2020

  • Improvement: Build with ObjectMapper 3.5.2 (#379)
  • Improvement: Codable support for File (#378)

4.1.1
- Oct 31, 2019

  • Bugfix: Allowing query into file metadata. ([#375 ]
  • Bugfix: Fixing multi-client support. (#376 )

4.1.0
- Oct 2, 2019

  • Improvement: Swift Package Manager Support (#302)
  • Bugfix: Missing JSON Content-Type HTTP Header for multi-insert operations. ([#371]
  • Bugfix: Fixed return when an entire batch fails. (#372)
  • Bugfix: Auto DataStore now handling network fails correctly. (#374)

4.0.0
- Sep 11, 2019

  • Breaking Change: To avoid possible rejections by the Apple App Review team, any support for login with MIC using UIWebView was removed. (#370)

3.27.0
- Aug 23, 2019

  • Breaking Change: Minimum version for watchOS is now version 4.0

3.26.1
- Aug 23, 2019

  • Bugfix: Fixing compilation because of PubNub 4.9 (#367)
  • Bugfix: Removing compiler warnings from Realm (#368)
  • Bugfix: Fixing Index for Errors when multiple requests are necessary (#369)
  • Known Bug: Version not available at CocoaPods, please use version 3.27.0

3.26.0
- Jul 11, 2019

  • Improvement: Using Multi-Insert feature for Push when it is available (#363)

3.25.1
- Jul 1, 2019

  • Bugfix: Bugfix for Auto File Store Type (#364)

3.25.0
- May 28, 2019

  • Improvement: Multi-Record Insert allowing to save many items at once using DataStore.save() (#359 #361)

3.24.0
- Apr 29, 2019

  • Improvement: New methods pendingSyncCount(), pendingSyncEntities() and clearSync() to match with other platforms. Auto DataStore tests and changes around it. (#356)
  • Bugfix: Custom Client instance usage for aggregate functions on DataStore (#357)
  • Deprecated: DataStore.syncCount() deprecated in favor of DataStore.pendingSyncCount() (#356)

3.23.0
- Apr 12, 2019

  • Improvement: Support for Xcode 10.2 and Swift 5 (#354) (#355)

3.22.0
- Feb 27, 2019

  • Improvement: Avoid blocking the UI thread when access to cache is required (#350)
  • Improvement: Make Client.userChangedListener public so changes to the logged in user can be listened to (#352)
  • Improvement: Adding new DataStore type .auto that prioritizes network requests and if they fail for network reasons, returns local cache data without calling the callback twice (#337)
  • Deprecated: DataStore type .cache is now deprecated in favor of .auto

3.21.3
- Feb 12, 2019

  • Bugfix: Converting dates in queries to ISO 8601 format (#349)

3.21.2
- Jan 31, 2019

  • Improvement: Allow clearCache() to delete nested objects (#348)
  • Bugfix: Crash when saving objects inside a List (#347)

3.21.1
- Jan 15, 2019

  • Bugfix: Crash on signpost calls (#346)

3.21.0
- Dec 20, 2018

  • Improvement: Allowing to perform queries using KeyPath syntax (#338)
  • Improvement: Cascade Delete performance improvement (#340)
  • Bugfix: Bugfix for $not queries (#339)
  • Bugfix: Crashing during open Realm not allowing recovery (#341 #342)

3.20.4
- Nov 15, 2018

  • Bugfix: GeoPoint Codable Support (#334)
  • Bugfix: Be able to store dates as ISO 8601 strings (#335)
  • Bugfix: Optimize and bugfix for $and queries (#336)

3.20.3
- Nov 1, 2018

  • Bugfix: Prevent multiple calls to initialize client (#333)

3.20.2
- Oct 26, 2018

  • Improvement: Support for Apple Watch Series 4 (#332)
  • Bugfix: Prevent multiple calls to refresh token (#330)

3.20.1
- Oct 18, 2018

  • Improvement: Minor fix and improvement for observe objects (#329)

3.20.0
- Oct 3, 2018

  • Improvement: Adding basic support for command line apps (#324)
  • Improvement: Replace logger library dependency XCGLogger in favor of SwiftyBeaver and OSLog (#325)
  • Improvement: Reduce unused space in the cache file during launch. New optional parameter named compactCacheOnLaunch for the Client.initialize() method with the default value true (#327)
  • Bugfix: Codable support for Social Identities (#323)
  • Bugfix: Bugfix for crash when a non-objc property is set. Please override the User.refresh(anotherUser: refreshCustomProperties:) method in your User subclass if you have non-objc properties in your subclass (#326)

3.19.0
- Sep 21, 2018

  • Improvement: Support for iOS 12 / Swift 4.2 / Xcode 10 (#321)

3.18.5
- Sep 20, 2018

  • Bugfix: Codable support for EmailVerification and PasswordReset metadata objects (#319)
  • Bugfix: Storing refresh token from the correct source (#320)
  • Bugfix: Adding an overload method for the instanceId and encrypted parameters (#322)

3.18.4
- Sep 6, 2018

  • Bugfix: Access to User.encode() changed from public to open (#316)
  • Bugfix: User.refresh() should not update authentication tokens (#317)
  • Bugfix: Large memory consumption during DataStore.pull() calls (#318)

3.18.3
- Aug 24, 2018

  • Improvement: Support for list of primitive values for Codable (314)
  • Bugfix: Cache deletes were doing cascade deletes on objects referenced by other objects (#315)

3.18.2
- Jul 31, 2018

  • Improvement: Support List<T> for Swift.Codable entities (#310)
  • Bugfix: Inconsistent cache results (#312)
  • Bugfix: Crashes related to ThreadSafeReference usage during transactions (#313)
  • Deprecated: DataStore<T>.deltaSet is now deprecated in favor of DataStore<T>.options

3.18.1
- Jul 23, 2018

  • Bugfix: Persist Swift.Codable in cache (#309)
  • Bugfix: Cascade deletes during updates (#306)
  • Breaking Change: The User-to-User Communication flow of Live Service is not supported anymore (#307)

3.18.0
- Jul 12, 2018

  • Improvement: Support for Swift.Codable, which replaces ObjectMapper (#303)
  • Improvement: Throw Error() instead of fatalError() everywhere to allow for recovery (#305)
  • Bugfix: Fixed memory leak in DataStore.removeAll() (#304)
  • Deprecated: ObjectMapper is now deprecated in favor of Swift.Codable
  • Breaking Change: Entity.CodingKeys renamed to Entity.EntityCodingKeys to avoid confusion when subclassing Entity
  • Breaking Change: DataStore<MyEntity>.collection() can now throw errors, so a try is now required, for example: try DataStore<MyEntity>.collection()
  • Breaking Change: Options() constructor can now throw erros, so a try is now required, for example: try Options(timeout: 120)
  • Breaking Change: Custom types used in CustomEndpoint calls now require you to implement the JSONDecodable protocol

3.17.1
- Jun 26, 2018

  • Improvement: Returning support for tvOS on CocoaPods (#299)
  • Improvement: New Error Kinvey.Error.blRuntimeError to handle BL runtime errors (#301)
  • Deprecated: Client.ping(completionHandler:)
  • Deprecated: Push.unRegisterDeviceToken(_:)

3.17.0
- Jun 14, 2018

  • Improvement: Better code coverage (#297)
  • Breaking Change: Deprecations made on or before 3.15.0 are now removed completely. See the complete list of API Differences (#295)
  • Deprecated: Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encrypted:schema:completionHandler:)
  • Deprecated: Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encryptionKey:schema:completionHandler:)
  • Deprecated: CustomEndpoint.CompletionHandler
  • Deprecated: CustomEndpoint.execute(_:params:client:completionHandler:)
  • Deprecated: DataStore.pull(_:deltaSetCompletionHandler:deltaSet:completionHandler:)
  • Deprecated: DataStore.purge(_:completionHandler:)
  • Deprecated: DataStore.push(timeout:completionHandler:)
  • Deprecated: DataStore.sync(_:deltaSetCompletionHandler:deltaSet:completionHandler:)
  • Deprecated: Entity.Key.acl
  • Deprecated: Entity.Key.entityId
  • Deprecated: Entity.Key.metadata
  • Deprecated: FileStore.download(_:storeType:ttl:completionHandler:)
  • Deprecated: FileStore.download(_:ttl:completionHandler:)
  • Deprecated: FileStore.find(_:ttl:completionHandler:)
  • Deprecated: FileStore.refresh(_:ttl:completionHandler:)
  • Deprecated: FileStore.remove(_:completionHandler:)
  • Deprecated: FileStore.upload(_:data:ttl:completionHandler:)
  • Deprecated: FileStore.upload(_:image:imageRepresentation:ttl:completionHandler:)
  • Deprecated: FileStore.upload(_:path:ttl:completionHandler:)
  • Deprecated: FileStore.upload(_:stream:ttl:completionHandler:)
  • Deprecated: Metadata.Key.authtoken
  • Deprecated: Metadata.Key.entityCreationTime
  • Deprecated: Metadata.Key.lastModifiedTime
  • Deprecated: User.PersistableUsernameKey
  • Deprecated: User.changePassword(newPassword:completionHandler:)
  • Deprecated: User.exists(username:client:completionHandler:)
  • Deprecated: User.forgotUsername(email:client:completionHandler:)
  • Deprecated: User.get(userId:client:completionHandler:)
  • Deprecated: User.login(authSource:_:createIfNotExists:authServiceId:client:completionHandler:)
  • Deprecated: User.lookup(_:completionHandler:)
  • Deprecated: User.resetPassword(usernameOrEmail:client:completionHandler:)
  • Deprecated: User.save(newPassword:completionHandler:)
  • Deprecated: User.sendEmailConfirmation(forUsername:client:completionHandler:)
  • Deprecated: User.signup(username:password:user:client:completionHandler:)

3.16.0
- May 31, 2018

  • Improvement: MIC support for the Resource Owner Credentials Grant flow (#290)
  • Improvement: Outdated compiler warnings removed (#291)
  • Bugfix: Use autopaging when Delta Sync is not available (#289)
  • Bugfix: Fix inconsistencies when Delta Sync is enabled and an autopaging request fails (#292)
  • Bugfix: Fix inconsistencies when Delta Sync is enabled and fields is used in the query (#293)
  • Bugfix: Correctly handle OAuth MIC errors in a returned redirect URI (#294)
  • Deprecated: User.login(redirectURI:username:password:). Use User.login(username:password:provider:options:completionHandler:) instead

3.15.0
- May 15, 2018

  • Improvement: X-Kinvey-Device-Info is a new header that includes more information about the device (#282)
  • Improvement: Upgrading PromiseKit to version 6 (#284)
  • Improvement: The client-side Delta Set feature has been replaced by a server-side implementation called Delta Sync (Beta) that offers better performance and scalability (#261, #286, #287)
  • Improvement: Default log level is now .warning (#283)
  • Bugfix: Make the ValidationStrategy work as intended (#285)
  • Bugfix: Canceling DataStore.find() requests not working in some situations (#288)

3.14.0
- Apr 13, 2018

  • Improvement: Send scope parameter to all MIC versions (#273)
  • Improvement: Thread-safe reference observer (#275)
let person: Person = <#...#>
let notificationToken = person.observe { (objectChange: Kinvey.ObjectChange<Person>) in
    switch objectChange {
    case .change(let person):
        print("person object changed")
    case .deleted:
        print("person object deleted")
    case .error(let error):
        print("\(error)")
    }
}

let dataStore = DataStore<Person>.collection(.sync)
let notificationToken = dataStore.observe {
    switch $0 {
        case .initial(let results):
            print("initial results")
        case .update(let results, let deletions, let insertions, let modifications):
            print("dataStore changed")
        case .error(let error):
            print("\(error)")
    }
}
  • Improvement: Allow usage of authServiceID for MIC calls (#277)
  • Improvement: User and Entity now conforms to Hashable and Equatable (#279)
  • Bugfix: DataStore.removeAll() request was wrong (#274)
  • Bugfix: Queries were not translated correctly for non-entity classes, like Acl for example (#278)
  • Bugfix: Live Service messages not coming with strict permissions (#280)

3.13.0
- Mar 15, 2018

  • Improvement: DataStore instances are not cached anymore allowing multiple configurations for the same DataStore (#272)
  • Improvement: HTTP header User-Agent now includes the Swift version (#270)
  • Improvement: Client instances can now be created using instanceID (#267)
Kinvey.sharedClient.initialize(appKey: "myAppKey", appSecret: "myAppSecret", instanceId: "my-instance-id") {
    switch $0 {
        case .success(let user):
            print("\(user?.userId ?? "nil")")
        case .failure(let error):
            print("\(error)")
    }
}
  • Bugfix: Memory consumption fixed for DataStore<T>.find() calls (#268)
  • Bugfix: FileStore now returns the proper result types for sync wait calls (#266)
  • Bugfix: User lockdowns now is fully supported automatically logging out users in lockdown state (#265)
  • Breaking Change: Client.timeout is now a shortcut for Client.options.timeout (#271)
  • Breaking Change: Default MIC API Version is now v3 (#269)

3.12.2
- Feb 12, 2018

  • Improvement: Adding Options for Client (#264)
  • Bugfix: Bugfix for property mapping in nested objects (#260)
  • Bugfix: Bugfix removing the internal usage of Thread.threadDictionary to avoid memory leaks (#263)

3.12.1
- Jan 24, 2018

  • Bugfix: Memory leak fixed around object mapping. (#262)

3.12.0
- Jan 12, 2018

  • Improvement: Make the page size adjustable for auto pagination. (#259)
  • Improvement: Removing warnings for Swift 4 and above. (#256)
  • Bugfix: Find by ID must return Error.entityNotFound error when no entity was found. (#257)

3.11.0
- Nov 21, 2017

  • Improvement: Upgrade dependencies to Realm 3.x, ObjectMapper 3.x and XCGLogger 6.x.
  • Bugfix: User.socialIdentity was not being persisted. (#255)

3.10.1
- Nov 8, 2017

  • Bugfix: Binary compatibility for Xcode 9.1 / Swift 4.0.2

3.10.0
- Oct 25, 2017

  • Improvement: New enumeration added: ValidationStrategy. A ValidationStrategy allows you to validate data from the backend before it is parsed into your client-side model. You can choose from predefined options: .all, .randomSample(percentage:) or define your own strategy with .custom(validationBlock: (Array<Dictionary<String, Any>>) -> Swift.Error?). By default, the SDK does not validate individual entities before they are parsed. Please see Reference Docs for details on using ValidationStrategy. (#248)
let dataStore = DataStore<Person>.collection(.network, validationStrategy: .all)

3.9.1
- Oct 18, 2017

  • Bugfix: Transforms were being ignored when saving objects that requires transformations, such as Date objects for example (#250)

3.9.0
- Oct 3, 2017

  • Improvement: Better Support for Xcode 9 and Swift 4.0 while keeps support for Swift 3.2 (#245)
  • Improvement: FileStore.create() creates a file entry in the server so the fileId can be used to perform resumable uploads (#239)
  • Improvement: Allow custom URLSession for each call using Options (#244)
  • Improvement: Support for SFAuthenticationSession for iOS 11, otherwise use SFSafariViewController (#246)
  • Bugfix: Register for push notifications not being called in main thread (#240)
  • Bugfix: Infinite loop if they keyword dynamic not being used in the property declaration on Entity subclasses (#243)
  • Bugfix: DataStore.syncCount() and DataStore.sync() considering entities that are not the generic class specified on DataStore (#247)

3.8.0
- Sep 13, 2017

  • Improvement: Make explicit that _id is required (#234)
  • Improvement: New Feature: DataStore<T>.collection(autoPagination: true) enables auto pagination, so no need to do it manually. This feature is disabled by default, so DataStore<T>.collection() means DataStore<T>.collection(autoPagination: false) (#231)
  • Improvement: User.logout() is now async since it performs a network request to invalidate the token in the backend (#237)
  • Bugfix: File.mapping() was not open (#233)
  • Bugfix: During save() the cache implementation now performs deletes on nested objects (#229)
  • Bugfix: Cache path on macOS was ~/Documents/<kinvey app key>, but should be ~/Library/Application Support/<bundle id>/<kinvey app key> (#236)
  • Breaking Change: The clientId parameter was renamed to authServiceId in User.presentMICViewController(), User.login() and Options() (#238)
  • Breaking Change: Now Kinvey.Error.unauthorized also includes a debug property. So now a switch case should look like case .unauthorized(let httpResponse, let data, let error, let debug, let description): (#235)

3.7.1
- Aug 26, 2017

3.7.0
- Aug 18, 2017

  • Improvement: Better performance and lower memory consumption by overloading the methods find(), pull() and sync() that now has a Result<AnyRandomAccessCollection<T>, Swift.Error> as the result for the completion handler.

3.6.1
- Jul 20, 2017

  • Improvement: Better support for tvOS, watchOS and macOS
  • Improvement: Minor fix for reference documentation on DataStore.count()

3.6.0
- Jul 17, 2017

  • Improvement: Better reference documentation
  • Improvement: pull() has now a new (optional) parameter called deltaSetCompletionHandler which is a completion block that returns only the results that have changed during the delta set computation. The regular completionHandler parameter will continue to return all the results (including the unchanged results)
  • Improvement: New struct Options is introduced to hold custom optional values such as client, clientId, ttl, deltaSet, readPolicy, writePolicy, timeout, clientAppVersion and customRequestProperties. Maybe more to be added in the future.
  • Bugfix: count() were not translating queries when alias were used
  • Bugfix: Crashing when an error was returned from the backend but with an empty body
  • Deprecated: All methods in the DataStore class that takes a Client instance, ReadPolicy, WritePolicy, deltaSet and timeout values as optional parameters are now deprecated in favor of the Options new struct.
  • Breaking Change: Client.clientAppVersion and Client.customRequestProperties were removed in favor of Client.options which contains both clientAppVersion and customRequestProperties.

3.5.4
- Jun 23, 2017

  • Improvement: Live Service is now EA (Early Adopter) for our Swift SDK. Please check our Live Service documentation
  • Bugfix: User.refresh() was losing authentication
  • Bugfix: Query objects with values containing the character + were causing a wrong URL encoding

3.5.3
- Jun 12, 2017

  • Bugfix: Compilation errors after ObjectMapper 2.2.7 Release

3.5.2
- Jun 5, 2017

  • Improvement: Files are now able to have custom properties subclassing the File class and specifying when create your FileStore instance, for example: let fileStore = FileStore<MyFileSubclass>()
  • Improvement: Push.unRegisterDeviceToken() now returns an error instead of crash if the device token was not found
  • Improvement: Support for MIC authentication service selection using the clientId parameter when called MIC.urlForLogin() or User.presentMICViewController()
  • Bugfix: Query using dates were being misconstructed when sent to the backend
  • Deprecated: FileStore.getInstance() in favor of the usage of constructors FileStore<File>()
  • Deprecated: Global constants PersistableIdKey, PersistableAclKey and PersistableMetadataKey in favor of Entity.Key.entityId, Entity.Key.acl and Entity.Key.metadata respectively
  • Deprecated: Metadata.LmtKey, Metadata.EctKey and Metadata.AuthTokenKey in favor of Metadata.Key.lastModifiedTime, Metadata.Key.entityCreationTime and Metadata.Key.authToken respectively

3.5.1
- May 2, 2017

  • Bugfix: User.socialIdentity properties were not public
  • Bugfix: User custom type was not properly loaded after a relaunch

3.5.0
- Apr 21, 2017

  • Improvement: Client class now have a new method ping() to test if the client was initialized correctly.
Kinvey.sharedClient.ping() { (result: Result<EnvironmentInfo, Swift.Error>) in
    switch result {
    case .success(let envInfo):
        //succeed
    case .failure(let error):
        //failed
    }
}
  • Improvement: DataStore.group() is a set of new methods that allows group / aggregation functions. You can write your own reduce function using JavaScript or use pre-defined functions like count, sum, avg (average), min (minimum) and max (maximum).
dataStore.group(keys: ["country"], avg: "age") { (result: Result<[AggregationAvgResult<Person, Int>], Swift.Error>) in
    switch result {
    case .success(let array):
        //succeed
    case .failure(let error):
        //failed
    }
}
  • Improvement: a new method User.refresh() will reload the user's data. Also applies for Client.activeUser which will refresh and persist the new user's data.
Kinvey.sharedClient.activeUser?.refresh() { result in
    switch result {
    case .success:
        //succeed
    case .failure(let error):
        //failed
    }
}
  • Improvement: a new pattern for all completionHandlers in the library was introduced. All methods containing completionHandlers has now overloaded versions which returns a Result<SuccessType, FailureType> instance where you can use a switch statement to figure if the call succeed (case .success(let successObject):) or failed (case .failure(let error):)

  • Bugfix: User.lookup() now returns the correct User type if a custom user type was set.

  • Breaking Change: User.destroy(), User.sendEmailConfirmation(), User.resetPassword() and User.forgotUsername() were changed to have the completionHandler block following the Result enumeration pattern described above.

user.sendEmailConfirmation() { result in
    switch result {
    case .success:
        //succeed
    case .failure:
        //failed
    }
}

3.4.0
- Apr 3, 2017

  • Improvement: Support for Swift 3.1 / Xcode 8.3
  • Improvement: Better support for upload data from an input stream
  • Improvement: Better performance for DataStore.push() and DataStore.sync()
  • Improvement: Device token is now deleted on the device after call Push.unRegisterDeviceToken()
  • Improvement: Added a new Error case for situations when there's some missing configuration in the console
  • Bugfix: Local query crashing when a field was not found on entity
  • Bugfix: User credentials lost after upgrade to a newer version of the SDK. Versions affected: 3.3.8 and 3.3.9
  • Deprecated: DataStore.removeById() method is now deprecated

3.3.9
- Mar 10, 2017

  • Bugfix: crash when trying to upload a file with a pre-defined fileId
  • Bugfix: crash when a protocol marked as @objc is used inside of an Entity subclass
  • Bugfix: warning about pending promises being deallocated while using FileStore
  • Deprecated: FileStore.download(_ file: inout File) is now deprecated. Please use FileStore.download(_ file: File). The download method does not require you to pass the file reference anymore.

3.3.8
- Feb 14, 2017

  • Bug fix: Acl and Metadata fixed for File objects
  • Improvement: add support for geolocation queries. You should now use GeoPoint class to store geolocation coordinates (latitude, longitude)
class Vehicle: Entity {

    dynamic var name: String?
    dynamic var geolocation: GeoPoint?

    override class func collectionName() -> String {
        return "Vehicle"
    }

    override func propertyMapping(_ map: Map) {
        super.propertyMapping(map)

        name <- ("name", map["name"])
        geolocation <- ("geolocation", map["geolocation"])
    }
}

let deliveryTruck = Person()
deliveryTruck.name = "Package Delivery Truck"
deliveryTruck.geolocation = GeoPoint(latitude: 42.3133521, longitude: -71.1271963)
  • Improvement: add support for mapping list of String, Int, Float, Double and Bool
import Kinvey

class Book: Entity {

    dynamic var title: String?
    let authorNames = List<StringValue>()

    override class func collectionName() -> String {
        return "Book"
    }

    override func propertyMapping(_ map: Map) {
        super.propertyMapping(map)

        title <- ("title", map["title"])
        authorNames <- ("authorNames", map["authorNames"])
    }

}

let book = Book()
book.title = "Swift for the win!"
book.authorNames.append("Victor Barros")

3.3.7
- Jan 31, 2017

  • Improvement: Kinvey.Error objects now conforms to LocalizedError
  • Improvement: Legacy code from version 1.x is now completely removed
  • Bug fix: MIC was not refreshing the authentication token

3.3.6
- Jan 11, 2017

  • Improvement: CustomEndpoint now supports arrays and custom types
  • Bug fix: Updates of existing objects causing a crash
  • Bug fix: KinveyDateTransform missing a public constructor
  • Bug fix: incorrect access modifiers on UserMetadata properties
  • Bug fix: crash on FileStore.getInstance() if invoked before the creation of a DataStore instance
  • Deploy fix: zip distribution of SDK was missing XCGLogger 3rd party library

3.2.6
- Jan 11, 2017

  • Bug fix: KinveyDateTransform missing a public constructor
  • Bug fix: UserMetadata properties without a public access

3.3.5
- Dec 19, 2016

  • Improvement: throw an error if super.propertyMapping() was not called inside of the propertyMapping() method for a Entity subclass
  • Improvement: logging is now done by a 3rd party library called XCGLogger.
  • Improvement: Push now supports the new Push API in iOS 10. A new method was added for apps to register for push: Push.registerForNotifications() (all parameters optional). The previous method Push.registerForPush() is now deprecated for iOS 10 and above.
Kinvey.sharedClient.push.registerForNotifications { granted, error in
    if granted {
        //registered successfully
    } else {
        //failed to register
    }
}

3.2.5
- Dec 19, 2016

  • Bug fix: User object nil after MIC login succeeds

3.3.4
- Dec 8, 2016

  • Improvement: Kinvey.Error now implements CustomStringConvertible and CustomDebugStringConvertible which means you can now print() and debugPrint() errors. Also, errors now have the httpResponse and data properties, which allows you to check http status codes and the response body.
  • Deprecation: class method User.resetPassword(email:) and User.resetPassword(username:) are now deprecated. Please use the class method User.resetPassword(usernameOrEmail:) instead.
  • Bug fix: Fix for CocoaPods and Carthage.
  • Bug fix: Temporary _ids values are being sent to the backend.
  • Bug fix: If a migration schema block is not provided, the local cache is deleted on a schema mismatch between versions.
  • Bug fix: Progress not being reported if the Content-Length header was not present in the response.

3.2.4
- Dec 8, 2016

  • Improvement: Kinvey.Error now implements CustomStringConvertible and CustomDebugStringConvertible which means you can now print() and debugPrint() errors. Also errors now also have the httpResponse and data properties allowing you to check things like http status codes and the response body for example.

3.3.3
- Nov 21, 2016

  • Improvement: adding custom fields during sign up.
client.userType = MyUser.self

let user = MyUser()
user.foo = "bar"
User.signup(user: user) { user, error in
    if let user = user {
        //success
    } else {
        //failure
    }
}
  • Bug fix: updated the following request headers -
    • User-Agent
    • X-Kinvey-Client-App-Version
    • X-Kinvey-Device-Information
  • Enhancement: New API added for the developer to set an app version. This value is sent to the backend as the X-Kinvey-Client-App-Version request header.
Kinvey.sharedClient.clientAppVersion = "1.0.0"
  • Bug fix: migration schema not being executed is now fixed. If you made changes to your entity classes, make sure that you increase the schema version and provide a migration block as shown below:
// Version 1
class Person: Entity {

    dynamic var firstName: String?
    dynamic var lastName: String?

    override class func collectionName() -> String {
        return "Person"
    }

    override func propertyMapping(_ map: Map) {
        super.propertyMapping(map)

        firstName <- map["firstName"]
        lastName <- map["lastName"]
    }

}

// Version 2
class Person: Entity {

    dynamic var fullName: String?

    override class func collectionName() -> String {
        return "Person"
    }

    override func propertyMapping(_ map: Map) {
        super.propertyMapping(map)

        fullName <- map["fullName"]
    }

}

// Migrating your data during client initialization
Kinvey.sharedClient.initialize(appKey: "<#appKey#>", appSecret: "<#appSecret#>", schemaVersion: 2) { migration, oldSchemaVersion in
    migration.execute(Person.self) { (oldEntity) in
        var newEntity = oldEntity
        if oldSchemaVersion < 2 {
            newEntity["fullName"] = "\(oldEntity["firstName"]!) \(oldEntity["lastName"]!)"
            newEntity.removeValue(forKey: "firstName")
            newEntity.removeValue(forKey: "lastName")
        }

        return newEntity
    }
}

3.2.3
- Nov 21, 2016

  • Same changes presented in the 3.3.3 version, but for projects using Swift 2.3

3.3.2
- Oct 28, 2016

  • Support for Xcode 8.1 and Swift 3.0.1
  • Minimum iOS version is now iOS 9
  • Improvement: User.presentMICViewController() now uses SFSafariViewController as the default option to login using MIC. To explore other options add the parameter micUserInterface using one of the options in the MICUserInterface enum.
User.presentMICViewController(redirectURI: URL(string: "<#myRedirectURL://#>")!) { (user, error) -> Void in
    if let user = user {
        self.userIdLabel.text = user.userId
    }
    self.completionHandler?(user, error)
}

If you are using the default .safari option for the micUserInterface, remember to add the code below in your app delegate.

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    if User.login(redirectURI: URL(string: "<#myRedirectURL://#>")!, micURL: url) {
        return true
    }

    return false
}

3.2.2
- Oct 28, 2016

  • Minimum iOS version is now iOS 9
  • Improvement: User.presentMICViewController() now uses SFSafariViewController as the default option to login using MIC. To explore other options add the parameter micUserInterface using one of the options in the MICUserInterface enum.
User.presentMICViewController(redirectURI: NSURL(string: "<#myRedirectURL://#>")!) { (user, error) -> Void in
    if let user = user {
        self.userIdLabel.text = user.userId
    }
    self.completionHandler?(user, error)
}

If you are using the default .Safari option for the micUserInterface, remember to add the code below in your app delegate.

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
    if User.login(redirectURI: NSURL(string: "<#myRedirectURL://#>")!, micURL: url) {
        return true
    }

    return false
}

3.3.1
- Oct 20, 2016

  • Fix for CocoaPods

3.2.1
- Oct 21, 2016

  • Fix for CocoaPods

3.3.0
- Sep 15, 2016

  • Support for Swift 3 and Xcode 8

  • This version of the SDK requires Swift 3 and XCode 8 (or above).

  • Known issue: several Kinvey app developers have reported seeing a Keychain issue when the app logs in a user on iOS 10 Simulator. The error message looks like the following: Terminating app due to uncaught exception 'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)' This is a known issue with the iOS 10 simulator. To work around it, you can share the keychain.

3.2.0
- Sep 14, 2016

  • Support for Swift 2.3 and Xcode 8

  • This version of the SDK requires Swift 2.3 and XCode 8 (or above). If you are using Swift 2.2, please refer to the SDK release 3.1.x.

3.1.0
- Sep 12, 2016

  • Bug fix: Regular expressions for Query objects not working properly

3.0.25
- Aug 25, 2016

  • Improvement: Upload, download and a few DataStore operations like find() and pull() can now report progress of the request
let request = store.find() { (events, error) in
    //completion handler
}

request.progress = {
    //progress handler
    print("Progress: \($0.countOfBytesReceived)/\($0.countOfBytesExpectedToReceive)")
}
  • Improvement: New method DataStore.count() returns the total number of records in a colletion.
let store = DataStore<Event>.collection(.Network)
store.count { (count, error) in
    //completion handler
}
  • Improvement: Query now supports skip and limit modifiers, enabling support for pagination.
let query = Query {
    $0.skip = 10
    $0.limit = 50
}

store.find(query) {
    //it will get max of 50 results starting from the 11th record
}
User.loginWithAuthorization(redirectURI: "myRedirectURI://", username: "myUsername", password: "myPassword") { user, error in
    if (user != nil) {
        //logged in successfully
    } else if (error != nil) {
        //something went wrong if the error object is not nil
    } else {
        //should never happen!
    }
}
  • Bug fix: find() operations returning wrong results for StoreType.Network

3.0.24
- Aug 12, 2016

  • Improvement: Forgot username method is now available:
User.forgotUsername(email: "your@email.com") { error in
}
  • Improvement: User lookup method is now available:
let userQuery = UserQuery {
    $0.username = username
}
user.lookup(userQuery) { users, error in
}
  • Improvement: Files are now cached by default:
let file: File = ...
fileStore.download(file) { (file, url: NSURL?, error) in
    //file is now cached
}

With an optional parameter to not cache the downloaded files:

let file: File = ...
fileStore.download(file, storeType: .Network) { (file, url: NSURL?, error) in
    //file is not cached
}
  • Improvement: MIC API Version is not available:
client.micApiVersion = "v2" //v1 is the default value
  • Improvement: Better errro handling returning more appropriate error types
  • Bugfix: deltaSet parameter was not being considered for sync operations
  • Bugfix: custom User types are not working correctly
  • Bugfix: DeltaSet requests being wrongly built
  • Bugfix: Pull requests are now consistent between platforms

3.0.23
- Jul 18, 2016

  • Fixing dependencies for CocoaPods spec.

3.0.22
- Jul 15, 2016

  • API breaking changes:
    • Object Mapping has changed: Please check out our Data Store Guide how to do object mapping now.
    • Method renaming: To get an instance of DataStore you now have to call the collection() method instead of getInstance()
  • Improvement: Change user's password
let user: User = ...
user.changePassword(newPassword: "myNewPassword") { user, error in
}
  • Improvement: Send user's email verification
let user: User = ...
user.sendEmailConfirmation { error in
}
  • Improvement: Social login for Facebook, Twitter, Google+ and LinkedIn
User.login(authSource: .Facebook, facebookAuthDictionary) { user, error in
}

3.0.21 Beta
- Jun 21, 2016

  • Improvement: Added support for push(), pull(), sync() and purge() operations on DataStoreType.Cache
  • Improvement: DataStore.syncCount() method added
  • Improvement: Client.logNetworkEnabled enables the ability of log network requests and responses. Default value is false
Kinvey.sharedClient.logNetworkEnabled = true //it will start log network requests and responses
  • Improvement: Better error handling checking pre-required conditions
  • Bugfix: not crashing for non-supported types and support for NSCoding objects, more support types to come

3.0.20 Beta
- May 24, 2016

  • Bug fix: Login with MIC sending wrong authorization headers.

3.0.19 Beta
- May 20, 2016

  • Support for split the local cache data in multiple files using tags. For example: DataStore<MyCollection>.getInstance(.Network, tag: "MyCustomDataContainer")

3.0.18 Beta
- May 19, 2016

  • Acl now includes readers and writers permissions.
  • Error now includes a localized description error. Available only in English for now.
  • FileStore now supports resumable uploads and downloads.
  • Delta Set Cache is not enabled by default anymore. To enable Delta Set Cache now you can call something like DataStore<MyCollection>.getInstance(.Network, deltaSet: true)
  • Bug fix: Login with MIC when the user does not exists yet.

3.0.17 Beta
- Apr 28, 2016

  • Bug fix: returning wrong results when there's an empty DataStore with delta set cache enabled.

3.0.16 Beta
- Apr 27, 2016

  • Allow encryption on your local DataStores
  • Better handling for push() method
  • Bug fix: returning wrong results when there's no change in a DataStore with delta set cache enabled.

3.0.15 Beta
- Apr 21, 2016

  • Performance improvements on delta set caching
  • Bug fix: allow custom serialize and deserialize Persistable objects using fromJson() and toJson() methods

3.0.14 Beta
- Apr 18, 2016

  • Add support for custom endpoints
  • Allow custom file path for DataStore
let store = DataStore<MyPersistableClass>.getInstance(filePath: customPath)
  • Bug fixes
    • Logout User
    • ACL as a mandatory field
    • Register for Push

3.0.13 Beta
- Mar 22, 2016

  • Bug fixes
  • Xcode 7.3 and Swift 2.2 ready

3.0.11 Beta
- Mar 21, 2016

  • Delta Set Cache implemented
  • Bug fixes

3.0.7 Beta
- Mar 2, 2016

  • Universal binary Framework available
  • Bug fixes:
    • Purge, push and sync reviewed
    • Metadata entities removed when related entities are removed
    • Some queries causing crashes

3.0 Beta
- Feb 25, 2016

The beta version of the iOS 3.0 SDK is now available!

New in this release:

  • Full support for data synchronization between your app and backend. Refer to the Data Store Guide to learn how to use the new data manipulation APIs.

  • We've simplified data stores and caching policies, making it easier for you to start building apps with caching and offline built in.

  • The Kinvey framework is now a published as a module.

Code samples and API docs for Objective-C are coming soon.

Download Older Versions

We recommend using the latest version.

Version Download Date
6.0.0 Download Feb 17, 2022
6.0.0-rc.1 Download Sep 30, 2021
5.0.1 Download Nov 3, 2020
5.0.0 Download Jul 30, 2020
4.1.2 Download Apr 7, 2020
4.1.1 Download Oct 31, 2019
4.1.0 Download Oct 2, 2019
4.0.0 Download Sep 11, 2019
3.27.0 Download Aug 23, 2019
3.26.1 Download Aug 23, 2019
3.26.0 Download Jul 11, 2019
3.25.1 Download Jul 1, 2019
3.25.0 Download May 28, 2019
3.24.0 Download Apr 29, 2019
3.23.0 Download Apr 12, 2019
3.22.0 Download Feb 27, 2019
3.21.3 Download Feb 12, 2019
3.21.2 Download Jan 31, 2019
3.21.1 Download Jan 15, 2019
3.21.0 Download Dec 20, 2018
3.20.4 Download Nov 15, 2018
3.20.3 Download Nov 1, 2018
3.20.2 Download Oct 26, 2018
3.20.1 Download Oct 18, 2018
3.20.0 Download Oct 3, 2018
3.19.0 Download Sep 21, 2018
3.18.5 Download Sep 20, 2018
3.18.4 Download Sep 6, 2018
3.18.3 Download Aug 24, 2018
3.18.2 Download Jul 31, 2018
3.18.1 Download Jul 23, 2018
3.18.0 Download Jul 12, 2018
3.17.1 Download Jun 26, 2018
3.17.0 Download Jun 14, 2018
3.16.0 Download May 31, 2018
3.15.0 Download May 15, 2018
3.14.0 Download Apr 13, 2018
3.13.0 Download Mar 15, 2018
3.12.2 Download Feb 12, 2018
3.12.1 Download Jan 24, 2018
3.12.0 Download Jan 12, 2018
3.11.0 Download Nov 21, 2017
3.10.1 Download Nov 8, 2017
3.10.0 Download Oct 25, 2017
3.9.1 Download Oct 18, 2017
3.9.0 Download Oct 3, 2017
3.8.0 Download Sep 13, 2017
3.7.1 Download Aug 26, 2017
3.7.0 Download Aug 18, 2017
3.6.1 Download Jul 20, 2017
3.6.0 Download Jul 17, 2017
3.5.4 Download Jun 23, 2017
3.5.3 Download Jun 12, 2017
3.5.2 Download Jun 5, 2017
3.5.1 Download May 2, 2017
3.5.0 Download Apr 21, 2017
3.4.0 Download Apr 3, 2017
3.3.9 Download Mar 10, 2017
3.3.8 Download Feb 14, 2017
3.3.7 Download Jan 31, 2017
3.3.6 Download Jan 11, 2017
3.2.6 Download Jan 11, 2017
3.3.5 Download Dec 19, 2016
3.2.5 Download Dec 19, 2016
3.3.4 Download Dec 8, 2016
3.2.4 Download Dec 8, 2016
3.3.3 Download Nov 21, 2016
3.2.3 Download Nov 21, 2016
3.3.2 Download Oct 28, 2016
3.2.2 Download Oct 28, 2016
3.3.1 Download Oct 20, 2016
3.2.1 Download Oct 21, 2016
3.3.0 Download Sep 15, 2016
3.2.0 Download Sep 14, 2016
3.1.0 Download Sep 12, 2016
3.0.25 Download Aug 25, 2016
3.0.24 Download Aug 12, 2016
3.0.23 Download Jul 18, 2016
3.0.22 Download Jul 15, 2016
3.0.21 Beta Download Jun 21, 2016
3.0.20 Beta Download May 24, 2016
3.0.19 Beta Download May 20, 2016
3.0.18 Beta Download May 19, 2016
3.0.17 Beta Download Apr 28, 2016
3.0.16 Beta Download Apr 27, 2016
3.0.15 Beta Download Apr 21, 2016
3.0.14 Beta Download Apr 18, 2016
3.0.13 Beta Download Mar 22, 2016
3.0.11 Beta Download Mar 21, 2016
3.0.7 Beta Download Mar 2, 2016
3.0 Beta Download Feb 25, 2016