A few installation issues with capacitor ios guide

This guide here: https://ionicframework.com/docs/building/ios

I’ve run into two issues almost immediately. I would submit a PR to update the guide, but honestly, I’m not sure what the best/correct approach is to solve these things:

  1. For me, ionic capacitor add ios failed with: [error] cocoapods is not installed. For information: https://guides.cocoapods.org/using/getting-started.html#installation

As I’m somewhat familiar with ruby, and already have rvm setup, I quickly added a .ruby-version, .ruby-gemset and Gemfile and got cocoapods installed easily enough. Not sure if that’s the preferred approach for the ios/capacitor community though.

  1. Once #1 was resolved, the same command failed with:
[error] Capacitor could not find the web assets directory "/Users/jsharpe/yellowstone/mobile_v5/www".
    Please create it, and make sure it has an index.html file. You can change
    the path of this directory in capacitor.config.json.
    More info: https://capacitor.ionicframework.com/docs/basics/configuring-your-app

This, I’m less sure about, but seems to indicate that my app hasn’t been built yet. Why is that required to install capacitor? Should something be added to this guide to clarify what steps should be taken?

For me, I ran ionic build which created www/index.html and then capacitor add finished successfully. Is it required to build the project first? Should a note say something about that?

Apologies about the documentation mismatch! We are currently in the midst of revamping a bunch of sections within the Ionic docs, including that “Building iOS” page.

In the meantime, please see the Capacitor Required Dependencies page.