アプリに parse.com を使用しています。それで質問があります。すべての投稿オブジェクトを見つける必要があります。各投稿には著者の列があります。そのため、近くにいる人のすべての投稿を見つける必要があります。私はそのようなコードを使用します:
PFQuery *postsQuery = [PFQuery queryWithClassName:@"Post"];
PFQuery *locationQuery = [PFUser query];
[locationQuery whereKey:@"location" nearGeoPoint:geoPoint withinKilometers:3.0f];
[postsQuery whereKey:@"author" matchesQuery:locationQuery];
[postsQuery orderByDescending:kPostKeyDate];
[postsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
}];
問題は、投稿をしているユーザーがたくさんいるにもかかわらず、現在のユーザーの投稿しか得られないことです。誰でも解決策を提案できますか? 前もって感謝します。