parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 864 forks source link

SaveEventually doesn't work as expected #1688

Open sidan5 opened 1 year ago

sidan5 commented 1 year ago

New Issue Checklist

Issue Description

When using SaveEventually on iOS SDK 1.19.4 it doesn't work as expected using mongoDB 5.0.14

Steps to reproduce

Saving something to user table with anonymous user (tested only anonymous).

Example function:

-(void)setBoolParameter : (NSString *)parameterString withBool:(BOOL)boolToSet{
    self[parameterString] = [NSNumber numberWithBool:boolToSet];

    [self saveEventually:^(BOOL succeeded, NSError *error) // This doen't work and the block never runs. if using saveInBackgroundWithBlock it would work
     {
         if (error != nil)
         {
             NSLog(@"Error: User %@ update UNSUCCESFULL", parameterString);
         }
         else {
             NSLog(@"User %@ Succesfully Updated",parameterString);
         }
     }];
}

Actual Outcome

The values won't save, ever.

Expected Outcome

The values should be saved when possible (when there is a network connection etc.).

Environment

Server

Database

Client

Logs

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!