【问题标题】:Error using Parse - "_OBJC_CLASS_$_ParseClientConfiguration", referenced from:使用 Parse 时出错 - “_OBJC_CLASS_$_ParseClientConfiguration”,引用自:
【发布时间】:2017-06-28 19:07:59
【问题描述】:

在我的项目中添加 Parse 后出现两个错误:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_ParseClientConfiguration", referenced from:
      objc-class-ref in AppDelegate.o

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我遵循的步骤如下:

  1. 从下载 Parse iOS SDK https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases

  2. 在 Project 中手动添加 Parse iOS SDK

  3. 在 AppDelegate.m 中添加了#import

然后在didFinishLaunchingWithOptions中添加如下代码。

[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
   configuration.applicationId = @"YOUR_APP_ID";
   configuration.clientKey = @"YOUR_APP_CLIENT_KEY";
   configuration.server = @"http://localhost:1337/parse";
}]];

注意:我没有添加 Bolts.Framework,因为当我通过 Pod 安装 FBSDKCoreKit 时,会添加 Bolts 作为依赖项。

【问题讨论】:

  • 请在打开新问题之前使用谷歌搜索问题。这是问题Undefined symbols for architecture
  • 为什么不通过pod添加SDK呢?
  • 通过 Pod 安装 Parse 还会安装与作为 FBSDKCoreKit 依赖项安装的 Bolts 冲突的 Bolts。
  • 我没有收到有关部署目标的警告,我还尝试通过 Pod 安装,正如我在上面的评论中提到的那样。但它没有用。感谢您的建议,但这不是我的问题的答案。 @纳齐尔

标签: ios objective-c xcode parse-platform buddy.com


【解决方案1】:

我通过 pod 安装 Parse SDK 并手动添加 FBSDKCoreKit 解决了这个问题(但没有添加 Bolts 框架)。 Parse 和 FBSDKCoreKit 都需要 Bolts,但版本不同。我相信 FBSDKCoreKit 安装了旧版本的 Bolts,而 Parse 需要更新版本,这就是问题所在。

【讨论】:

    猜你喜欢
    • 2014-01-10
    • 2020-01-17
    • 1970-01-01
    • 1970-01-01
    • 2011-05-12
    • 1970-01-01
    • 1970-01-01
    • 2021-06-10
    • 1970-01-01
    相关资源
    最近更新 更多