【问题标题】:Linker errors with ParseUI iOS and CocoaPodsParseUI iOS 和 CocoaPods 的链接器错误
【发布时间】:2025-12-13 00:35:01
【问题描述】:

我正在尝试使用 Parse 构建一个应用程序,并想尝试一下 ParseUI。我使用 Cocoa pod 导入了 Parse 的主 SDK,它运行良好。当我决定添加 ParseUI 时,我遇到了问题。

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
      objc-class-ref in PFImageView.o
  "_OBJC_CLASS_$_PFProduct", referenced from:
      objc-class-ref in PFProductTableViewController.o
     (maybe you meant: _OBJC_CLASS_$_PFProductTableViewController)
  "_OBJC_CLASS_$_PFPurchase", referenced from:
      objc-class-ref in PFProductTableViewController.o
     (maybe you meant: _OBJC_CLASS_$_PFPurchaseTableViewCell)
  "_OBJC_CLASS_$_PFQuery", referenced from:
      objc-class-ref in PFQueryTableViewController.o
     (maybe you meant: _OBJC_CLASS_$_PFQueryTableViewController)
  "_OBJC_CLASS_$_PFTwitterUtils", referenced from:
      objc-class-ref in PFLogInViewController.o
  "_OBJC_CLASS_$_PFUser", referenced from:
      objc-class-ref in PFLogInViewController.o
      objc-class-ref in PFSignUpViewController.o
  "_PFParseErrorDomain", referenced from:
      -[PFImageView loadInBackground:] in PFImageView.o
      ___32-[PFImageView loadInBackground:]_block_invoke30 in PFImageView.o
      -[PFSignUpViewController _signUpAction] in PFSignUpViewController.o
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
      -[PFImageView loadInBackground:] in PFImageView.o
      ___32-[PFImageView loadInBackground:]_block_invoke30 in PFImageView.o
      -[PFSignUpViewController _signUpAction] in PFSignUpViewController.o
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorCacheMiss", referenced from:
      ___48-[PFQueryTableViewController loadObjects:clear:]_block_invoke in PFQueryTableViewController.o
  "_kPFErrorInvalidEmailAddress", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorInvalidImageData", referenced from:
      ___32-[PFImageView loadInBackground:]_block_invoke30 in PFImageView.o
  "_kPFErrorUnsavedFile", referenced from:
      -[PFImageView loadInBackground:] in PFImageView.o
  "_kPFErrorUserEmailMissing", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorUserEmailTaken", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorUserPasswordMissing", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorUsernameMissing", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
  "_kPFErrorUsernameTaken", referenced from:
      -[PFSignUpViewController _signUpDidFailWithError:] in PFSignUpViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试过强制包含 Parse.framework 以链接 ParseUI,但它似乎没有帮助。我不是 cocoapods 或 XCode 方面的专家,所以我不知道我是否缺少明显的东西。

我试过 cocoapods 0.35 和 0.36-beta-1。这是一个快速的项目,所以我不知道这是否会导致一些问题。

【问题讨论】:

  • 顶一下,我也遇到了同样的问题

标签: parse-platform cocoapods parseui


【解决方案1】:

您需要使用框架 Bolts.frameworks。该框架是 Parse SDK 的一部分。另一件事是,使用最新版本的 Parse SDK(现在为 v1.6.2),您必须导入 Parse/Parse.h、ParseUI/ParseUI.h 或两者,具体取决于您使用的对象。 如果您需要有关安装 de Bolts 框架的更多信息,请告诉我! :)

【讨论】:

  • 我遇到了各种各样的链接错误,添加“螺栓”框架修复了所有问题。为什么 Parse 的“快速入门”说明没有提到它?