Tag Archives: XCode

Swift build failed. No errors.

This happened to me while I was writing in Swift 4.1 in XCode 9.3. I use RxSwift also. It never happened while I was writing in Objective C. There were no any logs in Report Navigator too. Project just compiled without errors, then failed. Couldn’t figure out why.

In my case what I did and it helped:

1. Commit changes in Git and then discard changes in XCode if it shows “M” near files
2. Clear derived data: Xcode -> Preferences -> location
3. Clean build folder: Shift + Cmd + Alt + K
4. Restart XCode

After this project tried to compile and showed errors. The error was here:

I passed wrong variable name in observer.onNext(timing). It should have been pTiming.

AppCode vs XCode

AppCode has features that are not present in Xcode. At a minimum, AppCode will be a good addition to XCode.

The full list of features is here.

Here I will show examples of using AppCode features. Inspired by this article, that was very usefull for me.

1. Quick Fix feature in AppCode is more convenient. Refactoring to Modern Objective C syntax using Quick Fix (Alt + Enter).



2. Simplifying expressions using Quick Fix.


3. AppCode can generate code for you. Use Command + N.
Generated code – isEqual and hash methods for a class that has properties – objectID, name, selected:

Description method generated for a class with many properties:

4. Imports do not block other code and are folded. Typos in names are shown and renaming works better than in XCode.
These are small features, but very useful. Here defered should be renamed to deferred.

5. Unused imports and properties are shown.
XCode doesn’t do that.

6. Scroll from source feature in project navigator.
You can open a source file by name as in XCode, but after that you can also navigate to that source file in a project tree in one click.