<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Swift on miqu.me</title><link>https://miqu.me/blog/categories/swift/</link><description>Recent content in Swift on miqu.me</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 16 Jun 2017 23:55:27 +0100</lastBuildDate><atom:link href="https://miqu.me/blog/categories/swift/index.xml" rel="self" type="application/rss+xml"/><item><title>Fixing autocompletion on mixed Objective-C and Swift projects</title><link>https://miqu.me/blog/2017/06/16/fixing-autocompletion-on-mixed-objective-c-and-swift-projects/</link><pubDate>Fri, 16 Jun 2017 23:55:27 +0100</pubDate><guid>https://miqu.me/blog/2017/06/16/fixing-autocompletion-on-mixed-objective-c-and-swift-projects/</guid><description>&lt;p&gt;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 &lt;a href="https://peak.net"&gt;Peak&lt;/a&gt;: 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.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update on 30/10/2017:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The issues described here seem to be fixed with latest release version of Xcode 9.0.1 (9A1004). Also the &amp;lsquo;internal&amp;rsquo; menu doesn&amp;rsquo;t seem to be accessible anymore. If you know how to access it I&amp;rsquo;d love to hear from you!&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Automatic bridging from Swift to Objective-C using Sourcery</title><link>https://miqu.me/blog/2017/05/21/automatic-bridging-from-swift-to-objective-c-using-sourcery/</link><pubDate>Sun, 21 May 2017 22:30:00 +0100</pubDate><guid>https://miqu.me/blog/2017/05/21/automatic-bridging-from-swift-to-objective-c-using-sourcery/</guid><description>&lt;p&gt;I recently read a &lt;a href="http://blog.benjamin-encz.de/post/bridging-swift-types-to-objective-c/"&gt;great post&lt;/a&gt; by &lt;a href="https://twitter.com/benjaminencz"&gt;Benjamin Encz&lt;/a&gt; about bridging Swift to Objective-C by creating bridging types that can be exposed to the older language. I wondered if his idea can be improved and automated using meta-programming with &lt;a href="https://github.com/krzysztofzablocki/Sourcery"&gt;Sourcery&lt;/a&gt; by &lt;a href="https://twitter.com/merowing_"&gt;Krzystof Zablocki&lt;/a&gt;. The answer is a very impressive ObjC-like uppercase &lt;strong&gt;YES&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Build settings depending on Xcode version</title><link>https://miqu.me/blog/2017/01/29/temporary-build-settings/</link><pubDate>Sun, 29 Jan 2017 23:26:54 +0000</pubDate><guid>https://miqu.me/blog/2017/01/29/temporary-build-settings/</guid><description>&lt;p&gt;This weekend I wanted to setup &lt;a href="https://swift.org/blog/bridging-pch/"&gt;Precompiled Bridging Headers&lt;/a&gt; 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&amp;rsquo;t recognize it. How do we use different build settings for different Xcode versions? &lt;strong&gt;Only possible with xcconfig files&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s an undocumented build setting called &lt;code&gt;XCODE_VERSION_MINOR&lt;/code&gt; that we can use here. And after some variable substitution we&amp;rsquo;ll make it work. Here&amp;rsquo;s the gist:&lt;/p&gt;</description></item><item><title>Easy localization management with Google spreadsheets</title><link>https://miqu.me/blog/2016/11/19/easy-localizations-management-with-spreadsheets/</link><pubDate>Sat, 19 Nov 2016 16:50:18 +0000</pubDate><guid>https://miqu.me/blog/2016/11/19/easy-localizations-management-with-spreadsheets/</guid><description>&lt;p&gt;Last thursday I gave a talk at &lt;a href="https://www.meetup.com/NSLondon/"&gt;NSLondon meetup&lt;/a&gt; called &amp;lsquo;Minimum Viable Tooling&amp;rsquo;. The topic was examples of approaching tooling and automation for small teams. I showed real examples of what we do at &lt;a href="https://www.peak.net"&gt;Peak&lt;/a&gt;, where I currently work. One of the things people showed interest in after the talk was how we deal with localizations.&lt;/p&gt;
&lt;p&gt;In this post I will replicate the simple solution from scratch, so you can follow along and get started with your own projects. And we will be using Swift for the scripting, just because we can!&lt;/p&gt;</description></item><item><title>Transitioning iOS versions</title><link>https://miqu.me/blog/2015/12/14/transitioning-ios-versions/</link><pubDate>Mon, 14 Dec 2015 20:00:25 +0000</pubDate><guid>https://miqu.me/blog/2015/12/14/transitioning-ios-versions/</guid><description>&lt;p&gt;Having worked in companies developing their own products, I&amp;rsquo;ve faced many times the problem developers encounter when building iOS applications: Your biggest 3rd party dependency - the OS SDK - is changing under you every year. How does your team deal with this in a maintainable way?&lt;/p&gt;</description></item><item><title>Building Swift on OSX</title><link>https://miqu.me/blog/2015/12/05/building-swift-on-osx/</link><pubDate>Sat, 05 Dec 2015 00:38:35 +0000</pubDate><guid>https://miqu.me/blog/2015/12/05/building-swift-on-osx/</guid><description>&lt;p&gt;Swift is finally &lt;a href="https://swift.org"&gt;open source&lt;/a&gt;! This is great because of many reasons, namely the transparency and chances to learn from the people responsible of building the foundational language you work on. I&amp;rsquo;ve been checking how easy was to build the runtime, REPL and compiler, and it turns out the team made an excellent job to make the process very easy. Let&amp;rsquo;s see how to do it.&lt;/p&gt;</description></item><item><title>Functional programming in the small, with Swift</title><link>https://miqu.me/blog/2015/09/09/functional-programming-in-the-small-with-swift/</link><pubDate>Wed, 09 Sep 2015 16:00:23 +0100</pubDate><guid>https://miqu.me/blog/2015/09/09/functional-programming-in-the-small-with-swift/</guid><description>&lt;p&gt;In a &lt;a href="https://miqu.me/blog/2015/08/31/poor-mans-functional-programming/"&gt;previous post&lt;/a&gt;, I wrote about the choice of paradigms that Swift presents for it&amp;rsquo;s target audience. I also gave my opinion on how people with different backgrounds might see and approach the Functional Programming paradigm.&lt;/p&gt;
&lt;p&gt;In this post I want to share how I started to take advantage of FP with Swift for the practical domain of iOS developers: Building apps.&lt;/p&gt;</description></item><item><title>Poor man's functional programming</title><link>https://miqu.me/blog/2015/08/31/poor-mans-functional-programming/</link><pubDate>Mon, 31 Aug 2015 21:00:00 +0100</pubDate><guid>https://miqu.me/blog/2015/08/31/poor-mans-functional-programming/</guid><description>&lt;p&gt;It&amp;rsquo;s a very exciting time to be an iOS or Mac developer. The platform moves very fast and we got a new toy (language) to play with: Swift. It&amp;rsquo;s the perfect time to reevaluate, learn and evolve as a programmer, because you will be forced to adopt this new language (yes, I think Swift is the future, 100%).&lt;/p&gt;
&lt;p&gt;I want to relate this to the fact that most iOS engineers, or mobile application developers, are traditionally familiar with Object Oriented Programming paradigm. But Swift offers more than different syntax and OOP.&lt;/p&gt;
&lt;p&gt;I’m referring to &lt;em&gt;some&lt;/em&gt; features inspired by functional languages. If you’ve ever had an interest, but never the chance or motivation to go forth and look into this paradigm, now it&amp;rsquo;s the perfect time to do it.&lt;/p&gt;</description></item><item><title>Code signing and distributing - Swift</title><link>https://miqu.me/blog/2015/02/13/code-signing-and-distributing-swift/</link><pubDate>Fri, 13 Feb 2015 11:45:12 +0000</pubDate><guid>https://miqu.me/blog/2015/02/13/code-signing-and-distributing-swift/</guid><description>&lt;p&gt;Having problems code signing and distributing your application written in Swift? I&amp;rsquo;ve encountered some, found solutions for them, and &lt;a href="https://techblog.badoo.com/blog/2015/02/09/code-signing-and-distributing-swift/"&gt;I&amp;rsquo;ve written a sum up for Badoo Tech blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hopefully it will help anybody with similar issues and increase discoverability of the solutions.&lt;/p&gt;</description></item><item><title>Swift Animations</title><link>https://miqu.me/blog/2015/02/05/swift-animations/</link><pubDate>Thu, 05 Feb 2015 20:00:14 +0000</pubDate><guid>https://miqu.me/blog/2015/02/05/swift-animations/</guid><description>&lt;p&gt;Today I introduce &lt;a href="https://github.com/DarthMike/SwiftAnimations"&gt;a small Swift DSL&lt;/a&gt; to improve how complex and chained animation code looks, and reads.&lt;/p&gt;</description></item><item><title>A tale of categories and extensions</title><link>https://miqu.me/blog/2014/12/20/a-tale-of-categories-and-extensions/</link><pubDate>Sat, 20 Dec 2014 21:37:17 +0000</pubDate><guid>https://miqu.me/blog/2014/12/20/a-tale-of-categories-and-extensions/</guid><description>&lt;p&gt;I’ve gradually been changing my code style favouring (&lt;em&gt;Obj-C&lt;/em&gt;) categories and (&lt;em&gt;Swift&lt;/em&gt;) extensions a lot more. I’ve been inspired by my other lover (&lt;em&gt;Ruby&lt;/em&gt;). Why? Readability and code organisation.&lt;/p&gt;</description></item></channel></rss>