By default, Capacitor is configured for a newly generated project. Typically you execute Capacitor commands with
ionic capacitor ... or
npx cap .... However, due to the way that Nx works, the Capacitor commands go through the Nx CLI.
First, ensure that the frontend project has been built:
Now that a Capacitor project has been added to your Nx workspace you can begin adding support for native platforms. Currently, Capacitor supports Android and iOS, but other platforms can be added with Capacitor plugins.
Copy the lastest build output to the native platforms:
Copy the latest build output to the native platforms and sync native platform dependencies:
Finally, you can open the native platform in it's respective IDE:
To learn more about using Capacitor with
@nxtend/capacitor then visit the Getting Started page.