apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 990 forks source link

ignores http option in iOS podspec #916

Closed brodycj closed 2 weeks ago

brodycj commented 4 years ago

Bug Report

Problem

What is expected to happen?

This documentation led me to believe that it should be possible to use http option in a <pod> element: https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#pod

I tried this <podspec> configuration for the iOS platform in a new plugin:

    <podspec>
      <!-- empty config element to avoid an installation bug on iOS -->
      <config>
      </config>
      <pods>
        <!-- TODO: MISSING EXTRA-SAFE -DSQLITE_DEFAULT_SYNCHRONOUS=3 FLAG
             AND MISSING SOME OTHER FLAGS FROM ABOVE
             FUTURE TBD CONSIDER SOME OTHER SQLITE FEATURE FLAGS WANTED -->
        <pod name="sqlite3" http="https://github.com/clemensg/sqlite3pod" />
      </pods>
    </podspec>

here: https://github.com/brodybits/cordova-plugin-sqlite-batch-connection-manager-core-unstable-0x/tree/unstable-ios-pod-http-option

While I think the value of this http option is not correct, I would expect Cordova to honor the http option when generating platforms/ios/Podfile.

What does actually happen?

After the following steps to try my podspec configuration in a test app:

cordova plugin add github:brodybits/cordova-plugin-sqlite-batch-connection-manager-core-unstable-0x#unstable-ios-pod-http-option-test
cordova platform add github:apache/cordova-ios#master

I get the following contents of platforms/ios/Podfile:

# DO NOT MODIFY -- auto-generated by Apache Cordova

platform :ios, '11.0'

target 'demo' do
    project 'demo.xcodeproj'
    pod 'sqlite3'
end

with my http tag evidently ignored

general comments

Unfortunately I have not figured out the right way to use the http option for a pod in general.

I do not even know if this is an option that is worth supporting, and would be happy to see it just removed from the documentation.

Information

see above

Command or Code

see above

Environment, Platform, Device

see above & below

Version information

Checklist

dpogue commented 2 weeks ago

As far as I can tell, this option doesn't actually exist in Cocoapods, so removing it from the docs is probably the best choice. I've opened https://github.com/apache/cordova-docs/pull/1358 to do that.