Kinvey SDK Download

Version 3.12.3 - Nov 5, 2018
We recommend you use NPM to install the latest library.
npm install kinvey-nativescript-sdk

Changelog

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

Our SDKs are now open source! If you'd like to contribute code, suggest improvements or just take a look at how things work, check out the source on github.

3.12.3
- Nov 5, 2018

  • Fixed: Reconnect to Live Service on NativeScript whenever an application resumes or regains a network connection. #379

3.12.2
- Nov 2, 2018

  • Enhancement: Allow loginWithMIC() to work properly when viewing a NativeScript application with the NativeScript Preview App. #377
  • Enhancement: Add new notification callback handler for NativeScript push notifications. #378
  • Fixed: Use default AuthorizationGrant if null is provded to loginWithMIC(). #372
  • Fixed: Merge _socialIdentity properly with response from /me endpoint. #374 #375
  • Fixed: Return the correct error message if Files.findById() is called without a file id. #373
  • Fixed: Reconnect to Live Service on NativeScript whenever an application resumes or regains a network connection. #376

3.12.1
- Oct 4, 2018

  • Fixed: The package does not include the tns-core-module package in the bundle. #363

3.12.0
- Oct 3, 2018

  • Enhancement: Update MIC for NativeScript to use SFSafariViewController on iOS and Chrome Custom Tabs on Android. Register the custom scheme used by the app as the redirectUri for MIC in the AndroidManifest.xml on Android and the Info.plist on iOS. #305 #362
  • Fixed: Send custom properties to the backend using the x-kinvey-custom-request-properties header when creating an entity. #360
  • Fixed: Fix TypeScript definitions for Push.unregister() on NativeScript to allow the passing of options. Fix the boolean logic in Push.register() to allow interactive settings for push notifications to be registered for iOS on NativeScript. #359
  • Fixed: Fix encoding issue when downloading files via the NativeScript SDK. #361

3.11.7
- Sep 20, 2018

  • Fixed: Fix NativeScript TypeScript definitions for Push. #352
  • Fixed: Update rxjs to 6.x. #353
  • Enhancement: Add new defice info header. #343
  • Enhancement: Add encryption for NativeScript. #351

3.11.6
- Aug 2, 2018

  • Fixed: Added instanceId?: string to ClientConfig TypeScript definition. #341
  • Fixed: Return response from backend when calling datastore.find(). #342
  • Enhancement: Updated rxjs to 6.x. #340

3.11.5
- Jul 25, 2018

  • Fixed: The error returned from the server when Kinvey.Files.downloadByUrl() fails is now thrown properly. #333
  • Fixed: An error is not thrown when trying to upload a file and no metadata is provided. #334
  • Fixed: Add Push TypeScript definitions. #335
  • Fixed: Prevent Kinvey.init() error from being thrown when registering for Push. #336
  • Changed: A query is not longer accepted to push a subset of items to the backend. #331

3.11.4
- Jul 9, 2018

  • Fixed: Use correct Authorization header value when sending a request to refresh a MIC access token. #315
  • Fixed: Queue network requests while in the middle of refreshing a MIC access token. This prevents other requests from invalidating the newly refreshed access token. #321
  • Fixed: Use PubNub fork to fix Live Service on Android. #326

3.11.3
- Jun 29, 2018

  • Enhancement: Calculate and validate file size before uploading the file. Any size provided to Files.upload() will be overridden with the size calculated by the SDK. #313
  • Fixed: Remove _kmd.local property on an entity before it is send to the backend. _kmd.local is a property created by the SDK used to track if an entity was created using the SDK. #310
  • Fixed: The active user will no longer be removed if local storage is being used to cache data loaded with the DataStore and the cache is cleared. #311

3.11.2
- Jun 15, 2018

  • Enhancement: Add support to handle Mobile Identity Connect OAuth errors in redirectUri response. #307

