Repository navigation
feat(cli): resolve the iOS Swift package from NPM package - #8644
theproducer wants to merge 9 commits into
Conversation
# Conflicts: # cli/src/util/capacitor-package.ts
jcesarmobile
left a comment
There was a problem hiding this comment.
I would remove the whole capacitorPackage configuration that was added earlier, I see no point in letting people use a different version than the npm installed version, we have nightlies if people want to use unreleased changes, or cloning the repo and installing from a local folder is always an option.
Following changes coming via ionic-team/capacitor#8644
jcesarmobile
left a comment
There was a problem hiding this comment.
I tested with a Capacitor plugin and a Cordova plugin and it was patching/generating their Package.swift files fine, but since there is code for handling the case of an older @capacitor/ios version being installed, I installed @capacitor/ios 8.x and when I ran sync, the cordova plugin's Package.swift was generated fine, but the Capacitor plugin was still using the path instead of the capacitor-swift-spm.
To be honest, I don't think we should have that code for handing older @capacitor/ios versions, it should assume it's Capacitor 9 or newer, we can keep the Package.swift file check so in case users are using a previous alpha they are instructed to update, that would also fire if they are in 8.x or older, at the moment it doesn't fire because we do the version check first.
So, I short, we should not point to capacitor-swift-pm repository, we should always point to the locally installed @capacitor/ios and if it doesn't have a Package.swift, warn about it (it already does)
Description
Now that Capacitor for iOS is distributed via a source package and not a binary xcframework, we no longer need to fetch the package remotely, it can resolved from inside the NPM package itself.
Change Type
Rationale / Problems Fixed
Tests or Reproductions
Screenshots / Media
Platforms Affected
Notes / Comments