There have been some odd inconsistencies in the documentation, and I want to make sure I;m using the right packages. My primary concern is Pro deploy.
This documentation: https://ionicframework.com/docs/native/pro/ says that I need to install cordova-plugin-ionic and @ionic-native/pro, and describes a Promise-based live deploy API.
Contradicting this, this doumentation https://ionicframework.com/docs/pro/basics/getting-started/#pro-client-setup says I need to install @ionic/pro, and has an async API.
Which one do I use? Or do I use both?
Hi there,
I ran into this too; basically you can use either one. The @ionic/pro package is written by the Ionic team; the @ionic-native/pro package is written by contributors but maintained by Ionic (from what I can tell in the commit history, anyway).
They do the same thing and they communicate with the exact same native plugin, cordova-plugin-ionic
. The ionic-native
package provides an easier-to-use interface, however the @ionic/pro
package also includes the checkAndApply
function which is a custom function to manually trigger updates, but apply them automatically, and is a convenience wrapper over the same functions exposed by ionic-native/pro
.
In other words - use whichever you feel more comfortable with, they both access the same Cordova plugin.
Personally I am using the native one simply because that is one less package to import but it ends up the same really.