Conditional Swift testing

The problem Some tests need to be skipped when executing on CI (continuous integration like travis.org). What tests? In my case, it's performance tests. Why? because I can't trust all CI results and sometimes, randomly, some tests will fail without good reason, like this one: error: testPerformance : failed: The…

Package.swift - manual

Here is documentation for SPM manifest file Package.swift. I couldn't find a list of possible configuration values for Package.swift, so I created one, for future reference. I put here all available settings, with examples of use. Please find examples at the end of the post. Preamble Package.swift…

Sharing distribution certificate. automat.

One thing at a time Importing and sharing iOS/macOS certificates and keys required for AppStore distribution of application can be pain 🔥 as we know it. with a little command line, I can help myself a little bit. Here, I'm building command line shell script that will load certificates if…

Documenting Swift protocol

In Swift, I can write documentation at a protocol level now. There is a kick-ass feature added recently to Xcode 8 (beta 4). If I add documentation of function at the protocol level, it's available at the level of implementation. Look, I wrote documentation to Task.run() and I can…

Queues are not bound to any specific thread

It all started with this snippet from @jspahrsummers #import <Foundation/Foundation.h> int main (int argc, const char **argv) { @autoreleasepool { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ dispatch_sync(dispatch_get_main_queue(), ^{ NSLog(@"is main thread? %i", (int)[NSThread isMainThread]); }); }); dispatch_…