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 Build a Self-Destructing Message iPhone App Relating Users in Parse.com Displaying Our List of Friends

Gaetano Isidori
Gaetano Isidori
3,451 Points

In my view did load method when i create a PFQuery and call the method query on PFQuery, i get an error message

  • (void)viewDidLoad { [super viewDidLoad]; self.friendsRelation = [[PFUser currentUser] objectForKey:@"friendsRelation"]; PFQuery *query = [self.friendsRelation query]; [query orderByAscending:@"username"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"error: %@ %@", error, [error userInfo]); } else { self.friends = objects; [self.tableView reloadData]; } }];

}

  • PFQuery *query = [self.friendsRelation query];- is the code thats giving me and error it reads "No visible @interface for PFUser declares the selector query"??? please help me out, thanks

2 Answers

Stone Preston
Stone Preston
42,016 Points

what does your property declaration for self.friendsRelation look like? make sure you declared it as a PFRelation and not a PFUser

Gaetano Isidori
Gaetano Isidori
3,451 Points

Thank you Stone, these apps can be very tedious. Now i've corrected the mistake and feel much more confident to proceed in the course.