Skip to content

Troubleshooting

Lukas Pistrol edited this page Apr 19, 2022 · 19 revisions

Troubleshooting

Project does not build

It's possible that the project will not build at first try. This might be due to caching issues of some sort. Please try the following steps in sequential order:

  1. Clean the build folder (⇧⌘K)
  2. Reset package caches using File > Packages > Reset Package Caches
  3. Clear the DerivedData folder which is usually located in ~/Library/Developer/Xcode
  4. Make sure SwiftLint is installed on your machine. See SwiftLint for more information.
  5. Restart Xcode.
  6. Restart your Mac.

If none of the above mentioned steps work please have a chat with us in the help channel on our Discord Server.

Trailing Whitespace Violation

This is an error generated by SwiftLint. It means that there are space characters after the last statement of the line. Delete all spaces to get rid of this error.

Trailing Whitespace Violation Error

Recommended: Go to Xcode's Preferences > Text Editing > Editing and enable:

  • Automatically trim trailing whitespace
    • Including whitespace-only lines

Vertical Whitespace Violation

This is an error generated by SwiftLint. It means that there is more than one empty line between to statements. Delete all but one empty lines to get rid of this error.

Vertical Whitespace Violation Error

Recommended: Go to Xcode's Preferences > Text Editing > Editing and enable:

  • Automatically trim trailing whitespace
    • Including whitespace-only lines

SwiftUI Preview Not Working

You may have noticed that SwiftUI does not work out of the box with CodeEdit.

Previews will not work in very large and complicated views such as WorkspaceView

Previews in CodeEditModules

When working on a specific module in CodeEditModules just change the run target to the specific module, then make a clean build and Previews should work instantly.

Previews in `CodeEdit``

When working on the main target of CodeEdit it becomes a little more complicated: Go to CodeEdit > Targets > CodeEdit > Signing & Capabilities > Signing.

There select your personal Teamand change the Signing Certificateto Development.

Previews should now work in most views.

Clone this wiki locally