集成解析时在Xcode中出错

时间:2014-10-08 00:43:05

标签: ios objective-c xcode parse-platform xcode5

我正在尝试将解析集成到Xcode 5.0.2中的应用程序中。在将解析集成到ApplDelegate.m之前,应用程序构建得很好。但是当我输入解析细节和测试代码时,我得到4个错误。这就是我所说的:

[Parse setApplicationId:@"Redacted"
              clientKey:@"Redacted"];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];

PFObject *testObject = [PFObject objectWithClassName:@"TestObject"];
testObject[@"foo"] = @"bar";
[testObject saveInBackground];

我得到以下4个错误:

Undefined symbols for architecture i386:
   (error 1) "_OBJC_CLASS_$_BFExecutor", referenced from:
      objc-class-ref in Parse(BFTask+Private.o)
      l_OBJC_$_CATEGORY_BFExecutor_$_Background in Parse(BFTask+Private.o)
  (error 2) "_OBJC_CLASS_$_BFTask", referenced from:
      objc-class-ref in Parse(PFObject.o)
      objc-class-ref in Parse(PFFile.o)
      objc-class-ref in Parse(PFNetworkCommandRunner.o)
      objc-class-ref in Parse(PFQuery.o)
      objc-class-ref in Parse(PFRetryingCommandRunner.o)
      objc-class-ref in Parse(PFTaskQueue.o)
      objc-class-ref in Parse(PFUser.o)
      ...
  (error 3) "_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
      objc-class-ref in Parse(PFObject.o)
      objc-class-ref in Parse(PFCommandCache.o)
      objc-class-ref in Parse(PFNetworkCommandRunner.o)
      objc-class-ref in Parse(PFTaskHTTPRequestOperation.o)
      objc-class-ref in Parse(BFTask+Private.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation) (error 4)

1 个答案:

答案 0 :(得分:3)

看起来您需要为模拟器构建编译the BoltsFramework

如果它已经没有包含在Parse中,您可以从GitHub下载它。然后确保它的项目设置包括" i386"用于架构,适用于模拟器。