I am trying to integrate a login with Facebook into my application but this error has me desperate. I have tried all the solutions that are proposed in other discussions but for the moment I could not solve it. My versions are as follows:
cordova --version 9.0.0 (cordova-lib@9.0.1)
ionic --version 5.4.15
cordova-ios: 5.1.1
@ionic/angular: 4.11.10
App.module.ts
import { Facebook } from '@ionic-native/facebook/ngx';
....
providers: [
Facebook,
.....
]
.....
login.page.ts
import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook/ngx';
constructor( private fb: Facebook) { }
async loginFacebook( ) {
this.fb.login(['public_profile', 'email']).then(async (res: FacebookLoginResponse) => {
console.log('Logged into Facebook!', res);
}).catch(err => {
console.error(err);
});
}
When I execute the following command I get the error:
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
/Users/PedroMadrigal/Desktop/escondite/platforms/ios/Escondite/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.h:13:9: fatal error: 'FBSDKCoreKit/FBSDKCoreKit.h' file not found
import FBSDKCoreKit/FBSDKCoreKit.h
1 error generated.
** BUILD FAILED **