Parse.com前向声明错误

时间:2014-10-01 01:49:21

标签: ios objective-c xcode parse-platform forward-declaration

这句话在几周前发布,现在给我一个前瞻性声明错误。错误显示为"Reciever 'PFQuery' for class message is a forward declaration"

它也说同一行

PFQuery *query = [PFQuery queryWithClassName:@"storeInfo"];

no known class method for selector 'queryWithClassName'这很奇怪,因为我在Parse.com的文档#import Parse / Parse.h上看到了这个,我在这个特定的类' .h文件和下面的PFQuery中做了语句是获取我需要的信息的数组的经典方法。

我试着向前看声明并且有点困惑。为什么我收到此错误?

任何人都可以帮助我,可能会解释前向声明而不是标准的类声明吗?

这是从Parse.com导入数据的iOS Xcode项目(Objective-C语言)。我感谢任何帮助,并提示在哪里寻找答案。

- (NSMutableArray *) allStoreNames {
    NSMutableArray *allStoreNames = [[NSMutableArray alloc] init];
    PFQuery *query = [PFQuery queryWithClassName:@"storeInfo"];
    [query whereKey:@"tag" equalTo:@"artistree"];
    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
        if (error) {
            NSLog(@"Error: %@ %@", error, [error userInfo]);
        } else {
            for (PFObject *parseobject in objects) {
                Store *store = [[Store alloc] initWithPFObject:parseobject];
                NSString *storeString = store.name;
                [allStoreNames addObject:storeString];
                NSLog(@"%@ store name was added", store.name);
            }
        }
    }];

    return allStoreNames;
}

0 个答案:

没有答案