Back to the front page

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_…

Status of Portable Swift code

Portable Swift source code is so damn hard to do. Main problem is that OSX and Linux Swift is using different Foundation codebase. Linux is using SwiftFoundation and OSX is using Foundation. What's the difference ? Foundation vs SwiftFoundation Foundation is written in Objective-C, it's complete and stable. SwiftFoundation on the…