Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PFFacebookUtils.h (1.7.1) imports non-existent FacebookSDK.h

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?

like image 700
blwinters Avatar asked Feb 10 '23 12:02

blwinters


1 Answers

Instead of

#import <ParseFacebookUtils/PFFacebookUtils.h>

use :

#import <ParseFacebookUtilsV4/PFFacebookUtils.h>

Make sure to add that V4

like image 61
Rui Braga Avatar answered Feb 13 '23 02:02

Rui Braga