Apollo iOS: Install CLI option not available

I am trying to set up Apollo GraphQL for my iOS app.

I am following the getting started instructions for iOS client from the official documentation.

I am able to install the Apollo framework for my Xcode project via Swift Package Manager, however, I do not see the InstallCLI option which I expect to see upon right-clicking (as shown below) on the Xcode project file:

enter image description here

I have tried quitting and relaunching Xcode and tried by building the project, but I do not see the Install CLI option in the context menu.

It appears I am missing a step but not able to figure out what.

I am running the current latest release of Xcode 14.3 (14E222b), running on macOS Ventura 13.3 (22E252). I have installed and updated to the latest version of Xcode Command Line Tools.

P.S.: For the context, I am following the instructions here: Getting Started with Apollo iOS - Apollo GraphQL Docs

1 Like

I am getting the exact same issue

Hi @asbhat - we’ve taken a look and don’t have a clear idea on what could be causing it to be missing; our implementation of XcodeCommandPlugin hasn’t changed. We’re also concerned it could be a regression in Xcode 14.3 support for SPM plugins since the plugin is visible when opening a package.swift based project (vs. an Xcode project that uses SPM dependencies).

I realize it is inconvenient not having it in the menu and until we can figure out the root cause the workaround would be to grab the pre-built CLI binary we attach to each GitHub release and place that in the root of your project directory; the effect will be the same and the CLI has a version checker so if you ever update the dependency but forget to manually download the pre-built CLI it will warn you.

In summary,

it’s a bug causing the option to not appear in the context menu. I downgraded to Xcode 14.2 and the option showed up again.

Alternatively, you can download the CLI executable directly and make it work as mentioned by the author in the GitHub issue which I have linked in a separate reply.