Support Topics Documentation Slack YouTube Blog

IDataStore->Save doesn't respond when App in background mode

IDataStore’s Save method doesn’t respond either in case of success or failure, when app is in background state. Though, it creates a record in backendless database, but doesn’t respond back!! Though, the same code works fine when doing the same thing when app in active mode.
Strange is that, a record is created in background mode, but it doesn’t respond back!!

userNotification *notification = [userNotification new];
notification.userId = [[NSUserDefaults standardUserDefaults]objectForKey:@"userObjectId"];
notification.userName = backendless.userService.currentUser.email;
notification.userType = @"2";
notification.soundType = @"ONE_SCREAM";
notification.eventDescription = @"One Scream";
notification.scream_date = dateString;
notification.time = timeString;
notification.os = @"iOS";
notification.status = @"Alarm Activated";
id <IDataStore>dateStore = [backendless.persistenceService of:[userNotification class]];
[dateStore save:notification response:^(id response) {
NSString *soundObjId;
if (response) {
 // The object has been saved.
 } else {
 
 }
 
 } error:^(Fault *error) {
 NSLog(@"Push Couldn't sent: %@",[error message]);
 
 }];

Hello!

Your issue has been assigned to developer and would be investigated asap. For reference, internal ticket ID is BKNDLSS-13697.
regards,
Alex

Thanks, waiting…