I am using ionic storage in my app and It needs almost 1GB device space to launch the app. If device memory is not having at least 1GB of space app will not be launched. After clearing that memory I am able to launch.
this the way, I am trying to save some data after signing-in into local storage.
const seq = this.api.post('signin', value).share();
seq.subscribe((res: any) => {
// If the API returned a successful response, mark the user as logged in
if (res.statusCode === 200) {
(window as any).FirebasePlugin.setUserProperty('loggedInUserId', res.user);
this.passwordMismatch = '';
this.invalidSinIn = false;
const isExistingUser = true;
// store details into ionic storage
Promise.all([this.storage.set('user', res.user), this.storage.set('token', res.token),
this.storage.set('isVerified', res.isVerified), this.storage.set('authType', 'email'),
this.storage.set('refreshToken', res.refreshToken), this.storage.set('referalCode', res.referalCode),
this.storage.set('existingUser', isExistingUser), this.storage.set('isProfileCompleted', res.isProfileCompleted)]).then(() => {
this.navCtrl.setRoot(MainPage);
});
}
});
This is working fine if the device is having available space of More then 1GB, but failing if memory is less.
Please help me to solve this issue. I am new in ionic I am using
ionic framework: 3.9.2
Ionic App scripts: 3.1.2
Angular Core: 5.0.0