Troubleshooting Xcode Projects#

In general, make sure that Noctule knows about the Xcode workspace or project.

You can verify this at Preferences… → Build, Execution, Deployment → Noctule → Directory Settings. Your Xcode project or workspace should be listed on this page.

I Can’t Build My Xcode Project#

The Xcode setup may be incomplete, for example, if Xcode needs user confirmation for configured plugins.

Open the same workspace or project in Xcode and build it there with the same scheme and destination.

If Xcode builds the project without prompting for input, then building in Noctule should work via the Build menu and with Xcode build run configurations.

Navigation or Editor Features Don’t Work#

The LSP server may be out-of-sync with the Xcode project. With Xcode projects, the server cannot build on its own.

  1. Project setup. Make sure that your Xcode workspace or project is properly set up in Noctule’s directory settings. Refer to Directory Build Settings to learn how to do that.
  2. SourceKit-LSP server. Make sure that a SourceKit-LSP server is running by clicking the Noctule icon in the status bar. If there already is a server running, proceed with the next step.
  3. Choose the right scheme. As with Xcode, the selected scheme defines what is built and also what’s available for code insight.
  4. Build your Xcode workspace or project. Make sure that the correct Xcode scheme and destination are selected.
    Then build your Xcode workspace or project with Build → Build project or Build → Build Xcode …. If navigation does not yet work, proceed with the next step.
  5. xcode-build-server. Please make sure that xcode-build-server is installed. In a terminal, which xcode-build-server should print a path. Please refer to the official instructions on how to install it.
  6. xcode-build-server setup. Please reconfigure xcode-build-server with Tools → Noctule → Initialize xcode-build-server. This action should show modal progress while executing xcodebuild and the setup command of xcode-build-server. Wait until the steps are finished and try again.
  7. Contact support. If the editor of Swift files still does not work as expected, please reach out to us or submit a bug report.

Loading Destinations Takes a Long Time#

With Noctule 2.0, loading destinations for Xcode workspaces or projects with many schemes can take several minutes. The destinations are cached for the next time the project is opened.

With Noctule 2.1, the destinations should be available much faster. Please make sure to use the latest available version.

First, make sure that your Xcode project is fully working. For example, broken Xcode project data can prevent Xcode commandline tools from listing the available destinations in a reasonable time.

Make sure that no other Xcode project or workspace is shown in Noctule’s settings at Preferences… → Build, Execution, Deployment → Noctule → Directory Settings. If another item is shown, select it and click the “-” button to ignore it.