Troubleshooting
What to do when the project isn't found, a build fails, running on a device fails, completion is missing or settings won't save.
The extension logs to three channels, all in the drop-down at the top right of the Output panel: kxapp (the extension), kxapp Build (builds) and kxapp Console (app output). If nothing below helps, attach all three to a GitHub issue.
The Xcode Project view doesn't appear
- The opened folder must contain a .xcodeproj or .xcworkspace. Projects under node_modules, Pods, build or DerivedData are ignored.
- Run xcode-select -p; it should point inside Xcode.app. If it prints CommandLineTools, run sudo xcode-select -s /Applications/Xcode.app.
- Open a freshly installed Xcode once to install its components and accept the license.
The build fails
- Start with the first error in the Problems panel and Output › kxapp Build. Whether the same project builds in Xcode tells you if the problem is the project or the extension.
- Signing errors (No profiles for…, Signing requires a development team): sign in with your Apple ID in Xcode › Settings › Accounts and choose a Team under the target's Signing & Capabilities.
- CocoaPods modules not found: make sure the .xcworkspace is used and pod install has run.
- Suspect stale products: Clean Build Folder, then build again.
Running or debugging on a device fails
| Symptom | Fix |
|---|---|
| The device isn't listed | Try another cable or USB port, unlock the device and tap Trust, then Refresh Devices |
| The device is marked Developer Mode off | Turn it on in Settings › Privacy & Security › Developer Mode and restart |
| The device is locked | Unlock it and run again |
| Breakpoints take ages and a "device not prepared" message appears | Open Xcode's Window › Devices and Simulators, connect the device once and wait for it to finish preparing |
| The app quits immediately or the debugger can't attach | Check the app's last output in Output › kxapp Console; run it from Xcode to see whether the app itself is the problem |
No completion, or "No such module"
- Packages and Pods need a build first. Wait a few seconds for the background build, or press Cmd+B once.
- If the buildServer.json at the workspace root belongs to another build server, the extension doesn't take over. Delete it and reload the window.
- Still wrong? Run "kxapp: Restart Code Completion" or "kxapp: Re-Index Project".
- With clangd or another C / Objective-C language extension installed, both answer at once. Disable one, or remove those languages from kxapp.swiftSourcekitLspSupportedLanguages.
Project settings won't save
Writing project.pbxproj needs Ruby's xcodeproj gem. If ruby -e 'require "xcodeproj"' fails in Terminal, run the "Install the xcodeproj Ruby gem" command or gem install --user-install xcodeproj. If you manage Ruby with rbenv or rvm, put that ruby's path in kxapp.rubyPath.