4

I've installed the Parse and Facebook iOS SDKs for my project in Xcode. My project is written in Swift so I have the following in my bridging header:

#import <Parse/Parse.h>
#import <ParseUI/ParseUI.h>
#import <ParseCrashReporting/ParseCrashReporting.h>
#import <Intercom/Intercom.h>
#import <ParseFacebookUtils/PFFacebookUtils.h>

When I build the app, I get 2 errors:

  1. error: 'FacebookSDK/FacebookSDK.h' file not found
  2. error: failed to import bridging header '/Users/ben/AppFolder/MyApp/Bridging-Header.h'

The bridging header is at the directory as shown, so it seems that is dependent on the first error. FacebookSDK.h is in an #import statement at the top of PFFacebookUtils.h:

#import <Foundation/Foundation.h>
#import <FacebookSDK/FacebookSDK.h>
#import <Parse/PFConstants.h>
#import <Parse/PFNullability.h>
#import <Parse/PFUser.h>

FacebookSDK.h does not exist in either the Parse iOS SDK 1.7.1 or the Facebook SDK (presumably 4.0.1) from Facebook's Getting Started page, though I know that FacebookSDK.h was in previous versions.

I tried the approved answer from this SO question without success. Do I need to add something to my bridging header? Should I change the import statement for FacebookSDK.h to reference a different file? Other ideas on how to fix this?

blwinters
  • 1,911
  • 19
  • 40

1 Answers1

8

Instead of

#import <ParseFacebookUtils/PFFacebookUtils.h>

use :

#import <ParseFacebookUtilsV4/PFFacebookUtils.h>

Make sure to add that V4

Rui Braga
  • 96
  • 3
  • Thank you. That got rid of the error, though it exposed a more core bug with the SDKs explained [here](http://stackoverflow.com/questions/29459073/issue-using-fbsdk-in-swift-ios-application). – blwinters Apr 06 '15 at 14:29
  • 1
    I have Parse 1.7.1 and Facebook 4.0.1 via Pods, but I get the `ParseFacebookUtilsV4/PFFacebookUtils.h file not found` error. Any ideas? – Eneko Alonso Apr 07 '15 at 05:20
  • @EnekoAlonso Make sure you've included the ParseFacebookUtilsV4 framework in the Build Phases. – Simon Degn Aug 02 '15 at 18:31