Facebook使用Parse& amp;登录iOS cocoapods错误

时间:2015-11-21 20:36:27

标签: ios facebook parse-platform cocoapods bolts-framework

我尝试按照this tutorial使用Parse从iOS创建facebook / twitter身份验证。

我的Podfile如下所示:

platform :ios, '8.1'

xcodeproj 'MyApp'

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

关于库冲突的堆栈溢出有很多报告,但我认为它们都是旧的。如果我正确读取Podfile.lock文件,那么所有pod都应该使用Bolts 1.5

  - Bolts (1.5.0):
    - Bolts/AppLinks (= 1.5.0)
    - Bolts/Tasks (= 1.5.0)
  - Bolts/AppLinks (1.5.0):
    - Bolts/Tasks
  - Bolts/Tasks (1.5.0)
  - FBSDKCoreKit (4.8.0):
    - Bolts (~> 1.1)
    - FBSDKCoreKit/arc (= 4.8.0)
    - FBSDKCoreKit/no-arc (= 4.8.0)
  - FBSDKCoreKit/arc (4.8.0):
    - Bolts (~> 1.1)
  - FBSDKCoreKit/no-arc (4.8.0):
    - Bolts (~> 1.1)
    - FBSDKCoreKit/arc
  - FBSDKLoginKit (4.8.0):
    - FBSDKCoreKit
  - Parse (1.10.0):
    - Bolts/Tasks (~> 1.5)
  - ParseFacebookUtilsV4 (1.9.1):
    - Bolts/Tasks (>= 1.5)
    - FBSDKCoreKit (~> 4.8)
    - FBSDKLoginKit (~> 4.8)
    - Parse (~> 1.9)
  - ParseTwitterUtils (1.9.1):
    - Bolts/Tasks (~> 1.5)
    - Parse (~> 1.9)
  - ParseUI (1.1.7):
    - Bolts/Tasks (~> 1.3)
    - Parse (~> 1.9)

当我编译时,我得到15个错误。这是前几个......

Controller/PFCurrentConfigController.m:81:88: error: expected '>'
        return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {
                                                                                       ^
Controller/PFCurrentConfigController.m:81:88: error: interface type 'BFTask' cannot be passed by value; did you forget * in 'BFTask'?
        return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {
                                                                                       ^
                                                                              *
Controller/PFCurrentConfigController.m:81:88: error: expected ')'
Controller/PFCurrentConfigController.m:81:78: note: to match this '('
        return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {

1 个答案:

答案 0 :(得分:4)

看起来像Parse最新版本和XCode 6.4之间的问题,更新XCode或试用这个版本,对我有用:

pod 'Parse', '1.8.1'
pod 'ParseUI'
pod 'ParseFacebookUtilsV4', '~> 1.8'
pod 'ParseTwitterUtils', '~> 1.8'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'