Swiftpack.co - Package - Kinvey/swift-sdk

Kinvey iOS SDK

badge-pod badge-languages badge-pms badge-platforms badge-status badge-coverage

The Kinvey iOS SDK is a package that can be used to develop iOS applications on the Kinvey platform. Refer to the Kinvey DevCenter for documentation on using Kinvey.

In the version 3 of the library, all new code is written in Swift and any application using v3 must also use Swift to access the API.

While we transition from Objective C to the latest Swift versions, we will use the following branching scheme. Please, pick the right version of our library depending of which langugage / version you are using:

| Language / Version | Kinvey SDK Version | Development Branch | | ------------------ | ------------------ | --------------- | | Swift 3 and Swift 4 | 3.3.0 and above | master | | Swift 2.3 | 3.2.x | 3.2 | | Objective-C | 1.x | 1.x |

Note:

  • The master branch represents the latest release of the SDK. See the CONTRIBUTING guidelines for details on submitting code.
  • On version 1.x, use the KinveyKit workspace. On all other versions, use the Kinvey workspace.

Building

You will need Carthage, Jazzy and Xcode command line tools installed to be able to build the SDK.

  • carthage build: build the dependencies frameworks using Carthage
  • make: runs a script that compile and generate the documentation files using Jazzy

Testing

Use Xcode to run the unit tests.

  • Open the file Kinvey.xcworkspace in Xcode
  • Select the Kinvey scheme
  • Select the menu item Product -> Test or press Command+U

Or run the command line:

make test

Important Note: adding the environment variables KINVEY_APP_KEY, KINVEY_APP_SECRET and KINVEY_MIC_APP_KEY will allow you to run the tests against a real Kinvey environment.

Releasing

We use GitFlow workflow for better management.

The workflow for releasing a new version of the SDK is as follows:

  1. Merge all waiting pull requests / feature branches on the develop branch.
  2. Bump the version running make set-version on the develop branch.
  3. Checkout the master branch and merge the develop branch.
  4. Tag the version with git.
  5. Push all changes.
  6. Upload the zip file containing all the binary files for Amazon AWS.
  7. Run make deploy-cocoapods in order to publish the new release for CocoaPods
  8. Publish release notes, API Reference Docs, and the Download section in the DevCenter repo.
  9. Push all changes to deploy.
  10. Send the email with the release notes for the Customer Service and Development team

Version Management

Updating the sdk version should follow Semantic Version 2.0.0:

  • Major (x.0.0): when making an incompatible API changes.
  • Minor (3.x.0): when adding functionality in a backwards-compatible manner.
  • Patch (3.0.x): when making backwards-compatible bug fixes or enhancements.

License

See LICENSE for details.

Contributing

See CONTRIBUTING.md for details on reporting bugs and making contributions.

Github

link
Stars: 3

Used By

Total: 0

Releases

4.1.1 - 2019-10-31 19:02:33

Improvements

  • None

