brodybits opened a new issue #913: URL: https://github.com/apache/cordova-ios/issues/913
# Bug Report ## Problem While working on a new SQLite plugin version, I would like to use sqlite3 pod in a very simple manner. My understanding of <https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#podspec-ios> is that it should be enough to add the following lines to `plugin.xml` within `<platform name="ios">`: ```xml <podspec> <pods> <pod name="sqlite3" spec="~> 3.32.3" /> </pods> </podspec> ``` ### What is expected to happen? I should be able to use the Cordova CLI to add my new plugin and then do `cordova platform add ios@latest`. ### What does actually happen? When I do `cordova platform add ios@latest`, it fails with the following nonsense error output: ``` Failed to install 'cordova-plugin-sqlite-batch-connection-manager-core': TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at /Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/platforms/ios/cordova/Api.js:374:20 at Array.forEach (<anonymous>) at Api.addPodSpecs (/Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/platforms/ios/cordova/Api.js:355:18) at /Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/platforms/ios/cordova/Api.js:278:29 at _fulfilled (/Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/node_modules/q/q.js:854:54) at /Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/node_modules/q/q.js:883:30 at Promise.promise.promiseDispatch (/Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/node_modules/q/q.js:816:13) at /Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/node_modules/q/q.js:624:44 at runSingle (/Users/brodybits/dev/cordova-plugin-sqlite-batch-connection-manager-core/demo/node_modules/q/q.js:137:13) ``` Quick workaround is to add an empty config element like this: ```xml <podspec> <config> </config> <pods> <pod name="sqlite3" spec="~> 3.32.3" /> </pods> </podspec> ``` ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> Reproduction plugin is here: <https://github.com/brodybits/cordova-plugin-sqlite-batch-connection-manager-core-unstable-0x/tree/reproduce-cordova-ios-podspec-issue> From a quick look I think this issue is lurking in cordova-common. For some reason this does not seem to be an issue with cordova-osx. ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ``` cordova plugin add github:brodybits/cordova-plugin-sqlite-batch-connection-manager-core-unstable-0x#reproduce-cordova-ios-podspec-issue cordova platform add ios@latest ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> cordova --version: 9.0.0 ([email protected]) Cordova platform: iOS Cordova plugin: see above ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
