Posts for: #Xcode

Fixing autocompletion on mixed Objective-C and Swift projects

This year I had the privilege of attending WWDC for the first time. I knew the labs were very important, and I want to share a resolution to fix a problem for our big project at Peak: Autocompletion on Swift code was not working most of the time in the IDE, and with the help of an Apple engineer in the labs we got it sorted.

Update on 30/10/2017:

The issues described here seem to be fixed with latest release version of Xcode 9.0.1 (9A1004). Also the ‘internal’ menu doesn’t seem to be accessible anymore. If you know how to access it I’d love to hear from you!

[Read more]

Build settings depending on Xcode version

This weekend I wanted to setup Precompiled Bridging Headers for my project. This setting is available in the new Xcode 8.3 beta. Then building for latest official XCode (8.2.1) the code will not compile because the Swift compiler doesn’t recognize it. How do we use different build settings for different Xcode versions? Only possible with xcconfig files.

There’s an undocumented build setting called XCODE_VERSION_MINOR that we can use here. And after some variable substitution we’ll make it work. Here’s the gist:

[Read more]

Reducing the pain of git bisect with Xcode

There’s times when you need to investigate regressions in your project, and you don’t know have any clue as why something is happening. Git bisect is the best tool for this cases, but it can be painful to use in non small projects using CocoaPods and Xcode. I want to share what I’ve been doing to ease the pain.

[Read more]

Xcode 7.3 analyzer improvements

The latest xcode beta is available for downloading. There are many improvements, and the usual problems with stuff that stops working… Ah the love of Apple for it’s developers :). But I want to tell you about a feature that caught my attention: New analyzer settings!

New analyzer settings

From the release notes:

The static analyzer warns when nil is returned from a method or function with a nonnull return type or is passed to a parameter marked nonnull.

[Read more]