使用 Parse 时出错 - “_OBJC_CLASS_$_ParseClientConfiguration”,引用自:
Error using Parse - "_OBJC_CLASS_$_ParseClientConfiguration", referenced from:
在我的项目中添加 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)
我遵循的步骤如下:
已从 iOS 下载解析 SDK
https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases
在项目中手动添加了 Parse iOS SDK
在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被添加为依赖项。
我通过pod安装Parse SDK并手动添加FBSDKCoreKit解决了这个问题(但没有添加Bolts框架)。 Parse 和 FBSDKCoreKit 都需要 Bolts 但版本不同。我相信 FBSDKCoreKit 安装旧版本的 Bolts,而 Parse 需要更新版本,这就是问题所在。
在我的项目中添加 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)
我遵循的步骤如下:
已从 iOS 下载解析 SDK https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases
在项目中手动添加了 Parse iOS SDK
在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被添加为依赖项。
我通过pod安装Parse SDK并手动添加FBSDKCoreKit解决了这个问题(但没有添加Bolts框架)。 Parse 和 FBSDKCoreKit 都需要 Bolts 但版本不同。我相信 FBSDKCoreKit 安装旧版本的 Bolts,而 Parse 需要更新版本,这就是问题所在。