<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Steffen D. Sommer on Medium]]></title>
        <description><![CDATA[Stories by Steffen D. Sommer on Medium]]></description>
        <link>https://medium.com/@steffendsommer?source=rss-88e8d357dd86------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-86sOg_I1HOSIEWtWvf9Hg.jpeg</url>
            <title>Stories by Steffen D. Sommer on Medium</title>
            <link>https://medium.com/@steffendsommer?source=rss-88e8d357dd86------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:47:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@steffendsommer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Swift 3 and the lack of recursive protocol constraints]]></title>
            <link>https://medium.com/@steffendsommer/swift-3-and-the-lack-of-recursive-protocol-constraints-e622815b3ac5?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/e622815b3ac5</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Sat, 08 Oct 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T17:55:46.609Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_rVJdagIM-R3PbFnNdeSg.png" /></figure><p>While starting to understand the power of Swift, protocols and associated types I also started running into the limitations of the current version of Swift (version 3). One of the more surprisingly limitations I’ve faced was when I got the Type may not reference itself as a requirement error. It’s actually a bit annoying as this is a very common thing to do in a project, but for some reason, this hasn’t been added to the awesome Swift language yet.</p><p>Alright, so it all boils down to recursive protocol constraints. Meh? One protocol referencing another protocol and vice versa. It could be when you try to explain a relationship between your View and your ViewModel if you’re running a MVVM architecture, but I guess this applies to a lot of different relationsships. For this example, I will continue with the idea of a View referrencing a ViewModel and a ViewModel referrencing a View:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa1989c596a84499cc1880e383426789/href">https://medium.com/media/fa1989c596a84499cc1880e383426789/href</a></iframe><p>This is a pretty straightforward, and to increase the flexibility in our code, we depend on the ..Type variants. However, the above code will give you the mentioned error: Type may not reference itself as a requirement.</p><p>After digging into this issue and reading about people’s ideas for workarounds, I managed to silence the compiler by doing a small hackish workaround:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2d10bcf0afc7e9ab0f9214c62a774ff/href">https://medium.com/media/b2d10bcf0afc7e9ab0f9214c62a774ff/href</a></iframe><p>Good for now, but as soon as you want to use these types and you need to specialize them you end up in a never-ending-specialization-loop:</p><p>let vm = ViewModel&lt;View&lt;ViewModel&lt;View...&gt;&gt;&gt;()</p><p>The only thing we achieved was to postpone the problem. At this point I was like: Compiler..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*sqtMk2pmUOlex3ZLdQN0QA.gif" /></figure><p>After some more digging, I finally got it confirmed that this is a current limitation in Swift. Check out the open issue <a href="https://bugs.swift.org/browse/SR-1445">here</a> and the discussions about this topic <a href="http://stackoverflow.com/questions/37253236/swift-protocol-with-associated-type-type-may-not-reference-itself-as-a-require">here</a>, <a href="https://forums.developer.apple.com/thread/15256">here</a> and <a href="http://stackoverflow.com/questions/31869440/swift-xcode-7-beta-5-type-cannot-refer-to-itself-as-a-requirement">here</a>.</p><p><a href="http://stackoverflow.com/questions/39012959/working-around-the-lack-of-recursive-protocol-constraints-in-swift-3">I reached out on Stack Overflow</a> for suggestions on a temporary workaround until Swift supports this. Unfortunately there has not been added any answers, but the number of up-votes and stars made me think that others is struggling with this as well.</p><p>Anyways, I needed a temporary workaround and the best I could come up with is the following, which also can be seen on the SO post:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec6a9703840f4cb1e6248a9433c9c0bd/href">https://medium.com/media/ec6a9703840f4cb1e6248a9433c9c0bd/href</a></iframe><p>The main idea is to break the recursiveness by making someone conforming to a type like Any. This is not ideal, but an acceptable compromise for now. That someone is in my example a delegate which basically is some kind of “mediator object” that handles the referrences between the View and the ViewModel. The only downside of having this delegate is that it needs to be set up from the “outside”, from where the objects are created, and cannot be set in the View implementation. If one tries to do this, the error Cannot assign value of type View&lt;VM&gt; to type _? will appear.</p><p>However, with this approach we get the correct types without having to do a lot of specialization. Of course, one could add more protocols to have even more abstractions, but the same solution would apply.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e622815b3ac5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going to my first iOS conference: UIKonf 2016]]></title>
            <link>https://medium.com/@steffendsommer/going-to-my-first-ios-conference-uikonf-2016-8ddcc903927b?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ddcc903927b</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Wed, 25 May 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T17:47:17.887Z</atom:updated>
            <content:encoded><![CDATA[<p>The 1st of January 2016 I wrote down a list of things I would like to do in 2016. One of them being was that I wanted to go to an iOS conference. Luckily for me, I have an awesome workplace (<a href="http://www.unwire.com/#/home">Unwire</a>) who were interested in helping me to go to <a href="http://www.uikonf.com/">UIKonf</a> 2016. For each day at the conference I tried to write down my thoughts for any interested reader who considers going to an iOS conference or going to this specific conference.</p><h3>Day 1: Social events</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j-TFnOQ_1rxidrdXGrprwA.jpeg" /></figure><p>I signed up for the UIKonf Bike Tour because I remembered seeing some awesome pictures from the event on Twitter last year. Also, I thought it would be a great opportunity to see the city, being a bit active, and hopefully being outside in great weather.</p><p>After meeting up at 2pm and getting our bikes we started biking through the city as one huge group (30 ish?). <a href="https://twitter.com/olebegemann">@olebegemann</a> was our tour guide and he had several helpers to make sure everybody kept biking together and got safe around the city. I had my doubts about how well it would work with such a big group, but it turned out just fine.</p><p>I’ve been to Berlin several times and I felt like I’ve seen a lot of the city, but I was wrong. During the 5 hour-ish ride, we saw some pretty interesting places. One of my favourite spots of the day were the closed airport Berlin Tempelhof Airport which was one big playground for sports, creativity and joy. Overall I would say that biking around Berlin in 25 degrees and surrounded by nice and friendly people was simply just great. We ended up biking almost 25 km and here is the route we took:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7y7uuc52BAfJOpDdhLjYA.jpeg" /></figure><p>We ended our bike tour at a restaurant with a very nice location close to a canal. It was a great opportunity to reflect on the day with the other participants as well as getting to know them even more. Oh ye, and of course drinking a cold 🍺 We ended the day by meeting with the people from all of the other social events at a pretty cool place called InFarm. Here we were able to check in and grab some free drinks before heading tired and satisfied back to the hotel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAc8LiRYYgiR6UUfzbc6EQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4GJ2aIs5g0DB74h6stkhzg.jpeg" /></figure><h3>Day 2: First day with talks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zs3PqoekGC9KmzjmxbN0Ew.jpeg" /></figure><p>After waking up with sore legs and a slight sunburn I was super excited for the actual first day with talks at UIKonf. After arriving at the beautiful venue and grabbing a delicious coffee from Companion Coffee, the talks began. Here are my top picks from the first day with talks:</p><h3><a href="https://www.youtube.com/watch?list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k&amp;v=AksIrgPFSgY">Jeff Watkins — Legacy</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVB8jaPBzdNmYmTTA15YpQ.jpeg" /></figure><p>The day started with <a href="https://twitter.com/jeffwatkins">Jeff Watkins</a> talking about legacy. Not as in legacy code, but as in, the legacy we leave behind when we pass on. I watch a lot of videos from iOS conferences around the world and I always think that it is refreshing to hear talks that are related to our field, but without being super technical. Jeff talked a lot about how we together as a community can contribute to a better future. He touched subjects such as race and gender discrimination and how important it is to expand our community. Definitely a lot of food for thought and a talk that must have required some courage to pull off. Lots of kudos!</p><h3><a href="https://www.youtube.com/watch?v=9VojuJpUuE8&amp;list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k&amp;index=6">Steve Scott — MVVM-C In Practice</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DLcvJLH-RnD7NGmoryN2hw.jpeg" /></figure><p>I’ve being working with the MVVM pattern for the last 1–2 years and I totally related to the problem <a href="https://twitter.com/macdevnet">Steve Scott</a> were trying to solve using a slightly modified pattern called MVVM-C. The C in MVVM-C stands for Coordinator which tries to take the responsibility of navigation. The talk was very practical and I believe it is a great starting point for apps that are architectured using MVVM. I will personally revisit the video of the talk and try to incorporate his ideas into my thinking of MVVM.</p><h3><a href="https://www.youtube.com/watch?v=hYCUy-9yq_M&amp;list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k&amp;index=7">Ellen Shapiro — Outside In — Using UI Tests To Start Improving Your App</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wmk22Y5J7ijFuNVqBxZMcQ.jpeg" /></figure><p>UI testing is fairly new to me, and it is an area I’ve wanted to dive in for some time, but I haven’t quite taken the jump yet. Since Xcode 7 introduced XCUI I’ve always just assumed that, that was the tool I were going to use. However, it was quite interesting to hear about <a href="https://twitter.com/designatednerd">Ellen Shapiro</a>’s experiences when doing UI testing. In particular I found her comparison between KIF and XCUI very interesting because I was totally unaware of the pro’s and con’s between these tools. Also, I felt that her experiences with these tools will make a great starting point for me to start doing UI testing in the apps I work on.</p><p>All in all a great day with great talks, awesome coffee (and ice cream), lots of friendly people and more sunny weather ☀️</p><h3>Day 3: Second and last day with talks</h3><p>Full of energy after a good night of sleep, I was excited to hear more talks on the second day with talks at UIKonf. The structure of the day was more or less the same as the first day with talks besides a very nice after party. Here are my top picks from the second day of talks:</p><h3><a href="https://www.youtube.com/watch?v=ipMlEMnKwKs&amp;list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k&amp;index=10">Andreas Schranzhofer — App Security and Securing Apps</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6vHl2xJCtp8yTBmZGCNQg.jpeg" /></figure><p>I must be very honest and say that app security is not an area within iOS development that I’m super excited about. I totally understand the importance and I strive to do what I must do in order to make secure apps, but it’s not something I’m super passionate about. Because of that, I did not know what to expect of <a href="https://twitter.com/Schranzhofer">Andreas Schranzhofer</a>’s talk about app security. However the talk was super practical, structured and full of super useful tips. Basically he went through a lot of different areas of an iOS app and explained how one is able to enhance the security in those specific areas.</p><h3><a href="https://www.youtube.com/watch?v=hXo6CWTmb9c&amp;index=12&amp;list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k">Michael May — The Empathetic Programmer</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PtVU3OKHlhyOqB2zUK7wA.jpeg" /></figure><p>I believe <a href="https://twitter.com/codermay">Michal May</a> talked about a super important subject within the iOS community and something that we should continuously remind ourselves about: empathy. He talked about how we should remember that behind a rating, an avatar, an online profile or a pull-request, there’s a human being. We should remember how we communicate with each other and in general be more empathetic. We should be aware about contexts and be open to iterate instead of recreating.</p><h3><a href="https://www.youtube.com/watch?v=kyzN5I-2FoY&amp;list=PLdr22uU_wISqm9QbnczWxXs9qyuWpSU4k&amp;index=15">Daniel H. Steinberg — A Time Lapse look at Swift</a></h3><p>It’s pretty easy to get influenced by the critics of Swift and I think <a href="https://twitter.com/dimsumthinking">Daniel H. Steinberg</a> did a really good job on reflecting on some of the criticism that Swift has received during the past 2 years since Swift was announced. He dived into the history of Swift and commented on the progress since the language was announced. A question that stood out the most to me from his talk were: “What’s the rush?”. Why are we so impatient about Swift getting a stable ABI and being somewhat feature complete. Daniel did a really good job on reminding us the importance about getting it right and that instead of being sceptical, we should be thankful that the team behind Apple is taking the time for doing it right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhEts4T12ROhi2nU2gBkzw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKKbekZX3Je-pnATK1VLDA.jpeg" /></figure><p>After the last talk, an after party were held at a place called Birgit &amp; Bier. Besides being a super cool place, there were free food and drinks and it was great opportunity to talk to the people you met during the conference days.</p><h3>Day 4: Workshops</h3><p>For the so-called “Unconference” day I signed up for the 3-hour long Test-Driven Development workshop. I’ve been practicing testing for the last year or so, but without really getting the habit of writing all of my tests upfront. I hoped that the workshop could give me some more knowledge about testing in general but also boost my motivation for writing tests upfront.</p><p>The workshop was divided into two parts. The first part being a presentation and mostly focused about the theory behind testing. The second part being more practical where each person tried to code the same thing as being shown on the projector.</p><p>I personally liked the first part the most which I found very interesting and packed with a lot of tips and tricks. For the practical part, I found it to be too rushed. Because the coding happened so fast, you basically had to turn off your head, and just focus on writing the same code as being presented. I would have preferred the code base we were working on to be smaller and easier to grasp or the duration of the workshop to be longer.</p><h3>Should you attend UIKonf?</h3><p>Yes. Would I attend UIKonf again? Yes.</p><p>This was my first iOS conference, so of course I don’t have a lot to compare against, but in terms of UIKonf meeting my expectations for an iOS conference, UIKonf succeeded. I would almost also say that the conference exceeded my expectations. Here are some the reasons for why I think UIKonf is an awesome iOS conference:</p><ul><li>High quality talks with a great variety and a good balance between highly experienced speakers and newcomers to the stage.</li><li>Great coffee, food and locations which shows Berlin at its best.</li><li>Lots of room for networking with fellow iOS developers who are super welcoming and friendly to talk with.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ddcc903927b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Objective-C’s @selector() in Swift]]></title>
            <link>https://medium.com/@steffendsommer/objective-cs-selector-in-swift-c024e9b76d7b?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/c024e9b76d7b</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Thu, 24 Mar 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T17:48:53.307Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQrjrn__BrhylFIMYUUTww.png" /></figure><p>Swift 2.2 got released recently, and with the new version, Apple continues to show that they’re committed to this language. One of my favourite new features of Swift is the #selector() method, which can make our code more safe.</p><p>In Objective-C we have been used to be able to write:</p><p>SEL mySelector = @selector(viewDidLoad);</p><p>Which is awesome. Why is that? By having the @selector() method, we’re able to make the compiler have our back when referencing selectors. It might not be super clear, when we’re referencing methods from the Cocoa API, but what if we referenced our own methods:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1e923124d1f042c165041aa225a79ec/href">https://medium.com/media/e1e923124d1f042c165041aa225a79ec/href</a></iframe><p>In the above case, if the method named validateString: changed its name to e.g. validateUsername:, then the compiler would give us a warning. This is super useful, in contrast to if we created our selector from a string:</p><p>SEL mySelector = NSSelectorFromString(@&quot;validateString:&quot;);</p><p>If we created our selector from a simple string and the method name changed, then the compiler will not warn us, and this will lead to crashes due to wrong selector references.</p><h3>#selector() in Swift 2.2</h3><p>Up until now, it has not been possible to do the same in Swift as @selector() did for us in Objective-C. Earlier, we’ve been forced to reference selectors doing:</p><p>let mySelector = Selector(&quot;viewDidLoad&quot;)</p><p>But since Swift 2.2 we are now (finally) able to get the help from compiler by using the newly introduced #selector():</p><p>let mySelector = #selector(viewDidLoad)</p><p>Which, in my opinion, is pretty awesome 👌</p><p>Check out the rest of the new stuff in Swift 2.2 <a href="https://swift.org/blog/swift-2-2-released/">here</a> and also check out <a href="https://medium.com/swift-programming/swift-selector-syntax-sugar-81c8a8b10df3#.z2cpx1xsa">this blog post</a> for more syntactic sugar when working with this new feature.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c024e9b76d7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A quick start guide for getting Swift on the web]]></title>
            <link>https://medium.com/@steffendsommer/a-quick-start-guide-for-getting-swift-on-the-web-d9663f7be914?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9663f7be914</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Sat, 06 Feb 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T14:36:47.671Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever since Apple announced that Swift was going to be open source, I’ve been interested in the development of moving Swift to the backend. Being an old web developer myself who is still doing some web stuff, I found it exciting to be able to re-use my knowledge of a programming language across frontend and backend. Although I still believe you learn a lot from knowing multiple languages, you can’t deny that you would be more productive, and learn more about the language when being to able to use it across platforms. With that said, I want to give a quick start for getting started with Swift on the web, so let’s dive in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*3Fw7ucUeXZxKIMMx-sjNRw.gif" /></figure><h3>Choosing your Swift web framework</h3><p>It’s clear that a lot of people besides me is interesting in moving Swift to the web, and it shows clearly when you look at some of the options to choose between when wanting to do Swift web development:</p><ul><li><a href="https://github.com/PerfectlySoft/Perfect">Perfect</a></li><li><a href="https://github.com/tannernelson/vapor">Vapor</a></li><li><a href="https://github.com/izqui/Taylor">Taylor</a></li><li><a href="https://github.com/glock45/swifter">Swifter</a></li></ul><p>I haven’t tried all of these options, but what I can do, is to try and reason about the framework I chose to move forward with.</p><p>Perfect is without doubt the most widespread and developed framework for moving Swift to the backend. To me, it seems like their focus is much about sharing Swift code between frontend and backend, e.g. by sharing examples where both projects (being frontend and backend) is living in the same Xcode workspace. Although I’m a big fan of this idea, I simply just felt that the setup seemed a bit too much, and I wanted something simpler.</p><p>Vapor is another approach which is quite different from Perfect. Instead of making a tight coupling between your mobile app and the backend, it seems to me that Vapor is trying to make a more independent web framework for using Swift on the web. It’s inspired by <a href="https://laravel.com/">Laravel</a> and in general I found the project to appeal more to me, while also seeming simple to setup.</p><p>As for Taylor and Swifter they either seemed unmaintained or lacking features I would need for my backend. I ended up choosing Vapor for this setup.</p><h3>Setting up Vapor</h3><h3>Step 1: Install Swift 2.2</h3><p>Vapor requires Swift 2.2 at the time of writing, so the first step would be to go to Swift.org’s <a href="https://swift.org/download/">download page</a> and download it. I experienced some problems with the latest snapshots, and after reading on Reddit, I recommend to use the following snapshot as this was the latest snapshot working for me:</p><p>swift-2.2-SNAPSHOT-2016-01-11-a</p><p>This package can be downloaded <a href="https://swift.org/builds/swift-2.2-branch/xcode/swift-2.2-SNAPSHOT-2016-01-11-a/swift-2.2-SNAPSHOT-2016-01-11-a-osx.pkg">here</a> for OSX and <a href="https://swift.org/builds/swift-2.2-branch/ubuntu1510/swift-2.2-SNAPSHOT-2016-01-11-a/swift-2.2-SNAPSHOT-2016-01-11-a-ubuntu15.10.tar.gz">here</a> for Linux.</p><p>After downloading and installing the package you’re now able to use Swift 2.2 in Xcode 7.3 beta. However, in order to use this from the terminal, run the following command:</p><p>export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:&quot;${PATH}&quot;</p><p>Verify that everything is working by running swift --version in the Terminal and see that it outputs something along the lines of Apple Swift version 2.2-dev.</p><h3>Step 2: Clone the Vapor example</h3><p>A good starting point for your new Swift project on the web, could be the <a href="https://github.com/tannernelson/vapor-example">Vapor example repo</a>. So go ahead and:</p><ol><li>Clone the repo <a href="https://github.com/tannernelson/vapor-example.git.">https://github.com/tannernelson/vapor-example.git.</a></li><li>cd into the project and run swift build to download the dependencies.</li><li>Finally run .build/debug/VaporApp</li></ol><p>Your web app is now running locally and can be viewed at <a href="http://localhost:8080.">http://localhost:8080.</a></p><h3>Step 3: Set up Atom for Swift development</h3><p>We are now starting to sense how it would be to develop Swift web apps using Vapor. Since Vapor does not have any Xcode project files, you might want to use your normal editor for doing web development. In my case I use Atom. For making this a bit easier I suggest you first make sure to install the <a href="https://atom.io/packages/language-swift">language-swift</a> package which adds Swift syntax highlighting to Atom.</p><p>Next I suggest you check out <a href="https://atom.io/packages/swift-debugger">swift-debugger</a> which makes it a bit more convient to run your project inside of Atom. It also adds support for breakpoints. Head over the author of the package’s <a href="https://medium.com/@Aciid/hacking-atom-to-create-a-swift-ide-that-runs-on-linux-and-mac-c7d9520a0fac#.vdyor6r2j">blog post</a> about this package for more information.</p><h3>Step 4: Deploy to Heroku</h3><p>Last step is to deploy our awesome web app. I normally use Heroku when I’m just playing around with smaller projects. Luckily Kyle Fuller has made a <a href="https://github.com/kylef/heroku-buildpack-swift">buildback for Heroku</a>, which works together with Vapor out of the box. So in order to deploy, follow these simple steps:</p><ol><li>First consider pinning the Swift version which the buildpack should use. If you followed my advice on which Swift 2.2 package to download, then consider creating a .swift-version file in the repo and add 2.2-SNAPSHOT-2016-01-11-a to it. This will make sure that Heroku will use this Swift version when running your web app.</li><li>Create a new Heroku app and set the buildpack by running <br>heroku create --buildpack <a href="https://github.com/kylef/heroku-buildpack-swift.git">https://github.com/kylef/heroku-buildpack-swift.git</a></li><li>Push your changes to Heroku: git push heroku master</li></ol><p>Go to yourapp.herokuapp.com and you should be able to see the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*96Gqllwcf2dl45hDTjzX9w.png" /></figure><h3>Good job</h3><p>Wohoo, that’s it! Your Swift app is now running both locally and remotely on Heroku. Now it’s time to explore the possibilities with Vapor. I noticed that there were added support for a new ORM library called <a href="https://github.com/tannernelson/fluent">Fluent</a> recently, made by the same author as Vapor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*LK4Et6OiRhdvWA_vBn0New.gif" /></figure><p>Enough from me, I want to use the rest of my weekend trying to make a mobile backend using Vapor 👊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9663f7be914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I landed my first job as an iOS developer]]></title>
            <link>https://medium.com/@steffendsommer/how-i-landed-my-first-job-as-an-ios-developer-3b539de81301?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b539de81301</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Tue, 22 Dec 2015 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T14:30:42.988Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently got contacted by my old university, University of Copenhagen, where I got my master’s degree in Computer Science in the summer of 2014. They contacted me to ask if I would be interested in giving a talk at the university about my “career”. The purpose of the event was to inspire the new master’s students in their studies. I accepted this offer as I thought it sounded interesting, and also because I saw it as a good way to give back to the university. To kickstart the presentation I’m writing this blog post as I believe it will help me get my mind going, but also to share my experience when deciding on a career to any interested reader. Lastly I’ve also wanted to take time off to reflect more about the whole education-to-job-transition and this seemed as a great opportunity.</p><h3>M.Sc. Computer Science</h3><p>In the summer of 2014, I came out of that door on the picture below with a master’s degree in Computer Science. My studies included a specialisation in Application Development as well as a semester abroad in San Diego.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*2v6ivsFHOyNZVgeUHZ4_qw.jpeg" /></figure><p>At the university, my fields of interests were high-level programming, human-computer interaction and IT/project management. This resulted in me exploring topics as navigation, augmented reality and the iPhone when writing my bachelor’s assignment. I wrote my master’s thesis about big data, machine learning, crowdsourcing and web interfaces. When I was 6 months from getting my degree I started focusing on iOS development (after having done both iPhone and Android development during my studies). So even though I had done high level programming for many years, it was not until at the end of my studies I decided to work with iOS development.</p><p>During my studies I had multiple jobs that were related to my studies and to my future field of work. I held different web positions writing PHP and frontend code in the early days of my studies. Then I started freelancing and I also joined a small startup that wanted to do a <a href="http://steffendsommer.com/projects/trivia-fight/">quiz app</a>. Besides that, I also took part in some external projects that was arranged at the university. Having done some sort of related work within my field gave me some insights, confidence and of course more experience with programming going forward into the labour market. On top of that, having worked with mobile development and user experience ignited my passion and in the end helped me to decide that iOS was the platform I should focus on. Having chosen iOS as my primary platform, it turned out that making Trivia Fight gave me some advantage when I started applying for jobs, as I was capable of doing some iOS development even though I considered myself as a rookie at that time 😊.</p><h3>My first job as an iOS developer</h3><p>I applied for a job 6 months before finishing my thesis — around the time where I also decided that I wanted to work with iOS development. I got invited to do the interview process which consisted of multiple steps including interviews with multiple employees at the company, a home assignment (where I was asked to make an app) and an on-site coding session right next to the iOS lead. I was pretty nervous coming into the coding session given that I didn’t have much iOS experience and because of the fact that this was my potential first full-time job. I performed pretty badly and I didn’t get the job due to my lack of experience. It sucked, but at the same time I was glad that I got that experience as I believe it made me more eager to learn and more confident going into any future coding sessions. After that I decided to focus on finishing my master’s thesis and not worrying about applying for jobs.</p><p>After 6 months, I turned in my thesis and about 2 weeks after that I got contacted by a recruiter asking me if I would be interested in meeting with a company for an iOS position. Some interviews and a little coding session later I was hired as an iOS developer at <a href="http://www.unwire.com/">Unwire</a>. How do I think I got that position and do I have any recommendations for people trying to land their first iOS developer job? Yes, I have some recommendations based on decisions I have noticed that worked for me. This is not a silver bullet and it might not work for you at all, but I do hope to help or inspire you to figure out how to land the position you want.</p><h3>Experience</h3><p>Experience experience experience. Although a degree within Computer Science (or the similar) might be sufficient, it does help to have some kind of experience outside of the university. It shows that you have the right motivation for e.g. doing your own side projects or working in a part-time position. You might even be able to get a part-time position at a company you would like to work at full-time afterwards. It will also ease the transition for you when going from studying to holding a full-time position. I personally would have liked to have had more experience with iOS development before ending my studies so that I was more prepared going into my first interviews. You can easily end up competing with other people just graduating, but who has done iOS development for the past years. In that case, it’s up for you to convince the employer about your personality and your solid foundation within computer science and not specific to iOS. On the other hand, I don’t really regret having a bunch of experience within other fields in terms of programming languages and platforms outside of iOS land. It’s a balance.</p><h3>Online presence</h3><p>Having and being aware of one’s online presence can involve different things and can help you being invited into those interviews. Here are three of my personal favourites.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*FgNZUOUgKNwvet24ENm4GQ.gif" /></figure><h3>GitHub</h3><p>Contributing to open source projects is a really great thing to do. It shows a lot about your character and motivation for what you do. It will also help you to meet other developers which you might also learn from. Also, it might also keep you up to date with trends within your field and you would probably also know about new useful libraries when writing your code. Stars can be useful, but please don’t put too much value in whether you receive a lot of stars or not on your projects.</p><h3>Blogging</h3><p>Writing blog posts is something I’ve tried to do a lot of times, but always found it hard to do consistently. I sense that I’m not the only one experiencing this. It is however a really useful tool for sharing your thoughts, experiences and anything else that a fellow developer might find useful. On top of that I think you learn a lot from writing stuff down in a way that is understandable for others. Don’t stress too much if you’re not blogging every week, instead just take one step at a time and then it might stick in the end. I’m personally still trying to make it stick.</p><p>When I meet and talk to developers I sense that setting up a LinkedIn profile and keeping it up to date can seem almost ridiculous and a waste of time. I get that, and I personally couldn’t see the huge benefit when creating my own profile in 2010, however today I see a huge benefit. It is a platform for me to interact with people I have studied with, worked with and people I’ve just met at social events. On top of that it’s a way for me to get in touch with people that are interested in the skillset I possess. That can be everything from people making a startup to recruiters representing different kind of companies and bigger coorporate companies. Yes, it can be annoying to stay up to date on LinkedIn, but the return on investment is high.</p><h3>Networking</h3><p>I can’t stress enough how important it is to get out there and meet people. Even though you might consider yourself as being introvert, people tend to be very welcoming and will most likely be like-minded. After going to a couple of events you will start to learn people in the field and it will probably make you feel more comfortable when attending future events. Check out <a href="http://www.meetup.com/">Meetup</a> to see if there are interesting events near you and make sure to keep an eye out for companies hosting events. Sometimes it’s interesting for the talks and sometimes it’s interesting to visit the companies and talk to the employees.</p><h3>From student to full-time developer in hindsight</h3><p>I guess one of the most important questions to answer in relation to this post is to answer what the future-me would have said to myself when I studied.</p><h3>Keep an open mind</h3><p>Because I at a very early stage knew that I wanted to do something within web- and mobile development, I think I spent too little energy on courses outside of my field of interest. Actually the very first course I had on my university was about functional programming. I hated it as I didn’t see the relevance, it felt a bit old school and I just wanted to do OOP. Today, I’m very intested in functional programming and I would have loved to pay more attention when attending that course and any similar courses during my time at the university. So, I would like to have had a more open mind towards the courses I followed. You never know how the trends within programming or your interest might change.</p><h3>Relax and get some experience</h3><p>When you’re studying you can easily forget the world around you. Everything is about grades, assignments and figuring out what job you want to try and get when your studies ends. It was a very strange feeling to have struggled with a master’s thesis for 6 months and a couple of weeks in your full time position, all of it is almost forgotten. I’ve found the transition from emphasizing good grades and relevant theses to emphasizing experience a bit surprising. It is a balance, but I would have liked to be able to say to myself while studying: “relax and remember to value experience as well”.</p><h3>iOS developer at Unwire</h3><p>This post is not about my current work, but more about the transition from studying to getting your first full-time job. I would however like to share one more thing I’ve noticed after working 1,5 years as a full-time iOS developer. You shouldn’t be too much worried about any lack of experience after settling with your first job. If you work hard, you can grow really fast. I feel that I’ve personally learned so much after 1,5 years and today I feel much more confident as an iOS developer.</p><p>As mentioned, this is purely my reflection on what has happened during my studies and going into my first full-time job. It should not be considered as the final answer to how to land your first job, but it might instead just inspire you or give you some advice on things that could be worth considering. I wish you all the best in landing your next job 🙏</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b539de81301" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first impressions of the Apple Watch]]></title>
            <link>https://medium.com/@steffendsommer/my-first-impressions-of-the-apple-watch-1c70f275a5fb?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c70f275a5fb</guid>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[apple-watch]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Sun, 20 Sep 2015 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T14:10:58.743Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6qSe0QnWW3zCSnL55Ehytw.jpeg" /></figure><p>You might already be thinking, “didn’t the Apple Watch came out, like ages ago?”. The answer is yes, and no. Unless you’re one of the lucky ones living in a country where it has actually launched, you might have a hard time getting your hands on a Apple Watch. In Copenhagen, Denmark, unfortunately the Apple Watch has not yet launched (but will on the 25th of September) — however, a quick train ride to Sweden solved the problem. So, thats what the awesome <a href="http://www.unwire.com/">company</a> I work for did, and because of that, I’ve been wearing the Apple Watch for around 2–3 weeks now.</p><p>These thoughts are based on iOS 8.4 and watchOS 1.0.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*lR2kRL6wOAqCeLIazyx6Mw.gif" /></figure><h3>The good</h3><h3>Design and materials</h3><p>I was not particular fan of the rather unnecessary and non-environmental friendly packagging. I was however pretty impressed by the overall look and feel of the watch. Having never seen it before IRL, I was a bit skeptical, but after seeing it and wearing it for some time, I think it both looks and feels good.</p><h3>Notifications</h3><p>Being to able to just raise your arm to read your incoming notifications is a convenience I’m really starting to enjoy. A lot of people I talk to make jokes about, why it is so hard to just look at the phone instead. However, in a busy day, these small convenient improvements does add up I think. Being on a bike, in a meeting, out walking with your girlfriend, it’s simply just a lot easier to quickly look at your watch.</p><h3>Complications and glances</h3><p>For me, the use case for the Apple Watch is pretty different from using an iPhone. On the watch, I rarely open any apps and do tasks that take longer than a couple of seconds. First of all, your arm gets pretty tired of staying in the position, and second of all, this is not where the watch excells. Neal Ford talks with the iPhreaks guys about this in episode <a href="https://devchat.tv/iphreaks/119-ips-ambient-information-and-the-apple-watch-with-neal-ford">119</a>.</p><p>Anyways, complications and glances rock 👊 in my opinion. Complications are those small pieces of information you can set to be displayed on your watch face. Glances are those small views you can swipe through when you swipe up on the watch. Instead of having to navigate to menus, apps and so forth, these are examples of easy accessible information that takes a short amount of time to read. E.g. on my watch face it tells me the current temperature, and if I click that value, it shows me the weather of today. Totally useful when you live in rainy Copenhagen and you need to decide whether or not to bring rain clothes. My watch face also shows me my next upcoming meeting.</p><h3>Battery life</h3><p>After being in a lot of discussions and hearing a lot of rumors about the battery life of the Apple Watch, I must say that I’m satisfied. I think I’m able to get 2 days out of it with normal use. But it doesn’t matter since I charge it every day when going to sleep. Compared to the battery life in our iPhones, I think this is acceptable for now. Because of the fact that it’s a watch (and not a smartphone), of course, it would be nice to see an increase in battery life in the future.</p><h3>Siri</h3><p>Even though Siri recently launched in a Danish version, which makes it slightly less awkward to speak with her, I wouldn’t consider myself as a user that uses Siri regularly. Unless I’m on the bike that is, and I want to do simple commands as calling somebody. However, Siri on the Apple Watch somehow blew my mind. Yes, Siri is not perfect. Yes, she needs time to evolve, and yes Siri needs more integration with third party apps. However! Siri proves her worth on the Apple Watch, and it has been an eye opener for me, that Siri (or one of her competitors) will have a huge impact on our daily lives some day.</p><h3>The bad</h3><h3>Notifications</h3><p>I’ve put notifications both on the good and the bad. The reason? You really need to customize the Apple Watch in order to avoid getting overwhelmed by all the incoming information on your wrist. Most of the apps you have on your phone, you’re probably not interested in getting the notifications on your wrist as well. I weren’t at least. So even though notifications is super convenient to have on your wrist, you need to customize and maintain the amount of information you allow.</p><h3>The apps</h3><p>For the past couple of weeks I haven’t really been using the apps, and by using I mean, actually opening an app and doing stuff from inside the app. The only reason why I have apps on my Apple Watch is to be able to get access to their accompanying glances and complications. I really hope that this will change in watchOS 2.0.</p><h3>The price</h3><p>The price may be the biggest issue when I want to advice people in whether or not they should buy the Apple Watch. This piece of technology does bring a lot of nice convenient features to the table, but can it justify the price? For now, I don’t think it can for the average smartphone user. Would I still buy it? Yes. Maybe the price will be more fair when the (postponed) watchOS 2.0 comes out.</p><h3>Final thoughts</h3><p>So, should you go out and by the Apple Watch? I think it depends on your wallet. For me, I want the Apple Watch, but I think it’s primarily because I’m an iOS developer and/or a tech junkie. For the average iPhone user I’m not convinced that the price is justifiable yet. My bet is that this will change over time when watchOS 2.0 has landed and when we’ll hopefully start to see apps taking more advantage of the platform. Or perhaps when app developers just understand the platform and it’s use-cases better.</p><p>What’s your thoughts on the Apple Watch? Did I miss any cool features or do you simply disagree with my views? Please feel free to pitch in on <a href="https://twitter.com/steffendsommer">@steffendsommer</a> or in the comments ✌️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c70f275a5fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A list of useful Xcode plugins]]></title>
            <link>https://medium.com/@steffendsommer/a-list-of-useful-xcode-plugins-5d03996de86d?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d03996de86d</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Thu, 27 Aug 2015 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T09:27:18.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HhlKAGhtaKOgua5WM6PDyw.png" /></figure><p>Because I like to get inspired by how others work, I decided to do a small list of the Xcode plugins I use daily. I use <a href="http://alcatraz.io/">Alcatraz</a> for handling my Xcode plugins. It works fairly well, except sometimes when Apple updates Xcode. The list of plugins in this post has been used with Xcode 6.4. Feel free to leave a comment if you use a plugin I did not mention.</p><h3><a href="https://github.com/zats/AdjustFontSize-Xcode-Plugin">AdjustFontSize</a></h3><p>Handy little plugin for changing font size when showing code to others or doing presentations. Just press ⌘ + or ⌘ - to adjust the font size of your editor.</p><h3><a href="https://github.com/Draveness/ATProperty">ATProperty</a></h3><p>Call me lazy, but I tend to get pretty tired of declaring properties. I tried using my snippet manager, but I actually prefer this small plugin. Just type e.g. @t to get a strong property.</p><h3><a href="https://github.com/citrusbyte/Auto-Importer-for-Xcode">AutoImporter</a></h3><p>After using <a href="https://www.jetbrains.com/objc/">AppCode</a> for quite some time, I certainly missed how easy that IDE makes it to import headers. This plugin helps you importing header files by pressing a shortcut and entering the filename of the header you want to import (with autocompletion). This is indeed handy if you’re in the middle of your source file and you want to avoid having to scroll to the top of the file and then back to where you were coding.</p><h3><a href="https://github.com/limejelly/Backlight-for-XCode">Backlight</a></h3><p>Highlights the current line you’re editing.</p><h3><a href="https://github.com/kattrali/cocoapods-xcode-plugin">CocoaPods</a></h3><p>Using <a href="https://cocoapods.org/">CocoaPods</a>, this plugin gives you some shortcuts to the most common operations.</p><h3><a href="https://github.com/FuzzyAutocomplete/FuzzyAutocompletePlugin">FuzzyAutocomplete</a></h3><p>This is probably one of my most favourite plugins for Xcode. It takes a small amount a time to get used to, but once you do, it’s really useful. FuzzyAutocomplete makes your autocompletion less strict, meaning that you do not have to type in the correct letters in the correct order in order to get autocompletion suggestions.</p><h3><a href="https://github.com/johnno1962/GitDiff">GitDiff</a></h3><p>Highlights any changes against the git repository.</p><h3><a href="https://github.com/deszip/Jumper">Jumper</a></h3><p>Let’s you jump 10 lines up/down in your editor using shortcuts.</p><h3><a href="https://github.com/ksuther/KSImageNamed-Xcode">KSImageNamed</a></h3><p>Autocompletes calls to imageNamed:.</p><h3><a href="https://github.com/omz/Dash-Plugin-for-Xcode">OMQuickHelp</a></h3><p>I use <a href="https://kapeli.com/dash">Dash</a> for viewing documentation and this plugin makes sure that documentation fired from Xcode is opened in Dash.</p><h3><a href="https://github.com/nanaimostudio/Xcode-Quick-Localization">QuickLocalization</a></h3><p>A plugin to make it easier to go from @&quot;content&quot; to NSLocalizedString(@&quot;content&quot;, @&quot;content&quot;).</p><h3><a href="https://github.com/stefanceriu/SCXcodeTabSwitcher">SCXcodeTabSwitcher</a></h3><p>Makes it possible to change your Xcode tabs by pressing ⌘ + 1..9.</p><h3><a href="https://github.com/onevcat/VVDocumenter-Xcode">VVDocumenter-Xcode</a></h3><p>After having declared a property or method, this plugin generates your documentation by just writing /// above the declaration. The plugin takes any arguments and return value into account, making it easy for you to fill in the details.</p><h3><a href="https://github.com/trawor/XToDo">XToDo</a></h3><p>Gives you a list of all the TODO, FIXME and more you’ve added in your code.</p><h3>Am I missing any plugins?</h3><p>That’s it. These are the plugins I currently use in Xcode 6.4. Please feel free to pitch in with any other useful plugins I might have missed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d03996de86d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TodaysReactiveMenu — An example app using ReactiveCocoa 3.0, MVVM and Swift]]></title>
            <link>https://medium.com/@steffendsommer/todaysreactivemenu-an-example-app-using-reactivecocoa-3-0-mvvm-and-swift-62dc728e7b68?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/62dc728e7b68</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Tue, 02 Jun 2015 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T08:50:12.997Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ZquKoY0UL0UKglJXG1XPg.png" /></figure><h3>TodaysReactiveMenu — An example app using ReactiveCocoa 3.0, MVVM and Swift</h3><p>TL;DR The source code can be found here: <a href="https://github.com/steffendsommer/TodaysReactiveMenu">https://github.com/steffendsommer/TodaysReactiveMenu</a></p><p>I’ve been working with ReactiveCocoa the last 8 months and I’m overall very satisfied with the framework and the approach in general. I’ve been following the progress on <a href="https://github.com/ReactiveCocoa/ReactiveCocoa/tree/swift-development">ReactiveCocoa 3.0</a> (mainly focused around Swift) and when it recently hit beta-4, I decided to dig in.</p><p>First of all, I want to put out a disclaimer. I’m new to Swift and I’m definitely new to RAC 3.0. Because of that, the majority of the hours I put into making this app, I felt like I had no idea of what I was doing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*4c-A4QnkiN6FuSLmxs0ZsQ.gif" /></figure><p>Also, it’s worth noting that the intention of this project and blog post is just to get any interested reader kickstarted with ReactiveCocoa 3.0. It is not an introduction to ReactiveCocoa or MVVM. It might be easier to understand this post, if you’ve read the <a href="https://github.com/ReactiveCocoa/ReactiveCocoa/blob/swift-development/CHANGELOG.md">RAC 3 changelog</a> beforehand.</p><h3>A small API for this purpose</h3><p>Using rails and some mad scraping skills I created a small backend to parse and expose the list of menus. The API can be found <a href="http://unwire-menu.herokuapp.com/menus">here</a>, and using a limit parameter <a href="http://unwire-menu.herokuapp.com/menus?limit=1">here</a>.</p><p>The limited version will result in a JSON response similar to this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/177b7a596a8d1fc6a2f7fc874447fe91/href">https://medium.com/media/177b7a596a8d1fc6a2f7fc874447fe91/href</a></iframe><h3>The model</h3><p>The purpose of the app is to show whatever is on the today’s menu of my workplace. Interesting attributes could therefore be:</p><ul><li>An identifier</li><li>A link to the menu (if any exernal resource exist)</li><li>A date for serving</li><li>The main course</li><li>The sides</li><li>And if there’s going to be served cake</li></ul><p>Using <a href="https://github.com/Hearst-DD/ObjectMapper">ObjectMapper</a>, and the built-in DateTransform(), this can be fairly simple mapped:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c79df56e476e8db184b6f0deec958a2/href">https://medium.com/media/7c79df56e476e8db184b6f0deec958a2/href</a></iframe><h3>Talking to the API</h3><p>Noticing <a href="https://github.com/ReactiveCocoa/ReactiveCocoa/blob/swift-development/ReactiveCocoa/Swift/FoundationExtensions.swift#L29-L50">built-in extensions</a> for NSURLSession in ReactiveCocoa 3, I decided not to include any external networking frameworks. Using these extensions and the <a href="https://github.com/antitypical/Result">Result framwork</a>, fetching the today’s menu seems like a breeze:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84cc434952d7509d2ca62970f45fc2a9/href">https://medium.com/media/84cc434952d7509d2ca62970f45fc2a9/href</a></iframe><h3>Preparing data for the view</h3><p>Now for the fun part! So, the view model is responsible for any massaging of data while exposing whatever the view needs to display. This is often here you would do a lot of chained operations for making your code reactive and to achieve the content you want. Being new to both RAC 3 and Swift, this is here I struggled the most.</p><h3>The basics</h3><p>Let’s start with covering some of the most basic questions:</p><ul><li>Use self.something &lt;~ self.anotherThing instead of RAC(self, something) = RACObserve(self, anotherThing).</li><li>Use someResult |&gt; filter { someVar in return someVar } instead of [someResult filter:^BOOL(id someVar) { return someVar; }];</li><li>Look into ConstantProperty, MutableProperty and SignalProducer for making these RAC bindings.</li><li>Yes, you need to be a lot more strict with handling your types. (Dont worry, you will start to like it).</li></ul><h3>Declaring a RAC property</h3><p>Having these fundamentals in place, let’s look into some binding examples. The first one, being a constant that never changes: let headline = ConstantProperty&lt;String&gt;(&quot;Today&#39;s Menu&quot;)</p><h3>Content manipulation</h3><p>The next one, being a minor manipulation using map:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c23e156f526e3f3e73dfe6d3e562d2c/href">https://medium.com/media/5c23e156f526e3f3e73dfe6d3e562d2c/href</a></iframe><p>Note how the ignoreNil is used as menu might be nil.</p><h3>Signal manipulation</h3><p>The last example looks into solving the following challenge: to fetch today’s menu every time the view gets active.</p><p>Let’s start out by declaring two helpers, as we’re not using <a href="https://github.com/ReactiveCocoa/ReactiveViewModel">ReactiveViewModel</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81826fc853e75e9257d4f11296ada4bd/href">https://medium.com/media/81826fc853e75e9257d4f11296ada4bd/href</a></iframe><p>Two signal producers to tell us whether or not the view is active. Note how toSignalProducer() has been used to go from RACSignal to SignalProducer. Note how ignoreError is being used to tell the compiler that we only care about values, not errors. The ignoreError and merge operator are small helpers I made during this project and is located <a href="https://github.com/steffendsommer/TodaysReactiveMenu/blob/master/TodaysReactiveMenu/Util/RACHelpers.swift">in the repo</a> as well.</p><p>Having the knowledge for when the view is active, let’s try to use this for triggering a menu fetch:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3fea85138ca7317605d833e170e64ff9/href">https://medium.com/media/3fea85138ca7317605d833e170e64ff9/href</a></iframe><p>Now this is cool! Let’s go through it:</p><ul><li>Start with the signal producer that sends values to tell whether or not the view is active.</li><li>Filter each time, using the above value, to make sure we only proceed when the view is active.</li><li>flatMap(FlattenStrategy.Latest) (or flattenMap and switchToLatest in RAC 2.x) that into another signal producer that fetches the menu remotely.</li><li>Make sure to return on the mainQueueScheduler as this will be presented in the UI.</li></ul><p>Having the hardest part taking care of, the only thing we’re missing now, is to actually present our content in the view. It seems like there’s no extensions for UI elements yet, as Colin Eberhardt also mentions in <a href="http://blog.scottlogic.com/2015/05/15/mvvm-reactive-cocoa-3.html">his blog post</a>, but he was so kind to make <a href="https://github.com/ColinEberhardt/ReactiveTwitterSearch/blob/master/ReactiveTwitterSearch/Util/UIKitExtensions.swift">some for us</a></p><p>Having these extensions, it’s a no-brainer to wire up our UI elements with our view model. Here’s some examples:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c3b3962df990e2d76017e6be8a6b470/href">https://medium.com/media/7c3b3962df990e2d76017e6be8a6b470/href</a></iframe><h3>That’s a wrap</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*EMxI9HMecXBk7VbaF1ZClA.gif" /></figure><p>That’s it! I hope this post will help you get started with ReactiveCocoa 3 as it took me quite a while just to setup basic bindings. I did take some shortcuts and I consider the project as being experimental and as work in progress. Feel free to ping me at <a href="https://twitter.com/steffendsommer">@steffendsommer</a> or leave a comment with any feedback or questions.</p><h3>Some other useful resources</h3><p>ReactiveCocoa 3.0 is, at the time of writing, still very new and because of that, the resources are limited. I also know that this post is jumping straight into the bits and pieces of the app instead of explaining the concepts of ReactiveCocoa 3.0. If you’re looking for other resources, here are some I used while creating this project:</p><ul><li><a href="https://github.com/ReactiveCocoa/ReactiveCocoa/blob/swift-development/CHANGELOG.md">ReactiveCocoa 3.0 changelog</a> (make sure to see the implementation, tests and issues as well)</li><li>Colin Eberhardt’s <a href="https://github.com/ColinEberhardt/ReactiveTwitterSearch">ReactiveTwitterSearch</a></li><li><a href="http://nomothetis.svbtle.com/an-introduction-to-reactivecocoa">This</a> and <a href="http://nomothetis.svbtle.com/reactivecocoa-ii-reacting-to-signals">this</a> post by Alexandros Salazar</li><li>The <a href="http://stackoverflow.com/questions/tagged/reactive-cocoa-3">reactivecocoa-3</a> tag on SO</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62dc728e7b68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips for better asset handling in your iOS app]]></title>
            <link>https://medium.com/@steffendsommer/tips-for-better-asset-handling-in-your-ios-app-bffe06331697?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/bffe06331697</guid>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Sun, 05 Apr 2015 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-29T08:27:22.068Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a5gxXHvRp0hLB5g7LttZ9A.png" /></figure><h3>1. Let Xcode generate 1x, 2x and 3x PNG’s</h3><p>With the launch of Xcode 6, Apple provided a way for us to store assets as PDF files. Xcode will then handle the creation of 1x, 2x and 3x PNG files at build time. Convenient, but may not always be the best solution depending on your assets (as <a href="http://bjango.com/articles/idontusepdfs/">highlighted here</a>). The recent apps I’ve worked on had really simple assets without any shadows or gradients, and PDF files worked as a charm. Martin Craft has a <a href="http://martiancraft.com/blog/2014/09/vector-images-xcode6/">fine description</a> on how to get your started with PDF files in Xcode.</p><h3>2. Color your own assets</h3><p>Sometimes as a developer, you’re given the entire design for the app you’re making. This is often not the case. Things change, such as design, placement of elements, colours and icons. That’s why I started experimenting with colouring all of my assets in code. This means time saved on the UX/graphics guy and an increase of flexibility in your app.</p><p>Of course, all assets are not equally easy to color and some may not be appropriate for programatically being coloured at all. As mentioned, the last apps I’ve been working on had really simple “flat-ish” design, with no gradients or shadows. In this case, this approach worked really good.</p><p>For colouring assets, you might want to bring in an external library such as UIImage+Additions, if you’re going to need all of that functionality. You could also just make your own small colouring method. Here is something to get you started:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66a5e82d50b389a92f671fa0aaab8090/href">https://medium.com/media/66a5e82d50b389a92f671fa0aaab8090/href</a></iframe><p>This code will make a simple image asset go from:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*Cm9UnS47pFuc6hJXDlUgCA.png" /></figure><p>to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*RdsKjWAD-uLekowMaoycLA.png" /></figure><p>Pretty simple, right? This will also make your app ready for skinning if that is what you want. If you have assets that contains multiple colours or gradients, you might want to look into tinting properties (e.g. on UIImageView).</p><h3>3. Make a facade for your assets</h3><p>I like my code to be strict, in the sense that I want to guide any consumer of my code in the best way I can. One way of making my assets more strict is to make a facade for them. One way to do this, is to make a category on UIImage. Your category can then expose any assets that are allowed to be used throughout your code base. An example could be:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/78ff37abbad4abf20fe446cda62c2c71/href">https://medium.com/media/78ff37abbad4abf20fe446cda62c2c71/href</a></iframe><p>Having the facade also centralises the list of assets for your app. This means that if your code uses this category, you only have to update paths to assets in one place. Naming your assets in general terms that makes sense for your app, also contributes to having a more flexible code base. Lastly, the facade can hide away any colouring of the assets.</p><p>Feel free to get in touch if you have any questions or feedback. As always, I’m interested to improve the way I work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bffe06331697" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The apps I use as an iOS developer]]></title>
            <link>https://medium.com/@steffendsommer/the-apps-i-use-as-an-ios-developer-92fe66fe8d1e?source=rss-88e8d357dd86------2</link>
            <guid isPermaLink="false">https://medium.com/p/92fe66fe8d1e</guid>
            <dc:creator><![CDATA[Steffen D. Sommer]]></dc:creator>
            <pubDate>Mon, 12 Jan 2015 19:44:52 GMT</pubDate>
            <atom:updated>2016-10-29T07:58:05.943Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SnGc0ocFWc9O8eYwaddxpg.jpeg" /></figure><p>I love reading about which apps people use, specially for iOS development. I figured it was time I shared my setup.</p><h3>Development</h3><h4><a href="https://www.jetbrains.com/objc/">AppCode</a></h4><p>After refusing using AppCode many times, I finally ended up having AppCode as my main iOS development IDE. It took me some time getting use to it, but I really do feel that I’m saving time over Xcode.</p><h4><a href="https://developer.apple.com/xcode/">Xcode</a></h4><p>Even though I’m a fan of AppCode, I still use Xcode for interface building and editing project settings.</p><h4><a href="http://www.git-tower.com/">Tower</a></h4><p>My favourite git client for the mac.</p><h4><a href="http://www.kaleidoscopeapp.com/">Kaleidoscope</a></h4><p>My choice of diff tool. Worth the money? Yee.. kind of. It looks great!</p><h4><a href="https://luckymarmot.com/paw">Paw</a></h4><p>One of my recent purchases. I used to use the Postman extension for Chrome, but I prefer to have it as a standalone app. And oh ye, I don’t use Chrome. I really like Paw!</p><h4><a href="https://coderunnerapp.com/">CodeRunner</a></h4><p>I never actually understood the need for using an app as CodeRunner until I figured that it’s simply just more convenient in some cases. I use it when developing small snippets or when transforming Java (don’t ask) into Objective-C/Swift.</p><h4><a href="http://kapeli.com/dash">Dash</a></h4><p>This app has ended up being inreplaceable. I use Dash for my personal snippets (synced using iCloud) and for reading documentation. Always googling that ReactiveCocoa method? Use Dash and save yourself some time. It is really convenient.</p><h4><a href="http://menial.co.uk/base/">Base</a></h4><p>When I’m doing some Rails development I use Base for checking out my local SQLite database. It does the job.</p><h4><a href="http://www.sequelpro.com/">Sequel Pro</a></h4><p>My go-to MySQL database client app. I use it if I’m doing any web development.</p><h4><a href="https://atom.io/">Atom</a></h4><p>My current code editor when doing web development or if I’m opening raw text files. I really liked Sublime Text but.. Neither Atom or Sublime Text feels native. I tend to switch between the two, but for now, Atom is the editor I use.</p><h4><a href="http://giantcomet.com/hues/">Hues</a></h4><p>A somewhat simple tool for a somewhat simple purpose: handling colors. I use Hues if I want to copy off some color I stumple upon or if I want to convert a color into another format.</p><h4><a href="http://bohemiancoding.com/sketch/">Sketch</a></h4><p>I love Sketch. I used to do quite a lot of graphics back in the days when I did a lot of web development (even though I’m a rather big amateur as being the graphics guy) and also I just like to be able to do the basic graphics stuff when developing. I use Sketch for designing my own apps or for checking up on sizes and stuff when being handed over designs for apps.</p><h4><a href="http://www.pixelmator.com/">Pixelmator</a></h4><p>With Sketch and Pixelmator, I do not need (or use) the rather pricy Illustrator and Photoshop. I use Pixelmator for simple resizing, cropping or other asset manipulation.</p><h4><a href="http://www.airsquirrels.com/reflector/">Reflector</a></h4><p>When needing to present apps, it somehow always is the case that neither an AppleTV is present or the proper cable for showing apps directly from your phone. I use Reflector to demo apps through my laptop.</p><h3>Productivity</h3><h4><a href="http://www.alfredapp.com/">Alfred</a></h4><p>I use Alfred as a replacement for the OSX built-in Spotlight. It works great together with Dash and I have some minor workflows I use from time to time. I also use the built-in clipboard manager, which is now irreplaceable.</p><h4><a href="http://25.io/mou/">Mou</a></h4><p>When doing README files or other mark down stuff I open Mou. It’s simple and it does the job.</p><h4><a href="https://www.wunderlist.com/">Wunderlist</a></h4><p>I lost count on how many times I’ve changed my todo apps. I am the kind of guy who does a lot of todo’s, and because of that I want to have app(s) that works awesome. Wunderlist is my current todo app.</p><h4><a href="https://agilebits.com/onepassword">1Password</a></h4><p>The days of remembering passwords are over!.. Or almost. I couldn’t live without 1Password. It generates and remembers almost all of my passwords (and syncs them using iCloud). I only remember my login password to my computer and my iCloud password.</p><h4><a href="http://www.irradiatedsoftware.com/cinch/">Cinch</a></h4><p>I never really understood the green OSX window button (named?) pre-Yosemite. Post-Yosemite I just think it’s a bit obtrusive. For once, I like the Windows behavior (I know..) more. Because of that, I use Cinch.</p><h4><a href="https://evernote.com/">Evernote</a></h4><p>My favourite note taking app. I use it both for time management or taking small notes during my workday and in my private time.</p><h4><a href="https://www.toggl.com/">Toggl</a></h4><p>Although, it is easy to get annoyed with the constant app updates, Toggl really is a great service. I use it for time logging when doing freelance stuff. Did I say it has great free plan?</p><h4><a href="https://www.getcloudapp.com/">CloudApp</a></h4><p>After Droplr changed their plans, I started using CloudApp. I think I liked Droplr a bit more, but CloudApp does the job. I use this when sending quick screenshots to people. Quite convenient.</p><h3>Entertainment</h3><h4><a href="http://www.deezer.com/en/beta/formac">Deezer</a></h4><p>Spotify does not work that great together with my Sonos sound system. Therefore I started to use Deezer instead. I think it is okay, and their beta mac app is getting there. I use it everyday.</p><h4><a href="http://catpigstudios.com/">Radium</a></h4><p>When not listening to tracks through Deezer I use Radium for local radio listening. It’s simple and somewhat good looking.</p><h3>Bonus category: Xcode plugins</h3><p>I use <a href="http://alcatraz.io/">Alcatraz</a> for Xcode plugin management. Here are some of my favourite plugins:</p><p>AdjustFontSize<br>Auto-Importer<br>Backlight<br>Base16 Ocean<br>BBUDebuggerTuckAway<br>BBUUtilitiesTuckAway<br>FuzzyAutocomplete &lt;- I love this one<br>GitDiff<br>Jumper<br>KSImageNamed<br>MCLog<br>OMColorSense<br>OMQuickHelp<br>QuickLocalization<br>XQuit<br>XToDo</p><p>Feel free to let me know if I missed any cool apps — I love changing how I work. Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92fe66fe8d1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>