Tag: Swift

Swift blog: Swift is now open source!

Today Apple surprised us by finally making Swift an open source project. At Swift.org you can find all the information about it. 4 main projects are being made public: Compiler and Standard Library, comprised by Swift itself and a repository of documents related to the language’s evolution. Core Libraries, comprised by the foundation libraries, libdispatch…

Read the full article

Swift blog: Wrangling protocols

The app I’m working on has a set of interesting requirements on the data layer. Let’s try to break it down: I have a set of data that can be represented on 2 different ways, although is the same type of data. My Protocol-Oriented-Programming training kicked in: protocol CriteriaItem { var title: String { get…

Read the full article

Swift app size

I’ve been writing Swift for the most part of the past 6 months. Mostly playing with it, nothing serious. But today, I submitted my first Swift app to iTunes Connect (currently in beta review), and was reminded of the fact that Swift apps have embedded libraries. 8.6MB of libraries. My actual code is less than…

Read the full article

How to run networking code on Swift Playgrounds

I’m sure most of you know this by now. If you’re mocking your network calls using Swift on a Playground, it is important to tell the Playground that it can run code asynchronously. Import XCPlayground and call XCPSetExecutionShouldContinueIndefinitely with a true argument. import XCPlayground XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)

› Functional View Controllers – Wrapping View Controllers in a Functional Way

Chris Eidhof: When working with UIKit, view controllers are the opposite of isolated: they are connected to everything. The view controller often pulls network or database data, populates and interacts with views, and finally, it pushes other view controllers onto the navigation stack (or presents them in a different way). In this article, we’ll look…

Read the full article

› Numbers and Swift

Dalton Cherry at vluxe.io: Swift favors speed and safety by reducing the number of errors that can be made. Objective-C on the other hand was designed to be simple. Swift was designed to make you trip with the cord and fall on the safe side before you can jump the bungee. However, I don’t think…

Read the full article