jcesarmobile commented on code in PR #1430:
URL: https://github.com/apache/cordova-ios/pull/1430#discussion_r1737571050


##########
lib/Api.js:
##########
@@ -279,6 +279,11 @@ class Api {
                     return this.addPodSpecs(plugin, podSpecs, installOptions);
                 }
             })
+            .then(() => {
+                if (plugin != null && plugin.dir && 
fs.existsSync(path.join(plugin.dir, 'Package.swift'))) {

Review Comment:
   The point of having a Package.swift file is to turn the plugin into a swift 
package itself.
   Having the Package.swift file makes it possible to add other swift packages 
the plugin wants to use as dependencies the “swift package way”.
   
   Adding the Package.swift file in a framework tag makes no sense, in any case 
we could totally ditch the Package.swift file from plugins and use the 
framework tag to declare SPM dependencies, and then read the tag and write the 
dependencies in the CordovaPluginsSPM/Package.swift file but the tag will fall 
short for all the possible options and will end up creating a new tag in a 
future release as we did for CocoaPods.
   The CLI should also copy the plugin files to the CordovaPluginsSPM project 
instead of to the app as if the plugin relies in the dependency and the 
dependency is in CordovaPluginsSPM project the plugin files should be there.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to