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.
me()
method. #596skip
and limit
and fetches up to 10000 items per call. #581lastLoginTime
to Kinvey metadata. #562signup()
. #430signup()
as an instance function on the User
class. #431https
to https:
. #423query.ascending()
and query.descending()
. #424query.exists()
. #425query.notContainedId()
. #426query.notEqualTo()
. #427query.or()
, query.and()
, and query.nor()
. #428TimeoutError
is will be thrown when a request times out.Network
datastore type. #414// You will need to set the API version to 5 when you initialize the SDK
Kinvey.init({
appKey: '<appKey>',
appSecret: '<appSecret>',
apiVersion: 5
});
// Insert an array of books using the new multi insert API
const newBooks = [
{ title: 'Kinvey' },
{ title: 'Progress' }
];
const store = Kinvey.DataStore.collection('Books', Kinvey.DataStoreType.Network);
await store.save(newBooks);
init()
returns some missing properties that were returned in v3.x. #411Auto
datastore type. This new datastore type prioritzes using the network first. If a network connection is not available then it will fall back to using the local cache until a network connection is re-established. #409Cache
datastore type. You should now use the Auto
datastore type to instead.initialize()
to initialize the SDK. You should use init()
instead.loginWithMIC()
to work properly when viewing a NativeScript application with the NativeScript Preview App. #377AuthorizationGrant
if null
is provded to loginWithMIC()
. #372_socialIdentity
properly with response from /me
endpoint. #374 #375Files.findById()
is called without a file id. #373x-kinvey-custom-request-properties
header when creating an entity. #360datastore.find()
. #342Kinvey.Files.downloadByUrl()
fails is now thrown properly. #333Authorization
header value when sending a request to refresh a MIC access token. #315Files.upload()
will be overridden with the size calculated by the SDK. #313_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. #310redirectUri
response. #307User.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. #299onNext
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. #302var 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 });
redirectUri
provided to mic.login()
is a string. If the redirectUri
is not a string then an Error
will be thrown. #283kinveyFileTTL
and kinveyFileTLS
query parameters for KinveyFile references on a DataStore collection. #289var 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) {
// ...
});
instanceId
as a config option to init()
. This will setup the backend and Mobile Identity Connect API urls to use your instanceId
properly. #278Kinvey.init({
appKey: '<appKey>',
appSecret: '<appSecret>'
instanceId: '<my-subdomain>'
});
Object.keys()
in Query.isSupportedOffline()
. #245es6-promise
for promises in live service related files instead of native promises. #272v3
. #259 #268The 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) {
// ...
});
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.
CacheStore
methods create()
and update()
can now handle more concurrent requests.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.clear()
method for a CacheStore
or SyncStore
now clears the sync queue.WebSQL
are now cached. #241Number.isNaN()
so we added a polyfill. #243LiveServiceFacade
instead of LiveService
. #254WebSQL
persistance adapter will no longer throw an Error
when executing several requests against the offline cache._id
field not returned when specifying fields for a query #233Kinvey.init({
appKey: '<appKey>',
appSecret: '<appSecret>'
storage: Kinvey.StorageProvider.WebSQL // or [Kinvey.StorageProvider.WebSQL, Kinvey.StorageProvider.IndexedDB]
});
// Possible Values
enum StorageProvider {
WebSQL,
IndexedDB,
LocalStorage,
SessionStorage,
Memory
}
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
});
null
or undefined
value for the sort field. #205Object.prototype.assign()
. #225null
and undefined
values to be used in a equal
and notEqual
query #201LocalStorageAdapter
and SessionStorageAdapter
.Kinvey.initialize()
fixed to resolve with either an instance of Kinvey.User
or null
.micId
to the client_id
value when it makes a request to authenticate with Mobile Identity Connect.hard
equal to false
. Please refer to the User Guide for more information.Kinvey.initialize()
has been deprecated. Please use Kinvey.init()
instead. Kinvey.init()
does not return a promise.Warning If you start using Kinvey.init()
and have been using Kinvey.initialize()
you will not have an active user anymore. You will need to migrate the active user to the new storage location by continuing to use Kinvey.initialize()
. After the active user has been migrated you can replace Kinvey.initialize()
with Kinvey.init()
. You can also just logout using Kinvey.User.logout()
and ask the user to login again.
// --------------------------------------------------
// Example code snippet on how to migrate active user.
// ---------------------------------------------------
var promise = Promise.resolve();
// Initialize the SDK using Kinvey.init()
Kinvey.init({
appKey: '<appKey>',
appSecret: '<appSecret>'
});
// Check if you have an active user.
if (!Kinvey.User.getActiveUser()) {
promise = Kinvey.initialize({
appKey: '<appKey>',
appSecret: '<appSecret>'
});
}
promise
.then(function() {
// ...
});
_id
for an entity. #134es6-promise
to prevent Promise Undefiend
errors on environments that do not have a native promise implementation. #135message
property properly when logging errors to the console. #136try/catch
around openDatabase()
. This allows any errors thrown when opening a new database connection to WebSQL be caught and used to reject the pending promise. #17https:
will automatically be used when a custom hostname is missing a protocol. #129null
for a short period of time when setting the active user. #128usePopupClass()
as a static function to the User
class for registering a popup class to be used for MIC authentication.operation
property to results returned when pushing sync items to the backend. The property either be equal to Kinvey.SyncOperation.Create
, Kinvey.SyncOperation.Update
, or Kinvey.SyncOperation.Delete
.var store = Kinvey.DataStore.collection('books', Kinvey.DataStoreType.Sync);
var query = new Kinvey.Query().equalTo('title', 'Kinvey');
store.remove(query)
.then(function(response) {
// response.count contains the count of books removed matching the query
return store.push();
})
.then(function(results) {
// Results is an array of responses from the pushing the sync items.
// Each result object now contains an operation set to Kinvey.SyncOperation.Delete
})
restore()
static function on the User
class to throw an error whenever it is called. This function required the master secret for an application. We strongly advise not to do this in your application.toJSON()
functions have now been replaced by toPlainObject()
. The returned result is the exact same.save()
, create()
, and update()
on datastore instances to no longer accept an array of entities. See the example below to see how to save an array of entities.var books = [{ name: 'book1' }, { name: 'book2' }];
var store = Kinvey.DataStore.collection('books');
var promises = [];
// Loop through each of the books and save them one by one.
// You can now reference a book easily in the event an error
// occurs when saving a book.
books.forEach(function(book) {
var promise = store.save(book)
.catch(function(error) {
console.log('Error saving book ' + book.name);
});
promises.push(promise);
});
// Using a third party library wait for all the promises to complete
RSVP.Promise.all(promises)
.then(function(books) {
// ...
});
remove()
and removeById()
on datastore instances to now return the count of entities removed and not the actual entity removed.var store = Kinvey.DataStore.collection('books');
// Remove books using a query
var query = new Kinvey.Query().equalTo('title', 'Kinvey');
store.remove(query)
.then(function(response) {
// response.count contains the count of books removed matching the query
});
// Remove a book using an id
store.removeById('1')
.then(function(response) {
// response.count will equal 1 if the book was removed or 0 if the book was not removed
});
init()
static function on Kinvey
namespace. This was deprecated with v3.3.3.baseUrl
, protocol
, and host
properties on a client
instance. These were deprecated with v3.0.0.syncCount()
and purge()
on CacheStore
and SyncStore
instances. These were deprecated with v3.2.0.Kinvey.Users
and Kinvey.UserStore
. These were deprecated with v3.2.0.tls: true
by default when fetching files. #118NotFoundError
thrown when trying to store an active user in the cache. #119Kinvey.ACL
on an entity that does not contain an _acl
property. #103User.lookup()
API to perform user discovery. #96401
status code. #101TypeError
for a failed login or any network request that resulted in an InvalidCredentialsError
#95error.kinveyRequestId
as a property to error objects. This property is set to the X-Kinvey-Request-Id
header value of a Kinvey API response. It is undefined
by default. #84Kinvey.initialize({
appKey: '<appKey>',
appSecret: '<appSecret>',
defaultTimeout: 30000 // 30 seconds in ms
});
instanceof
in Mobile Identity Connect that caused a TypeError
to be thrown. #87store.sync
on a data store instance. #88user._socialIdentity
properties returned from the network are no longer removed on a succesful login.NetworkStore
.Kinvey
namespace. See Troubleshooting Guide for more information.Error
objects.user._socialIdentity
properties when using an identity to login a user with the response from a login request.Kinvey.initialize
should be used instead of Kinvey.init
.Kinvey.initialize({
appKey: '<appKey>',
appSecret: '<appSecret>'
})
.then(function(activeUser) {
// ...
});
UserStore
from correct path. Kinvey.UserStore
is now not undefined
.group
function to data stores.https:
if one is not provided.Kinvey.User.loginWithMIC()
.clear()
on a CacheStore
or SyncStore
instance to clear the local cache.Kinvey.User.login()
.{ field: <value> }
format when serializing a query that contains an equalTo
expression.forgotUsername()
, verifyEmail()
, and resetPassword()
instance functions on the Kinvey.User
class. You should now use the static version of each function.X-Kinvey-Device-Information
header format.Acl
class on the Kinvey namespace.connectWithIdentity()
function on the User
class. Use connectIdentity()
instead. Please refer to the Social Identities Guide on how to connect a user to social identities.DataStore
errors when connecting a user to a social identity.DataStore
you now have to call the collection()
function instead of getInstance()
var store = Kinvey.DataStore.collection('myCollection');
Kinvey.Promise
accessible as a property on the Kinvey
namespace._id
when creating entities.CacheStore
.loadstart
event on popups to capture redirect when using MIC login for url that results in a 404.resetPassword()
on the User
class a static function that does not require an active user.try/catch
block to MIC to catch errors when trying to access popup urls that are cross domain.indexeddbshim
as not all browsers support WebSQL (e.g., Firefox)isEmailVerified()
to the User
class.We recommend using the latest version.
Version | Download | Date |
---|---|---|
9.0.0 | Download | Jul 25, 2023 |
8.0.0 | Download | Jul 15, 2022 |
7.0.3 | Download | Jul 14, 2022 |
7.0.2 | Download | Apr 28, 2022 |
7.0.1 | Download | Apr 27, 2022 |
7.0.0 | Download | Oct 25, 2021 |
6.0.0 | Download | Jul 30, 2021 |
5.1.5 | Download | Dec 2, 2022 |
5.1.4 | Download | Jun 18, 2022 |
5.1.2 | Download | May 26, 2022 |
5.1.1 | Download | Apr 12, 2021 |
5.1.0 | Download | Apr 8, 2021 |
5.0.1 | Download | Jul 22, 2020 |
5.0.0 | Download | Jul 10, 2020 |
4.2.3 | Download | Jul 22, 2019 |
4.2.2 | Download | Jul 5, 2019 |
4.2.1 | Download | Jun 19, 2019 |
4.2.0 | Download | Jun 7, 2019 |
4.1.0 | Download | May 31, 2019 |
4.0.0 | Download | May 3, 2019 |
3.12.4 | Download | Feb 12, 2019 |
3.12.2 | Download | Nov 2, 2018 |
3.12.1 | Download | Oct 4, 2018 |
3.12.0 | Download | Oct 3, 2018 |
3.11.7 | Download | Sep 20, 2018 |
3.11.6 | Download | Aug 2, 2018 |
3.11.5 | Download | Jul 25, 2018 |
3.11.4 | Download | Jul 9, 2018 |
3.11.3 | Download | Jun 29, 2018 |
3.11.2 | Download | Jun 15, 2018 |
3.11.1 | Download | Jun 1, 2018 |
3.11.0 | Download | May 23, 2018 |
3.10.3 | Download | May 4, 2018 |
3.10.2 | Download | Mar 29, 2018 |
3.10.1 | Download | Mar 13, 2018 |
3.10.0 | Download | Feb 26, 2018 |
3.9.10 | Download | Feb 9, 2018 |
3.9.9 | Download | Jan 26, 2018 |
3.9.6 | Download | Jan 12, 2018 |
3.9.3 | Download | Dec 14, 2017 |
3.9.0 | Download | Sep 24, 2017 |
3.8.1 | Download | Aug 25, 2017 |
3.8.0 | Download | Aug 24, 2017 |
3.5.2 | Download | Jul 8, 2017 |
3.5.1 | Download | Jun 30, 2017 |
3.5.0 | Download | Apr 20, 2017 |
3.4.5 | Download | Apr 13, 2017 |
3.4.4 | Download | Mar 27, 2017 |
3.4.2 | Download | Mar 16, 2017 |
3.4.1 | Download | Feb 23, 2017 |
3.4.0 | Download | Feb 9, 2017 |
3.3.5 | Download | Jan 25, 2017 |
3.3.4 | Download | Jan 12, 2017 |
3.3.3 | Download | Dec 16, 2016 |
3.3.2 | Download | Dec 3, 2016 |
3.3.1 | Download | Dec 2, 2016 |
3.3.0 | Download | Nov 22, 2016 |
3.2.2 | Download | Oct 26, 2016 |
3.2.1 | Download | Oct 7, 2016 |
3.2.0 | Download | Sep 23, 2016 |
3.1.1 | Download | Sep 21, 2016 |
3.1.0 | Download | Sep 9, 2016 |
3.0.3 | Download | Aug 12, 2016 |
3.0.2 | Download | Aug 3, 2016 |
3.0.1 | Download | Jul 29, 2016 |
3.0.0 | Download | Jul 11, 2016 |
3.0.0-beta.22 | Download | Jul 10, 2016 |
3.0.0-beta.21 | Jul 7, 2016 | |
3.0.0-beta.20 | Download | Jun 28, 2016 |
3.0.0-beta.19 | Download | Jun 13, 2016 |
3.0.0-beta.18 | Download | Jun 7, 2016 |
3.0.0-beta.17 | Download | Apr 20, 2016 |
3.0.0-beta.12 | Download | Mar 29, 2016 |
3.0.0-beta.8 | Download | Feb 24, 2016 |
3.0.0-beta.7 | Download | Feb 22, 2016 |
3.0.0-beta.6 | Download | Feb 18, 2016 |
3.0.0-beta.5 | Download | Feb 17, 2016 |
3.0.0-beta.4 | Download | Feb 1, 2016 |