Skip to content

Exception in [PFUser currentUser].isDirty after sign up of anonymous user #385

Closed
@ako2009

Description

@ako2009

This code generates the exception "PFObject contains container item that isn't cached."
Something goes wrong after anonymous user signing up.

    [PFUser enableAutomaticUser];
    [PFUser currentUser][@"installations"] = @[ @"test" ];

    PFUser* user = [PFUser user];
    user.username = @"[email protected]";
    user.password = @"test";

    [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError* error) {
        if (succeeded) {

            // workaround
           // [PFUser currentUser][@"installations"] = [[PFUser currentUser][@"installations"] copy];

            if ([PFUser currentUser].isDirty) {  // the exception occurs here
                NSLog(@"User is dirty");
            }
        }
    }];

I tested it on iOS Parse SDK v1.8.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions