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 trialMartin Mägi
8,295 PointsParse PFFile documentation change
Parse PFFile documentation has changed: https://parse.com/docs/ios_guide#files/iOS
To avoid getting arrays for all database table columns, you should change this:
PFObject *message = [PFObject objectWithClassName:@"Messages"];
[message addObject:file forKey:@"file"];
[message addObject:fileType forKey:@"fileType"];
[message addObject:self.recipients forKey:@"recipientsIds"];
[message addObject:[[PFUser currentUser] objectId] forKey:@"senderId"];
[message addObject:[[PFUser currentUser] username] forKey:@"senderName"];
to this:
PFObject *message = [PFObject objectWithClassName:@"Messages"];
message[@"file"] = file;
message[@"fileType"] = fileType;
message[@"recipientsIds"] = self.recipients;
message[@"senderId"] = [[PFUser currentUser]objectId];
message[@"senderName"] = [[PFUser currentUser]username];
Make sure to delete the class "Messages" in Parse.com after changing your code to avoid getting an error in the app.
Worked for me :)
1 Answer
landonferrier
25,097 PointsMartin, here is a full template for the social network application: Click Here.