Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why isn't Xcode identifying PFFacebookUtils?

Xcode 6 beta is recognizing Parse but not PFFacebookUtils when i am trying to initialize both in appdelegate.m

here is how i am doing the integration of Facebook SDK

i am using cocoa pods to add parse and Facebook to iOS project. i am using Xcode 6 beta. i create pod file this way

platform :ios, '8.0'

pod 'Parse'

i run pod install at terminal and this downloads parse and Facebook SDK

Now i import parse in appdelegate.m

using

#import <Parse/Parse.h>
like image 722
silverkid Avatar asked Sep 04 '14 06:09

silverkid


1 Answers

With v1.2.21 of the Parse library, PFFacebookUtils.h has moved into another Framework, ParseFacebookUtils. Xcode isn't recognising PFFacebookUtils.h because it most likely doesn't exist anymore.

You need to add the ParseFacebookUtils pod to your Podfile:

pod 'ParseFacebookUtils', '~> 1.2'

BUT, there is an issue with this. The Parse pod spec lists Facebook-iOS-SDK v3.17 as a dependency, and the ParseFacebookUtils spec lists an alternative Parse podspec (Parse-iOS) as well as Facebook-iOS-SDK v3.9.0 as a dependency, which is obviously a conflict. You don't need 2x parse libraries, and incompatible versions of the Facebook SDK floating around.

I've forked and updated a version of the ParseFacebookUtils spec on github, that solves both these problems. If you'd like to use it add the following to your podfile:

pod 'ParseFacebookUtils', :podspec => 'https://raw.githubusercontent.com/rickerbh/ParseFacebookUtilsSpec/master/ParseFacebookUtils.podspec.json'

And be sure to

#import <ParseFacebookUtils/PFFacebookUtils.h>

as well so your project knows about PFFacebookUtils

like image 141
rickerbh Avatar answered Sep 29 '22 08:09

rickerbh