のJSONストアが作成されていません。下記のサンプルコードはAndroidの最新の修正では動作しませんが、オプションからパスワードフィールドを削除するとうまくいきます。私たちは、Android上でエラーの下に取得しているが、それはIOSAndroidで最新バージョンのフィックスパック7.1.0.00.20160919-1656
{ "SRC" で正常に動作しています: "initCollection"、 "ERR": - 3、 "MSG": "INVALID_KEY_ON_PROVISION"、 "COL": "人" 、 "USR": "テスト"、 "DOC":{}、 "RES":{}}
function wlCommonInit(){
/*
* Use of WL.Client.connect() API before any connectivity to a MobileFirst Server is required.
* This API should be called only once, before any other WL.Client methods that communicate with the MobileFirst Server.
* Don't forget to specify and implement onSuccess and onFailure callback functions for WL.Client.connect(), e.g:
*
* WL.Client.connect({
* onSuccess: onConnectSuccess,
* onFailure: onConnectFailure
* });
*
*/
// Common initialization code goes here
}
function onClick(){
alert("Click");
var collectionName = 'people';
// Object that defines all the collections.
var collections = {
// Object that defines the 'people' collection.
people : {
// Object that defines the Search Fields for the 'people' collection.
searchFields : {name: 'string', age: 'integer'}
}
};
// Optional options object.
var options = {
username:"test",
// Optional password, default no passw`enter code here`ord.
password : '123',
};
WL.JSONStore.init(collections, options)
.then(function() {
alert("Success in jstore");
})
.fail(function (errorObject) {
// Handle failure for any of the previous JSONStore operations (init, add).
alert("Failure in jstore : "+ JSON.stringify(errorObject));
});
};
古いバージョンで作成された既存のアプリを7.1.0.00.20160919-1656に移行していますか? –