2

嗨,我已将解析添加到我的 iOS 项目中,并尝试使用 PFLogInViewcontroller 和 PFSignUpViewController。我添加了所有必需的库,特别是 social.framework 和 accounts.framework

但是在初始化“PFLogInViewController”和“PFSignUpViewController”后我得到了6个错误,我写的代码如下:

PFLogInViewController *logInViewController = [[PFLogInViewController alloc] init];
[logInViewController setDelegate:self]; // Set ourselves as the delegate

// Create the sign up view controller
PFSignUpViewController *signUpViewController = [[PFSignUpViewController alloc] init];
[signUpViewController setDelegate:self]; // Set ourselves as the delegate

// Assign our sign up controller to be displayed from the login controller
[logInViewController setSignUpController:signUpViewController];

// Present the log in view controller
[self presentViewController:logInViewController animated:YES completion:NULL];

如果我删除这些行,则构建成功,任何人都可以指导我缺少什么和缺少的地方,以下是错误:

架构 i386 的未定义符号:

"_ACAccountTypeIdentifierTwitter",引用自:-[PF_Twitter getLocalTwitterAccountAsync] in Parse(PF_Twitter.o)

“_OBJC_CLASS_$_ACAccountStore”,引用自: objc-class-ref in Parse(PF_Twitter.o)

“_OBJC_CLASS_$_SLComposeViewController”,引用自:Parse(PF_Twitter.o) 中的 objc-class-ref

“_OBJC_CLASS_$_SLRequest”,引用自: objc-class-ref in Parse(PF_Twitter.o)

"_SLServiceTypeTwitter",引用自:-[PF_Twitter setAccessTokenForReverseAuthAsync:localTwitterAccount:] in Parse(PF_Twitter.o)

  -[PF_Twitter getLocalTwitterAccountAsync] in Parse(PF_Twitter.o)

ld:未找到体系结构 i386 的符号

clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我可以使用故事板使用 PFLogInViewController 吗?

4

1 回答 1

0

尝试使用 cocoapods 安装。这对我有用:)

已编辑

如果您不喜欢使用 cocoapods 安装,只需在 Build 阶段 / Link Binary 中添加“Account.framework”和“Social.framework”与库。

在此处输入图像描述

于 2015-05-21T17:17:57.870 回答