3.11.1
- Jun 1, 2018

  • Fixed: When calling User.me() to update the active users data, any data that was deleted since the last call will also be removed from the active user stored on the device. #299
  • Fixed: Any error thrown in the onNext function while using an observable will cause the onError function to be called with the thrown error. The subscriber will also be unsubscribed from the observable. #302
  • Fixed: Fix incorrect TypeScript definition for User.lookup() #301
  • Fixed: Add worker file required to upload files on Android. #300

3.11.0
- May 23, 2018

  • Fixed: Add push bundle for iOS and Android to files property in package.json for the Kinvey NativeScript SDK. This fixes an error when trying to import the push module for the Kinvey NativeScript SDK. #296
  • Enhancement: Add support for Server Side Delta Set. #270
var datastore = Kinvey.DataStore.collection('books');

// Turn on for datastore instance
datastore.useDeltaSet = true; // Default is false

// Pass options.useDeltaSet to override datastore default for a pull() request.
// It will use value of datastore.useDeltaSet as default.
var promise = datastore.pull(query, { useDeltaSet: true });

// Pass options.useDeltaSet to override datastore default for a pull() request.
// It will use value of datastore.useDeltaSet as default.
var promise = datastore.find(query, { useDeltaSet: true });

3.10.3
- May 4, 2018

  • Enhancement: Add validation that checks if a redirectUri provided to mic.login() is a string. If the redirectUri is not a string then an Error will be thrown. #283
  • Enhancement: Conforms the use of the iOS keychain to use the same settings as our Swift SDK. #257
  • Enhancement: Don't include the Push module by default in the SDK bundle. #282
  • Enhancement: Update the Push module to use the latest version of the NativeScript Push Plugin. onMessageReceived() callback for Android was deprecated and added some new config options for iOS. #285
  • Fixed: Use the correct config options to unregister push on iOS and Android. #284
  • Fixed: Add support for kinveyFileTTL and kinveyFileTLS query parameters for KinveyFile references on a DataStore collection. #289
var dataStore = Kinvey.DataStore.collection('pets');
dataStore.findById('3f583e9f-d064-4a25-a953-6cf0a3dc2ff1', { kinveyFileTTL: 3600, kinveyFileTLS: true })
  .subscribe(function(pet) {
    /*
      {
        "_id": "3f583e9f-d064-4a25-a953-6cf0a3dc2ff1",
        "_acl": {...},
        "dogName": "Bob",
        "furColor": "brown with black spots",
        "pawPrintPicture": {
          "_type": "KinveyFile",
          "_id": "325620e4-93dd-4a26-9f84-8a5e62c0db11",
          "_filename": "bobsPawPrint.png",
          "_acl": { ... },
          "_downloadURL": <Google Cloud Storage download URL>,
          "_expiresAt": "2018-06-18T23:07:23.394Z"
        }
      }
    */
  }, function(error) {
    // ...
  });

3.10.2
- Mar 29, 2018

  • Enhancement: Previously, a datastore instance would implicitly push pending entity changes before performing a request that would overwrite the local entity changes. This change removes the implicit push and will instead return an error stating that there are entities that need to be synced before you complete the action. #276
  • Enhancement: You can now provide a instanceId as a config option to init(). This will setup the backend and Mobile Identity Connect API urls to use your instanceId properly. #278
Kinvey.init({
  appKey: '<appKey>',
  appSecret: '<appSecret>'
  instanceId: '<my-subdomain>'
});
  • Enhancement: Add default entitlements.plist file to allow users to login while testing apps using the iOS simulator. #281
  • Fixed: Check that a value is an object before calling Object.keys() in Query.isSupportedOffline(). #245
  • Fixed: Use es6-promise for promises in live service related files instead of native promises. #272
  • Fixed: Override exported Files module to use the NativeScript SDK version. This fixes issues that might have been encountered when uploading files with the NativeScript SDK. #280

