capawesome-team / capacitor-firebase

โšก๏ธ Firebase plugins for Capacitor. Supports Android, iOS and the Web.

Home Page:https://capawesome.io/plugins/firebase/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Open the repo in xcode
  2. Build
  3. 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! ๐Ÿ˜