Skip to main content
On this page

Folders and environment variables

What's in the KXBUILD_HOME install folder, the keychain and shared folders, what appears in your project folder, and the environment variables you might need.

Install directory (KXBUILD_HOME)

The toolchain lives in one directory, and the KXBUILD_HOME environment variable points to it. The install script sets it for your user and adds bin to PATH. The default is %USERPROFILE%\kxbuild on Windows and ~/kxbuild on Linux and macOS.

Folder or fileContents
bin/All executables, including kxbuild, kxdevice, xcodebuild, xcrun and codesign.
Developer/Platforms/SDKs for iOS and other platforms.
Developer/Toolchains/Swift toolchains.
resources/templates/Templates for new projects.
keychain/Certificates, provisioning profiles and password.properties shared by every project on this machine. See Certificates and signing.
sharedcomponents/Local component store. An Xcode .xip or the SDK and toolchain zips put here are installed by doctor instead of being downloaded. See iOS SDK.

Project folder

LocationDescription
<project dir>/keychain/The project's own certificates. Takes precedence over the global KXBUILD_HOME/keychain. The CODE_SIGN_KEYCHAIN build setting can also point to any folder or a single .p12.
<project dir>/build/<App>.ipaOutput of a Release build. The <App>.AppStoreInfo.plist next to it is the asset description used for upload.
<project root>/compile_commands.jsonCompiler flags for code completion. The extension keeps it up to date.
~/DerivedData/<name>-<hash>/Build output, including the .app and Swift packages. Change it with --derivedDataDir.
.xcodeproj/project.pbxprojEdited in place by project add-setting, settings apply and the Project Settings Editor. Keep it under version control.

Environment variables

VariablePurpose
KXBUILD_HOMEInstall directory.
KXBUILD_NO_UPDATE_CHECKTurns off new-version prompts and background update checks. Useful in CI.
KXBUILD_SWIFT_WHOLE_MODULEWhich Swift targets are built as a whole module. Applies on Windows and Linux only. The default, packages, covers remote Swift packages only. all covers every Swift target. none compiles everything file by file, like Xcode's default. A target whose project sets Compilation Mode keeps that setting. You can also pass it with -D. Set it to all when linking fails with an undefined …vpfi symbol. See Troubleshooting.
KXBUILD_NODE_DIST_URL, KXBUILD_RUBY_URL, KXBUILD_GEM_SOURCEDownload mirror for Node and Ruby, and the gem source. Useful when downloads are slow. Read only by the install script.
KXBUILD_PROJECT_NAME, KXBUILD_BUNDLE_ID, KXBUILD_PROJECT_DIR, KXBUILD_TEMPLATE_ID, KXBUILD_TEMPLATE_DIR, KXBUILD_BINAvailable to a project template's template.sh. See Project templates.

Next steps