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: 2
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

3.15.0 - May 15, 2018

Improvements

  • X-Kinvey-Device-Info is a new header that includes more information about the device (#282)
  • Upgrading PromiseKit to version 6 (#284)
  • The client-side Delta Set feature has been replaced by a server-side implementation called Delta Sync that offers better performance and scalability (#261, #286, #287)
  • Default log level is now .warning (#283)

Bugfixes

  • Make the ValidationStrategy work as intended (#285)
  • Canceling DataStore.find() requests not working in some situations (#288)

Deprecated

  • None

Breaking Changes

  • None

3.14.0 - Apr 13, 2018

Improvements

  • Send scope parameter to all MIC versions (#273)
  • 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)")
    }
}
  • Allow usage of authServiceID for MIC calls (#277)
  • User and Entity now conforms to Hashable and Equatable (#279)

Bugfixes

  • DataStore.removeAll() request was wrong (#274)
  • Queries were not translated correctly for non-entity classes, like Acl for example (#278)
  • Live Service messages not coming with strict permissions (#280)

Deprecated

  • None

Breaking Changes

  • None

3.13.0 - Mar 15, 2018

Improvements

  • DataStore instances are not cached anymore allowing multiple configurations for the same DataStore (#272)
  • HTTP header User-Agent now includes the Swift version (#270)
  • 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)")
    }
}

Bugfixes

  • Memory consumption fixed for DataStore<T>.find() calls (#268)
  • FileStore now returns the proper result types for sync wait calls (#266)
  • User lockdowns now is fully supported automatically logging out users in lockdown state (#265)

Deprecated

  • None

Breaking Changes

  • Client.timeout is now a shortcut for Client.options.timeout (#271)
  • Default MIC API Version is now v3 (#269)

3.12.2 - Feb 12, 2018

Improvements

  • Adding Options for Client (#264)

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None

3.12.1 - Jan 24, 2018

Improvements

  • None

Bugfixes

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

Deprecated

  • None

Breaking Changes

  • None