1

我正在尝试按照本教程使用 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

stackoverflow 上有很多关于库冲突的报告,但我认为它们都是旧的。如果我正确读取 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) {
4

1 回答 1

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'
于 2015-11-22T00:59:59.393 回答