Closed moh4sa closed 1 week ago
I know from https://github.com/capawesome-team/capacitor-firebase/issues/731 that the problem is the Firebase Messaging pod. Have you tried using the same version of the pod that the plugin uses?
Currently this is ~> 10.25
, see https://github.com/capawesome-team/capacitor-firebase/blob/1075c9caf328b1acf670f71b199834a3e14ef9f7/packages/messaging/CapacitorFirebaseMessaging.podspec#L16C38-L16C46.
target 'pushextension' do
- pod 'FirebaseMessaging'
+ pod 'FirebaseMessaging', '~> 10.25'
end
@robingenz this is what I got:
[capacitor] ✖ update ios - failed!
[capacitor] [error] Analyzing dependencies
[capacitor] [!] CocoaPods could not find compatible versions for pod "Firebase/Messaging~> 10.25":
[capacitor] In Podfile:
[capacitor] Firebase/Messaging~> 10.25
[capacitor]
[capacitor] None of your spec sources contain a spec satisfying the dependency: Firebase/Messaging~> 10.25
.
How does your Podfile look?
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
platform :ios, '15.0'
use_frameworks!
# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorFirebaseAnalytics', :path => '../../node_modules/@capacitor-firebase/analytics'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
end
target 'App' do
capacitor_pods
# Add your Pods here
pod 'Firebase/Messaging' '~> 10.25'
pod 'CapacitorFirebaseAnalytics/Analytics', :path => '../../node_modules/@capacitor-firebase/analytics'
end
target 'NotificationService' do
pod 'Firebase/Messaging' '~> 10.25'
end
post_install do |installer|
assertDeploymentTarget(installer)
end
You forgot the comma. Please copy the text as I have provided it here.
@robingenz I got new error node_modules/@capacitor-firebase/analytics/ios/Plugin/FirebaseAnalytics.swift:4:8 No such module 'FirebaseCore'
This is another error that has already been solved, see: https://github.com/capawesome-team/capacitor-firebase/issues/622. For this reason, I am closing this issue as resolved.
@robingenz Multiple commands produce `'/Users/xx/Library/Developer/Xcode/DerivedData/App-ezouattdyjhpmjfmuuwbpceeevmy/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities_Privacy.bundle'
Showing All Messages Target 'GoogleUtilities-54d832b6-GoogleUtilities_Privacy' (project 'Pods') has create directory command with output '/Users/mohdalshehri/Library/Developer/Xcode/DerivedData/App-ezouattdyjhpmjfmuuwbpceeevmy/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities_Privacy.bundle'
Showing All Messages Target 'GoogleUtilities-7cacef58-GoogleUtilities_Privacy' (project 'Pods') has create directory command with output '/Users/mohdalshehri/Library/Developer/Xcode/DerivedData/App-ezouattdyjhpmjfmuuwbpceeevmy/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities_Privacy.bundle'`
this is the main issue I am facing since #731
Do you have the full error message? These are just normal log outputs.
The error you mentioned in #731 seems to be a different one:
Target 'GoogleUtilities-7cacef58' (project 'Pods') has create directory command with output '/Users/mohdalshehri/Library/Developer/Xcode/DerivedData/App-ezouattdyjhpmjfmuuwbpceeevmy/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
here is a screenshot of the full error:
Remove the following code from your Podfile
:
target 'pushextension' do
pod 'FirebaseMessaging', '~> 10.25'
end
Now sync your Capacitor project (npy cap sync
) and try it again.
@robingenz but this is needed for push notification service extension otherwise the feature it wont work
Have you tested it? The pod is already added by the plugin itself.
yes @robingenz it gives me this error
You use the Capacitor Firebase Messaging plugin from Capawesome, right? You are NOT using the Capacitor Push Notifications plugin.
no Im using the official plugin from capacitor https://capacitorjs.com/docs/guides/push-notifications-firebase#images-in-push-notifications
As already mentioned, please use the Capacitor Firebase Messaging plugin from Capawesome so that there are no conflicts with the SDK version.
I will use it if it supportsNotification Service Extension
but as far as I know it doesn't which is why I created this Feature request to migrate to Capacitor Firebase Messaging after it support Notification Service Extension
otherwise I can't use @capacitor-firebase
do to these conflicts
The Notification Service Extension should already work with @capacitor-firebase/messaging
as this is a feature of the Firebase Messaging SDK (and not the plugin). There are just no docs for it. If you swap the plugins and remove the code block from the Podfile
, it should work.
@robingenz I've tried it, but it gives me the same error as before.
yes @robingenz it gives me this error
Plugin(s)
Current problem
currently
@capacitor-firebase/messaging
does support Notification Service ExtensionPreferred solution
add support for "Notification Service Extension"
Alternative options
https://capacitorjs.com/docs/guides/push-notifications-firebase#images-in-push-notifications
Additional context
No response
Before submitting