Reputation: 935
It have two steps:
cordova-plugin-ionic-keyboard
@ionic-native/keyboard
How are these two related? How are their versions related? If i am installing a specific version of keyboard am i supposed to pick corresponding version for cordova as well? For example @ionic-native/keyboard
is at 5.21.5
and cordova-plugin-ionic-keyboard
is at 2.2.0
.
config.xml
signifies? Does this have any impact to the ios version that i am using to build my app?<engine name="ios" spec="^5.0.0" />
ngx
folder. I wanted to find the first version from where they had this change and was not able to undenstand the documentation. How to keep these impacts minimum!?Upvotes: 0
Views: 264
Reputation: 35
For your first question:
ionic cordova plugin add command will download the cordova plugin with containe package.json, config.xml and save the plugin into your folder and set it for each plateform you use.
ionic-native as you said is simply a wrapper to the plugin you've just added. It install the package keyboard to your node-modules folder and sets the right way the plugin into the package.json. Also you can inject into the Angular provider wherever you need to use the plugin.
This line:
<engine name="ios" spec="^5.0.0" />
will be used by the builder to know which ios configuration it will use for the ios engine. Also hen you use an emulator to try making your app work localy. Every plugin may have an iOS version / Android Version / Windows Phone Version. Some features if you modify this config file will be not available on certain plateform. So for your third question, when you make a build or using "ionic serve" the package.json will be read and it will create a package-lock.json. These files are needed to build or localy run the app.
Finally, When you use these kind of plugins, i suggest you to create, class or services that are separated of your main code. In this case, if something change, you just have to modify one "File" and then all your app will continue working fine. In your main code just a
import {MyKeyboardClass} from "../shared-components/keyboard";
makes your code simple and easily alterable.
Hopes this help :)
Upvotes: 1