3.10.1
- Mar 13, 2018

  • Enhancement: Allow NativeScript apps to read appKey, appSecret and masterSecret from the package.json file, instead of passing them as parameters to Kinvey.init(). #261
  • Enhancement: The default API version used by Mobile Identity Connect is now v3. #259 #268
  • Enhancement: Auto Pagination Support. #260

The Kinvey backend imposes a limit of 10,000 entities on data requests. If your app needs to pull a larger number of entities to the cache, you can request the SDK to "auto-paginate". The SDK will then retrieve the entire set of entities page by page. This feature only applies to Cache and Sync stores.

var dataStore = Kinvey.DataStore.collection('books', Kinvey.DataStoreType.Sync);

//Pull the entire collection page by page.
var promise = dataStore.pull(null, { autoPagination: true })
  .then(function onSuccess(count) {
    // "count" represents the number of entities retrieved
  }).catch(function onError(error) {
    // ...
  });

Breaking change: Previously, DataStore.pull() returned an array of the retrieved entities. With this release, the response of pull has changed to the count of retrieved entities.

If you need the array of entities retrieved by a pull in your app, you should call find after the pull has completed.

  • Fixed: The authorization header for Mobile Identity Connect token requests now uses the long-form OAuth Client ID. This fix is only relevant to apps that use multiple auth providers. A detailed discussion on OAuth Client IDs can be found in the Mobile Identity Connect guide. #263

3.10.0
- Feb 26, 2018

  • Enhancement: We've restructured our class hierarchy for working with data, to facilitate future performance improvements.
  • Enhancement: CacheStore methods create() and update() can now handle more concurrent requests.
  • Enhancement: CacheStore.delete() method now applies the same query both locally and against the backend, instead of making separate "by-id" requests for entities found in the cache.
  • Enhancement: The clear() method for a CacheStore or SyncStore now clears the sync queue.
  • Enhancement: Sync items found for entities which are no longer present in cache will be cleared when a sync push is performed to prevent errors.
  • Enhancement: Improved the throttling of requests when doing a sync push.
  • Fixed: Database connections to WebSQL are now cached. #241
  • Fixed: Some browsers don't support Number.isNaN() so we added a polyfill. #243
  • Fixed: Update typescript definitions to allow anonymouse user signup. #242
  • Fixed: Export LiveServiceFacade instead of LiveService. #254

3.9.10
- Feb 9, 2018

  • Use correct config property for setting storage providers #228
  • Add missing version property to RequestOptions in the TypeScript definition file #235
  • _id field not returned when specifying fields for a query #233
  • Use WebView events to capture redirect #237

3.9.9
- Jan 26, 2018

  • Enhancement: You can now specify which storage provider to use to cache data. See the code snippet below for an example. #213
Kinvey.init({
  appKey: '<appKey>',
  appSecret: '<appSecret>'
  storage: Kinvey.StorageProvider.SQLite // or [Kinvey.StorageProvider.SQLite, Kinvey.StorageProvider.Memory]
});

// Possible Values
enum StorageProvider {
  SQLite
  Memory
}
  • Enhancement: You can now use a datastore to perform actions on a subset of data in a collection without providing a query each time to match that subset of data. See the code snippet below for an example. #220
var datastore = Kinvey.DataStore.collection('books', Kinvey.DataStore.Sync, { tag: 'Kinvey' }); // Tag the datastore
var query = new Kinvey.Query().equalTo('author', 'Kinvey');
datastore.pull(query)
  .then(function() {
    return datastore.find().toPromise();
  })
  .then(function(books) {
    // all of these books have Kinvey as their author
  });
  • Fixed: Correctly sort entities that have a null or undefined value for the sort field. #205
  • Fixed: Add polyfill for Object.prototype.assign(). #225

3.9.7
- Jan 12, 2018

  • Fixed: Subscribe for messages sent to user's personal collections channel #172
  • Fixed: Allow null and undefined values to be used in a equal and notEqual query #201
  • Fixed: Remove fileds when processing query after sorting data #202

