Andrew Fletcher published: 18 April 2022 1 minute read
Need to know how run updates for Capacitor?
Updating Capacitor
Update Capacitor Core and CLI with the commands:
npm install @capacitor/cli
npm install @capacitor/coreWhereas, to update the relevant platforms in use:
npm install @capacitor/ios
npm install @capacitor/android
Capacitor version - how to get and set?
Getting the version details
Finding the version you are using for Capacitor, so something like
Capacitor:
Capacitor CLI : 2.4.2
@capacitor/android : 1.5.3
@capacitor/core : 1.5.3
@capacitor/ios : 1.5.3This is part of an output from the ionic command
ionic infoThe full output for me is
Ionic:
Ionic CLI : 6.19.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.9.1
@angular-devkit/build-angular : 13.0.3
@angular-devkit/schematics : 13.0.3
@angular/cli : 13.0.3
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.3.2
@capacitor/android : 3.3.2
@capacitor/core : 3.4.0
@capacitor/ios : 3.4.3
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
ios-deploy : 1.11.4
ios-sim : ios-sim/9.0.0 darwin-x64 node-v17.4.0
NodeJS : v17.4.0 (/usr/local/Cellar/node/17.4.0/bin/node)
npm : 8.5.5
OS : macOS Big Sur
Xcode : Xcode 13.2.1 Build version 13C100
Setting the details
To manage the Capacitor versioning, use your package.json file. Under the dependancies area look for the following
"@capacitor/android": "^3.3.2",
"@capacitor/cli": "^3.3.2",
"@capacitor/core": "^3.3.2",
"@capacitor/ios": "3.4.3",