Facebook login on iOS with Parse & cocoapods errors

南笙酒味 提交于 2019-12-08 07:28:59

问题


I'm trying to follow this tutorial to create facebook/twitter authentication from iOS using Parse.

My Podfile looks like this:

platform :ios, '8.1'

xcodeproj 'MyApp'

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

There are a bunch of reports on stackoverflow about library conflicts, but I think they are all old. If I am reading the Podfile.lock file correctly then all of the pods should work with 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)

When I compile, I get 15 errors. Here are the first few...

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:


looks like an problem between Parse latest version and XCode 6.4, update XCode or try this versions, works for me:

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


来源:https://stackoverflow.com/questions/33848301/facebook-login-on-ios-with-parse-cocoapods-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!