【问题标题】:Can't using Parse + Facebook authentification无法使用 Parse + Facebook 身份验证
【发布时间】:2016-04-14 04:58:43
【问题描述】:

我尝试过使用 parse + facebook auth。我正在学习一个教程,当我在文件上编译我的项目时遇到了一些错误:PFFacebookAuthentificationProvider.h/m

/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:17:26: error: expected parameter declarator
@class BFTask PF_GENERIC(__covariant BFGenericType);
                     ^
/Users/Y.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:17:26: error: expected ')'
/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:17:25: note: to match this '('
@class BFTask PF_GENERIC(__covariant BFGenericType);
                    ^
/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:17:15: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
@class BFTask PF_GENERIC(__covariant BFGenericType);
          ^
/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:43:4: error: expected a type
 - (BFTask *)authenticateAsyncWithReadPermissions:(nullable NSArray PF_GENERIC(NSString *) *)readPermissions
^/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:43:51: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'NSArray'
- (BFTask *)authenticateAsyncWithReadPermissions:(nullable NSArray PF_GENERIC(NSString *) *)readPermissions
                                              ^
/Users/.../Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:43:68: error: expected ')'
- (BFTask *)authenticateAsyncWithReadPermissions:(nullable NSArray PF_GENERIC(NSString *) *)readPermissions

20 个错误。 这是我的 podfile:

platform :ios, '8.1'

xcodeproj 'Test'

target :Test, :exclusive => true do
    pod 'Parse'
    pod 'ParseUI'
    pod 'ParseFacebookUtilsV4'
    pod 'FBSDKCoreKit'
    pod 'FBSDKLoginKit'
end

【问题讨论】:

    标签: ios facebook authentication parse-platform


    【解决方案1】:

    我有同样的问题。我修复它的方法是返回一个版本的解析......

    pod 'Parse', '~>1.11.0'

    我认为该问题与 ParseFacebookUtilsV4 Pod 未更新到最新版本有关。无论哪种方式,这应该让你现在恢复并运行。

    【讨论】:

    • 非常感谢,已解决问题。但这很奇怪,因为我使用的是 1.12 版本
    • 是的,我遇到了同样的问题。 Parse 1.12.0 似乎还没有为 FB 集成做好准备。我注意到 PFSubclassing 和 PFObject 类在使用 cocoapods 更新到 Parse 1.12.0 后改变了颜色(编译器)。我想它们最终是用 swift 编写的,但在更新之后,ParseFacebookUtilsV4 等其他依赖库开始抱怨,因为我相信它们仍然有 Objective-c 代码。无论如何,降级到 Parse 1.11.0 消除了我看到的大量错误,但不知道为什么。谢谢你的回答。
    【解决方案2】:

    检查您的 plist 以获得正确的权限。

    【讨论】:

    • 你能说得更清楚些吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-24
    • 2016-03-11
    • 2011-08-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多