Closed matthieup240 closed 4 years ago
TL;DR: Are you using v.5.x of this plugin and using the .xcodeproj file? In this case, you should be using the .xcworkspace file since Cocoa Pods require this.
In my case, this error msg didn't show when I manually built my project via Xcode 10.1 (10B61) using the .xcworkspace file.
However, when I use my fastlane setup, the error popped up towards the end. Here's the relevant context in my case.
While building module 'Firebase' imported from /...path.../Plugins/cordova-plugin-firebase-lib/FirebasePlugin.m:4:
In file included from <module-includes>:1:
/...path.../platforms/ios/Pods/Headers/Public/Firebase/Firebase.h:1:9: fatal error: 'FirebaseCore/FirebaseCore.h' file not found
#import <FirebaseCore/FirebaseCore.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/...path.../Plugins/cordova-plugin-firebase-lib/FirebasePlugin.m:4:9: fatal error: could not build module 'Firebase'
#import "Firebase.h"
~~~~~~~^~~~~~~~~~~~
2 errors generated.
Fix In my case, I knew something with my Fastlane configuration was suddenly wrong since I could manually build and export the IPA file through Xcode. When going over my Fastfile, specifically my usage of gym(), I realised I was using the .xcodeproj file to refer to my project and not the .xcworkspace file. I changed the gym config, and it worked.
When working with Cocoa pods (used in v.5.x of this plugin), the use of .xcworkspace is required. This is also mentioned in the docs of this library.
If you are building your app using Xcode, please open platform/ios/my-cordova-project.xcworkspace instead of platform/ios/my-cordova-project.xcodeproj so that the Xcode can load both Cordova app & the Pods (https://github.com/wizpanda/cordova-plugin-firebase-lib#cocoapods)
Changing it worked for me!
@tux240 are you still having this issue?
No, I resolved it by opening the project with the .xcworkspace file !
Great! I’m closing this.
Describe the bug
Hello,
I trying to build the IOS platform but get this fatal error about firebase.h file.
Did you already get this kind of error ?
Thanks
Here is my ionic info :