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.
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 Kinviey.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.Backbone.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.JavaScript Full Changelog
Backbone Full Changelog
JavaScript Full Changelog
Backbone Full Changelog
tls: true
by default when fetching files. #118NotFoundError
thrown when trying to store an active user in the cache. #119JavaScript Core Full Changelog
Backbone Full Changelog
UserStore
from correct path. Kinvey.UserStore
is now not undefined
.group
function to Kinvey.Collection
.CacheRequest
in Push
module.We recommend using the latest version.