cordova/phonegap plugin add VS config.xml

前端 未结 4 1371
长情又很酷
长情又很酷 2021-01-06 21:06

There\'s something I find quite confusing about phonegap/cordova plugins.

For example I can run

cordova plugin add cordova-plugin-whitelist

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 21:25

    The answer is very long. Please read.

    What are exactly the differences between all these different plugin installations? Which one should I use in the end?

    Up until this date (2015-11-05) and for a bit longer, there are subtle differences in the different plugins. Cordova and Phonegap are working to remove that. For all intensive purposes you should use the *NEW* plugin repository

    NEW Plugin Repository: http://cordova.apache.org/plugins/

    NEW CORE Plugin List: http://cordova.apache.org/docs/en/5.1.1/cordova/plugins/pluginapis.html (Note: those plugin not on this list are not core.)

    I want the same plugins to be available on all the other developers computers, in the exact same version to have a stable and reproductible environment (and the CLI does not seem to specify the version...). Should I include anything of my /plugins folder to Git?

    No. For now, just use the current NPM system. You may want to use the --save option so that you retain a copy of the plugin you are using. CAUTION: this has side effects. Read the Cordova docs for more information.

    NOTE FOR TEAMS: Many frameworks want you to use the "leading" edge, sold as "latest and greatest". This has many, many side effects. Cordova and Phonegap both have an versioning option. Learn to use it.

    This will help: http://devgirl.org/2014/11/07/cordovaphonegap-version-confusion/


    HOW TO apply the Cordova/Phonegap the whitelist system

    I Quote:

    Here is the breakdown.

    For the whitelist system used with Cordova, there is actually four (4) unrelated systems in place.

    1. legacy-whitelist plugin (avoid) was the previous whitelist system. It is provided for backwards compatibilty only.
    2. whitelist plugin (Cordova's) is the new whitelist system. It is required as of Cordova Tools 4.0.0. It has three (3) parts.
    3. W3's CSP (Content Security Policy Level 2) is a whitelist system that is implemented webpage by webpage. It is required as of Cordova Tools 5.0.0. It has sixteen (16) parts.
    4. Apple's ATS (App Transport Security) is a whitelist system exclusive to iOS. It required as of iOS9. It is implemented in the Info.plist

提交回复
热议问题