I am new to the capacitor and developing an application where I am making changes into code and running
And it is also recommended to use npx cap sync
in behalf of npx cap copy
.
What is the exactly difference between both.
where to use which one ? Please assist.
npx cap copy
just copies whatever is in your webDir
to the native platforms (and some cordova files if you have cordova plugins installed).
npx cap sync
runs npx cap copy
and npx cap update
npx cap update
searches for Cordova and Capacitor plugins and copy/update some native files the plugins need for working.
So copy
is for "web" files and update
for "native" files and sync
does both.