[Help] Every sync with Xcode removes Package.resolved

Hi guys,

I’m having an issue with “@capacitor/core”: “^6.1.0”. Every time I sync with Xcode, it removes the Package.resolved file, which deletes the plugin I’ve installed.

I’m stuck because I didn’t have this issue before. If you have any idea how to solve it, I would really appreciate it.

Thanks and kind regards,

Davide

How are you syncing, npx cap sync ios or some other command? And what kind of plugin is this?

If it’s a pod, you need to add in your podfile in ios/App/Podfile:

target 'App' do
  capacitor_pods
  # Add your Pods here
  pod 'Firebase/Messaging'
end
~

Hi, thanks.
The package dependency is: Facebook SDK for iOS.
I wrote plugin but It was a mistake.

I 've installed it via the Xcode package manager.
If I sync it removes the dependencies but I saw if I click to File/Packages/reset Packages Cache in Xcode it reistall the depencendy.

I don’t knwo what changed in my configuration :expressionless:

Swift Package Manager support in Ionic is experimental and probably doesn’t work for third-party deps at this time.

It was supposed to be part of Capacitor 6 (it was emphasized in the RC notes) but it was not part of the final v6, and most capacitor plugins don’t have support yet. See the docs: Swift Package Manager | Capacitor Documentation

If you want something reliable today, install it as a pod; do not use SPM.

Hi, thanks! I’ll try!