blakgeek / cordova-plugin-cocoapods-support

A Cordova/PhoneGap plugin to add support for CocoaPods dependencies.
MIT License
72 stars 72 forks source link

Failed to install 'my-plugin-name': Error: Variable(s) missing: PODS_IOS_MIN_VERSION #40

Closed Cyclic closed 6 years ago

Cyclic commented 6 years ago

Has anyone else run into this? See error and platforms xml below. The plugin is added to the project. Thanks in advance!

Failed to install 'x-y-z': Error: Variable(s) missing: PODS_IOS_MIN_VERSION
    at Object.mergeVariables (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/variable-merge.js:58:15)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:315:44
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

My xml looks like this:

<platform name="ios">
    <config-file target="config.xml" parent="/*">
            <feature name="MyPlugin">
                <param name="ios-package" value="MyPluginSwift" />
            </feature>
        </config-file>
        <preference name="pods_ios_min_version" value="8.0"/>
    <pod name="MyPlugin" git="https://github.com/cyclic/MyPlugin" branch="develop" />
        <source-file src="src/ios/Yada.swift" target-dir="src/com/yada/plugin" />
    </platform>
blakgeek commented 6 years ago

I'm sure you've probably figured this out already but you're using <preference> which is only supported in the config.xml. What you should be using is <pods-config>

Try this instead

<pods-config ios-min-version="8.0">