Hi,
i’m using ionic v4 + capacitor
when i ionic serve my app, it’s working well on browser
but when i ionic cap open ios, it’s partially not work …
i have a list i have to create and display. its not working, when i create add and save an element to this list i have an strange error displayed on Xcode :
⚡️ [log] - create campagne ..........
⚡️ [log] - fonction save........
⚡️ [log] - toutes les campagnes [{"id":"1","nom":"Test 1","date":"26/2/2019","heure_debut":"9:44","heure_fin":"","comment":"","collecteurs":"Nd","tirages":[]}]
⚡️ [error] - ERROR {"line":1294,"column":26,"sourceURL":"capacitor://localhost/main.js"}
To Native Cordova -> SQLitePlugin backgroundExecuteSqlBatch SQLitePlugin59564011 ["options": [{
dbargs = {
dbname = "_ionicstorage";
};
executes = (
{
params = (
);
qid = "<null>";
sql = BEGIN;
},
{
params = (
campagnes,
"[{\"id\":\"1\",\"nom\":\"Test 1\",\"date\":\"26/2/2019\",\"heure_debut\":\"9:44\",\"heure_fin\":\"\",\"comment\":\"\",\"collecteurs\":\"Nd\",\"tirages\":[]}]"
);
qid = "<null>";
sql = "INSERT OR REPLACE INTO _ionickv (key, value) VALUES (?, ?)";
}
);
}]]
To Native Cordova -> SQLitePlugin backgroundExecuteSqlBatch SQLitePlugin59564012 ["options": [{
dbargs = {
dbname = "_ionicstorage";
};
executes = (
{
params = (
);
qid = "<null>";
sql = COMMIT;
}
);
}]]
this is the part of code which is on error (function save of data service) :
public save(): void {
console.log('fonction save........');
this.storage.set("campagnes", this.campagnes);
console.log("toutes les campagnes", this.campagnes);
// this.myCampagnes.next(this.campagnes);
let uc = this.campagnes.filter(
c =>
c.user.site === this.user.site &&
c.user.email === this.user.email
);
console.log('user campagne= ', uc);
console.log("fin..........");
}
it seems that the section with filter campagnes not working …
an idea ?
Thank you
nine