使用Parse时出错

编程入门 行业动态 更新时间:2024-10-26 10:39:34
使用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)

我遵循的步骤如下:

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

在Project中手动添加了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被添加为依赖项。

I am getting two errors after adding Parse in my Project:

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)

Steps I followed are as follows:

Downloaded Parse iOS SDK from https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases

Added Parse iOS SDK manually in Project

Added #import in AppDelegate.m

and then added the code below in 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"; }]];

Note: I did not add Bolts.Framework because when I install FBSDKCoreKit via Pod, Bolts is added as a dependency.

最满意答案

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

I solved this issue by installing Parse SDK via pod and adding FBSDKCoreKit manually (but did not add Bolts framework). Parse and FBSDKCoreKit both require Bolts but different versions. I believe that FBSDKCoreKit installs older version of Bolts while Parse needs newer version and that was the issue.

更多推荐

本文发布于:2023-04-28 04:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329836.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Parse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!