Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

What is this

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'All objects in a relation must have object ids.'

This is what i got. My backend is Parse for ios.

NSMutableArray *facultyList=[[NSMutableArray alloc] init]; PFUser *faculty=[PFUser user]; [facultyList addObject:faculty];

        NSLog(@"Teacher Added");


        // By specifying no write privileges for the ACL, we can ensure the role cannot be altered.
        PFACL *roleACL = [PFACL ACL];
        [roleACL setPublicReadAccess:YES];
        PFRole *role = [PFRole roleWithName:@"Administrator" acl:roleACL];
        for (PFUser *user in facultyList) {
            [role.users addObject:user];
        }
        [role saveEventually];