【问题标题】:Swift Parse PubNub Mach-O Errors [duplicate]Swift Parse PubNub Mach-O 错误 [重复]
【发布时间】:2015-05-22 16:18:09
【问题描述】:

我正在使用 Swift、Parse 和 PubNub 创建一个应用程序。我使用 pod 来安装 Parse 和 PubNub,它们似乎安装得很好。但是,我得到了所有这些编译错误,并且不确定我应该寻找哪个方向来解决它们。

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_PFObject", referenced from:
  __TMaCSo8PFObject in ViewController.o
  __TMaCSo8PFObject in LogInViewController.o
"_OBJC_CLASS_$_PFQuery", referenced from:
  __TMaCSo7PFQuery in LogInViewController.o
"_OBJC_CLASS_$_PFUser", referenced from:
  __TMaCSo6PFUser in SignUpViewController.o
  __TMaCSo6PFUser in ViewController.o
  __TMaCSo6PFUser in LogInViewController.o
"_OBJC_CLASS_$_PNChannel", referenced from:
  __TMaCSo9PNChannel in ViewController.o
"_OBJC_CLASS_$_PNConfiguration", referenced from:
  __TMaCSo15PNConfiguration in ViewController.o
"_OBJC_CLASS_$_Parse", referenced from:
  __TMaCSo5Parse in AppDelegate.o
"_OBJC_CLASS_$_PubNub", referenced from:
  __TMaCSo6PubNub in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

  • 确保你是Import'ing你的框架。
  • 查看我之前对类似问题的回答here。这可能会对您有所帮助,因为 Match-O 错误往往是通用的。

标签: ios swift parse-platform cocoapods pubnub


【解决方案1】:

我正在开发一个使用 Parse Pod 的 Swift iOS 应用程序。

我做了以下事情来编译它:

  1. 在 Podfile 中更新到 Parse 版本 1.7.4
  2. 在 Pods 项目中,将“Allow non-module includes in Framework modules”设置为 YES
    1. 别忘了添加 use_frameworks!到你的 podfile

【讨论】:

    猜你喜欢
    • 2013-12-08
    • 2023-04-10
    • 1970-01-01
    • 2015-09-02
    • 2017-11-14
    • 1970-01-01
    • 2015-08-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多