bug: No such module 'FirebaseCore' with just the Analytics plugin
TomDoesb opened this issue ยท comments
Plugin(s)
- Analytics
- App
- App Check
- Authentication
- Crashlytics
- Cloud Firestore
- Cloud Messaging
- Cloud Storage
- Performance
- Remote Config
Version
6.0.0
Platform(s)
- Android
- iOS
- Web
Current behavior
I've added the analytics package to my project following the readme and updated the pod file as described.
When building the project in Xcode it fails with No such module 'FirebaseCore'
I could reproduce this error in a minimal reproducible example. The link is added below.
XCode version: 15.3 (15E204a)
Ive checked related closed issues but solutions described there did not resolve the issue.
Expected behavior
I expected a successful build
Reproduction
https://github.com/TomDoesb/.capacitor-app
Steps to reproduce
- Open the repo in xcode
- Build
- Behold the
No such module 'FirebaseCore'
Other information
No response
Capacitor doctor
npx cap doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
๐ Capacitor Doctor ๐
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/android: not installed
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/ios: 6.0.0
[success] iOS looking great! ๐
Before submitting
- I have read and followed the bug report guidelines.
- I have attached links to possibly related issues and discussions.
- I understand that incomplete issues (e.g. without reproduction) are closed.
Please follow the installation instructions for iOS correctly, see iOS:
Add the `CapacitorFirebaseAnalytics/Analytics` pod to your `Podfile` (usually `ios/App/Podfile`):
```diff
target 'App' do
capacitor_pods
# Add your Pods here
+ pod 'CapacitorFirebaseAnalytics/Analytics', :path => '../../node_modules/@capacitor-firebase/analytics'
end
```
Thanks! Pff thats a subtle difference. I think it would help if the documentation states something like:
Note: this line is subtly different than the line added by capacitor in the capacitor_pods section
I think most people just copy the line. Im closing this issue as resolved.
The pod file shouldn't really be changed manually, a simple command like npx cap sync will overwrite these changes every time. That's how I just ran into this bug.
@tomkortjak That's not correct. The npx cap sync
command only overwrites the def capacitor_pods
section. That's why the pod must be added to the target 'App' do
section. This is not a bug. That's just the way how you configure the pods.
Yes, you're right. Skipped right over that part of the documentation, sorry! ๐