3.9.4
- Dec 14, 2017

  • Improvement: Use PubNub 4.19.0 rather then our custom fork. #193
  • Improvement: We have updated the TypeScript definitions to support custom properties on a User instance. #183
  • Improvement: Adopt a mono repo style repository. This change has no impact on the SDK output. It restructures our codebase to make releases and open source contributions easier. #171
  • Fixed and Breaking Change: You can now import the Push module. Please use import { Push } from 'kinvey-nativescript-sdk'; instead of import { Push } from 'kinvey-nativescript-sdk/push';. #28

3.9.2
- Oct 5, 2017

  • Imporvement: Live Service is now EA (Early Adopter) for our NativeScript SDK. Please check our Live Service Guide.

3.8.0
- Aug 24, 2017

  • Added: Requests are logged using loglevel. Please refer to the Troubleshooting Guide for more information.
  • Added: Support for multiple MIC providers in a single app. The SDK adds a micId to the client_id value when it makes a request to authenticate with Mobile Identity Connect.
  • Fixed: Default to removing a user with hard equal to false. Please refer to the User Guide for more information.
  • Fixed: Throw any errors encountered when trying to load a storage adapter use to cache data loaded with a data store.
  • Fixed: Kinvey queries will now be properly encoded for requests sent to the backend.

3.7.2
- Jul 28, 2017

- Fixed: Fix File Uploads #15 - Fixed: The SDK will fallback to use the default storage adapter if the SQLite storage adapter is unable to be loaded. - Fixed: Instead of throwing an error, the raw data for a file that is downloaded with a url will be returned as an instance of NSData on iOS or as an instance of ByteArrayOutputStream on Android. - Fixed: The SDK can now be built on a Windows machine. ### Merged Pull Requests - Sdk on windows and a fix for a fix #14 - Fix File Upload #15 ### Closed Issues - Unable to fetch the entities on the backend #16

3.7.1
- Jul 8, 2017

  • Fixed: The database connection is closed when the associated database operations have completed. This fixes an error that might cause Too Many Files Open to appear. #12
  • Fixed: Remove unnecessary SELECT operation from removeById. #13

3.7.0
- Jun 28, 2017

- GA Release

3.6.0-ns.6
- Jun 21, 2017

  • Bugfix: Fixed npm publish issue with typings files.

3.6.0-ns.5
- Jun 21, 2017

  • Improvement: Added typings file to support use with TypeScript.
  • Improvement: Removed dependency on push plugin to prevent setup issues on Android.
  • Bugfix: Fixed issue with URL encoding that affecting querying.

3.6.0-ns.3
- Apr 24, 2017

  • Initial Beta Release

Download Older Versions

We recommend using the latest version.

Version Download Date
3.12.3 Nov 5, 2018
3.12.2 Nov 2, 2018
3.12.1 Oct 4, 2018
3.12.0 Oct 3, 2018
3.11.7 Sep 20, 2018
3.11.6 Aug 2, 2018
3.11.5 Jul 25, 2018
3.11.4 Jul 9, 2018
3.11.3 Jun 29, 2018
3.11.2 Jun 15, 2018
3.11.1 Jun 1, 2018
3.11.0 May 23, 2018
3.10.3 May 4, 2018
3.10.2 Mar 29, 2018
3.10.1 Mar 13, 2018
3.10.0 Feb 26, 2018
3.9.10 Feb 9, 2018
3.9.9 Jan 26, 2018
3.9.7 Jan 12, 2018
3.9.4 Dec 14, 2017
3.9.2 Oct 5, 2017
3.8.0 Aug 24, 2017
3.7.2 Jul 28, 2017
3.7.1 Jul 8, 2017
3.7.0 Jun 28, 2017
3.6.0-ns.6 Jun 21, 2017
3.6.0-ns.5 Jun 21, 2017
3.6.0-ns.3 Apr 24, 2017
Got a question?