-
-
Notifications
You must be signed in to change notification settings - Fork 19
Troubleshooting
Wojciech Kulik edited this page Oct 20, 2024
·
3 revisions
Important
The first thing you should do is to check the output of :checkhealth xcodebuild
and fix all issues.
Run it from your project root directory.
Steps to fix basic issues
- Go to your project root.
- Remove
buildServer.json
- Open your project in Xcode.
- Run clean build (CMD+Shift+K, CMD+B)
- Make sure that
xcode-build-server
is installed via Homebrew (which xcode-build-server
). - Run in terminal:
xcode-build-server config -project <Project>.xcodeproj -scheme "<your scheme>" or xcode-build-server config -workspace <Project>.xcworkspace -scheme "<your scheme>"
- Make sure that
buildServer.json
contains correct information. - Open project in Neovim.
- Run
:LspInfo
. - Confirm that the LSP is attached and the root directory is correctly detected.
Configuration
Processing the project configuration is a very complex task that relies on parsing multiple crazy outputs
from xcodebuild
commands. Those logs are a pure nightmare to work with. This process may not always work.
In case of any issues with, you can try manually providing the configuration file
.nvim/xcodebuild/settings.json
in your root directory.
Sample settings.json file:
{
"bundleId": "com.company.bundle-id",
"show_coverage": false,
"deviceName": "iPhone 15",
"destination": "28B52DAA-BC2F-410B-A5BE-F485A3AFB0BC",
"config": "Debug",
"testPlan": "YourTestPlanName",
"projectFile": "/path/to/project/App.xcodeproj",
"scheme": "App",
"platform": "iOS Simulator",
"productName": "App",
"projectCommand": "-workspace '/path/to/project/App.xcworkspace'",
"xcodeproj": "/path/to/project/App.xcodeproj",
"lastBuildTime": 10,
"os": "17.2",
"appPath": "/Users/YOU/Library/Developer/Xcode/DerivedData/App-abafsafasdfasdf/Build/Products/Debug/App.app"
}
-
platform
- check outlua/xcodebuild/core/constants.lua
for available platforms -
destination
- simulator ID -
projectile
/projectCommand
- can bexcodeproj
orxcworkspace
, the main project file that you use
Tests
If you encounter issues with test detection, you may want to read this: Test File Search - File Matching.