Bugfixes

  • Allowing query into file metadata. ([#375 ] (https://github.com/Kinvey/swift-sdk/pull/375))
  • Fixing multi-client support. (#376 )

Deprecated

  • None

Breaking Changes

  • None

4.1.0 - 2019-10-03 01:07:47

Improvements

  • Swift Package Manager Support (#302)

Bugfixes

  • Missing JSON Content-Type HTTP Header for multi-insert operations. ([#371] (https://github.com/Kinvey/swift-sdk/pull/371))
  • Fixed return when an entire batch fails. (#372)
  • Auto DataStore now handling network fails correctly. (#374)

Deprecated

  • None

Breaking Changes

  • None

4.0.0 - 2019-09-11 23:19:42

Improvements

  • None

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

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

3.27.0 - 2019-08-23 18:49:17

Improvements

  • None

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • Minimum version for watchOS is now version 4.0

3.26.1 - 2019-08-23 17:10:41

Improvements

  • None

Bugfixes

  • Fixing compilation because of PubNub 4.9 (#367)
  • Removing compiler warnings from Realm (#368)
  • Fixing Index for Errors when multiple requests are necessary (#369)

Deprecated

  • None

Breaking Changes

  • None

Known Bugs

  • Version not available at CocoaPods, please use version 3.27.0

3.26.0 - 2019-07-11 19:25:37

Improvements

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

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • None

3.25.1 - 2019-07-01 18:29:46

Improvements

  • None

Bugfixes

  • Bugfix for Auto File Store Type (#364)

Deprecated

  • None

Breaking Changes

  • None

3.25.0 - 2019-05-28 22:02:46

Improvements

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

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • None

3.24.0 - 2019-04-29 17:08:09

Improvements

  • New methods pendingSyncCount(), pendingSyncEntities() and clearSync() to match with other platforms. Auto DataStore tests and changes around it. (#356)

Bugfixes

  • Custom Client instance usage for aggregate functions on DataStore (#357)

Deprecated

  • DataStore.syncCount() deprecated in favor of DataStore.pendingSyncCount() (#356)

Breaking Changes

  • None

3.23.0 - 2019-04-12 19:33:30

Improvements

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

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • None

3.22.0 - 2019-02-27 23:24:21

Improvements

  • Avoiding block the UI thread when access to cache is required (#350)
  • Make Client.userChangedListener public so changes to the logged user can be listen (#352)
  • Adding new DataStore type .auto, which prioritize network requests first and, if fails for network reasons, returns local cache data without call the callback twice (#337)

Bugfixes

  • None

Deprecated

  • DataStore type .cache is now deprecated in favor of .auto

Breaking Changes

  • None

3.21.3 - 2019-02-13 06:23:59

Improvements

  • None

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None

3.21.2 - 2019-01-31 19:13:10

Improvements

  • Allow clearCache() to delete nested objects (#348)

Bugfixes

  • Crash when saving objects inside a List (#347)

Deprecated

  • None

Breaking Changes

  • None

3.21.1 - 2019-01-15 17:47:09

Improvements

  • None

Bugfixes

  • Bugfix crash on signpost calls (#346)

Deprecated

  • None

Breaking Changes

  • None

3.21.0 - 2018-12-20 18:10:02

Improvements

  • Allowing perform queries using KeyPath syntax (#338)
  • Cascade Delete performance improvement (#340)

Bugfixes

  • Bugfix for $not queries (#339)
  • Crashing during open Realm not allowing recovery (#341 #342)

Deprecated

  • None

Breaking Changes

  • None

3.20.4 - 2018-11-15 15:29:00

Improvements

  • None

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None

3.20.3 - 2018-11-01 18:41:48

Improvements

  • None

Bugfixes

  • Prevent multiple calls to initialize client (#333)

Deprecated

  • None

Breaking Changes

  • None

3.20.2 - 2018-10-26 16:00:12

Improvements

  • Support for Apple Watch Series 4 (#332)

Bugfixes

  • Prevent multiple calls to refresh token (#330)

Deprecated

  • None

Breaking Changes

  • None

3.20.1 - 2018-10-18 22:58:55

Improvements

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

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • None

3.20.0 - 2018-10-03 22:01:05

Improvements

  • Adding basic support for command line apps (#324)
  • Replace logger library dependency XCGLogger in favor of SwiftyBeaver and OSLog (#325)
  • 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)

Bugfixes

  • Codable support for Social Identities (#323)
  • 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)

Deprecated

  • None

Breaking Changes

  • None

3.19.0 - 2018-09-21 17:14:56

Improvements

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

Bugfixes

  • None

Deprecated

  • None

Breaking Changes

  • None

3.18.5 - 2018-09-20 20:00:09

Improvements

  • None

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None

3.18.4 - 2018-09-06 19:11:22

Improvements

  • None

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None

3.18.3 - 2018-08-24 23:45:58

Improvements

  • Support for list of primitive values for Codable (314)

Bugfixes

  • Cache deletes were doing cascade deletes on objects referenced by other objects (#315)

Deprecated

  • None

Breaking Changes

  • None

3.18.2 - 2018-08-01 01:16:47

Improvements

  • Support List<T> for Swift.Codable entities (#310)

Bugfixes

  • Inconsistent cache results bugfix (#312)
  • Bugfix for crashes related to ThreadSafeReference usage during transactions (#313)

Deprecated

  • DataStore<T>.deltaSet is now deprecated. Please use DataStore<T>.options instead

Breaking Changes

  • None

3.18.1 - 2018-07-23 20:04:38

Improvements

  • None

Bugfixes

  • Bugfix to persist Swift.Codable in cache (#309)
  • Bugfix for cascade deletes during updates (#306)

Deprecated

  • None

Breaking Changes

  • P2P Live Stream is not support any more (#307)

3.18.0 - 2018-07-12 17:58:09

Improvements

Bugfixes

  • Fixed memory leak in DataStore.removeAll() (#304)

Deprecated

  • ObjectMapper is now deprecated in favor of Swift.Codable

Breaking Changes

  • Entity.CodingKeys renamed to Entity.EntityCodingKeys to avoid confusions when subclassing Entity
  • DataStore<MyEntity>.collection() now can throw errors, so a try is now required, for example: try DataStore<MyEntity>.collection()
  • Options() constructor now can throw erros, so a try is now required, for example: try Options(timeout: 120)
  • Custom types used in CustomEndpoint calls now requires to provide implement the JSONDecodable protocol

3.17.1 - 2018-06-26 22:45:37

Improvements

  • Returning support for tvOS on CocoaPods (#299)
  • New Error Kinvey.Error.blRuntimeError to handle BL runtime errors (#301)

Bugfixes

  • None

Deprecated

  • Client.ping(completionHandler:)
  • Push.unRegisterDeviceToken(_:)

Breaking Changes

  • None

3.17.0 - 2018-06-15 00:39:34

Improvements

  • Better code coverage (#297)

Bugfixes

  • None

Deprecated

  • Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encrypted:schema:completionHandler:)
  • Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encryptionKey:schema:completionHandler:)
  • CustomEndpoint.CompletionHandler
  • CustomEndpoint.execute(_:params:client:completionHandler:)
  • DataStore.pull(_:deltaSetCompletionHandler:deltaSet:completionHandler:)
  • DataStore.purge(_:completionHandler:)
  • DataStore.push(timeout:completionHandler:)
  • DataStore.sync(_:deltaSetCompletionHandler:deltaSet:completionHandler:)
  • Entity.Key.acl
  • Entity.Key.entityId
  • Entity.Key.metadata
  • FileStore.download(_:storeType:ttl:completionHandler:)
  • FileStore.download(_:ttl:completionHandler:)
  • FileStore.find(_:ttl:completionHandler:)
  • FileStore.refresh(_:ttl:completionHandler:)
  • FileStore.remove(_:completionHandler:)
  • FileStore.upload(_:data:ttl:completionHandler:)
  • FileStore.upload(_:image:imageRepresentation:ttl:completionHandler:)
  • FileStore.upload(_:path:ttl:completionHandler:)
  • FileStore.upload(_:stream:ttl:completionHandler:)
  • Metadata.Key.authtoken
  • Metadata.Key.entityCreationTime
  • Metadata.Key.lastModifiedTime
  • User.PersistableUsernameKey
  • User.changePassword(newPassword:completionHandler:)
  • User.exists(username:client:completionHandler:)
  • User.forgotUsername(email:client:completionHandler:)
  • User.get(userId:client:completionHandler:)
  • User.login(authSource:_:createIfNotExists:authServiceId:client:completionHandler:)
  • User.lookup(_:completionHandler:)
  • User.resetPassword(usernameOrEmail:client:completionHandler:)
  • User.save(newPassword:completionHandler:)
  • User.sendEmailConfirmation(forUsername:client:completionHandler:)
  • User.signup(username:password:user:client:completionHandler:)

Breaking Changes

  • Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encrypted:schemaVersion:migrationHandler:)
  • Client.initialize(appKey:appSecret:accessGroup:apiHostName:authHostName:encryptionKey:schemaVersion:migrationHandler:)
  • Client.timeoutInterval
  • DataStore.collection(_:deltaSet:autoPagination:client:tag:validationStrategy:)
  • DataStore.count(_:readPolicy:completionHandler:)
  • DataStore.find(_:deltaSet:readPolicy:completionHandler:)
  • DataStore.find(_:readPolicy:completionHandler:)
  • DataStore.find(byId:readPolicy:completionHandler:)
  • DataStore.getInstance(_:deltaSet:client:tag:validationStrategy:)
  • DataStore.group(count:countType:condition:readPolicy:completionHandler:)
  • DataStore.group(keys:avg:avgType:condition:readPolicy:completionHandler:)
  • DataStore.group(keys:initialObject:reduceJSFunction:condition:readPolicy:completionHandler:)
  • DataStore.group(keys:max:maxType:condition:readPolicy:completionHandler:)
  • DataStore.group(keys:min:minType:condition:readPolicy:completionHandler:)
  • DataStore.group(keys:sum:sumType:condition:readPolicy:completionHandler:)
  • DataStore.pull(_:deltaSet:deltaSetCompletionHandler:completionHandler:)
  • DataStore.remove(_:writePolicy:completionHandler:)
  • DataStore.remove(byId:writePolicy:completionHandler:)
  • DataStore.remove(byIds:writePolicy:completionHandler:)
  • DataStore.removeAll(_:completionHandler:)
  • DataStore.removeById(_:writePolicy:completionHandler:)
  • DataStore.save(_:writePolicy:completionHandler:)
  • FileStore.getInstance(client:)
  • FileStore.getInstance(fileType:client:)
  • Metadata.AuthTokenKey
  • Metadata.EctKey
  • Metadata.LmtKey
  • Options.init(_:)
  • User.destroy(userId:hard:client:completionHandler:)
  • User.find(query:client:completionHandler:)
  • User.login(redirectURI:micURL:authServiceId:client:)
  • User.presentMICViewController(redirectURI:timeout:forceUIWebView:authServiceId:client:completionHandler:)
  • User.resetPassword(email:client:completionHandler:)
  • User.resetPassword(username:client:completionHandler:)

3.16.0 - 2018-06-01 00:28:53

Improvements

  • MIC support for the Resource Owner Credentials Grant flow (#290)
  • Outdated compiler warnings removed (#291)

Bugfixes

  • Use autopaging when Delta Sync is not available (#289)
  • 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

Breaking Changes

  • None