<?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 Roy Marmelstein on Medium]]></title>
        <description><![CDATA[Stories by Roy Marmelstein on Medium]]></description>
        <link>https://medium.com/@marmelroy?source=rss-35d1429e88f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*yVh71ByaL8LKih8i.jpeg</url>
            <title>Stories by Roy Marmelstein on Medium</title>
            <link>https://medium.com/@marmelroy?source=rss-35d1429e88f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 27 Apr 2026 17:58:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marmelroy/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[Log in with Spotify from your app in Swift]]></title>
            <link>https://medium.com/swift-and-ios-writing/log-in-with-spotify-from-your-app-in-swift-7fed49b6618?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fed49b6618</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[spotify]]></category>
            <category><![CDATA[login]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Thu, 31 Aug 2017 15:18:14 GMT</pubDate>
            <atom:updated>2017-08-31T15:18:14.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOF1lss_PXxKEUP-t_6-hg.png" /></figure><h4>Introducing SpotifyLogin</h4><p>Earlier this year, I joined Spotify as an iOS engineer and am spending much of my time improving the way our users enjoy music. It’s a super exciting mission for anyone passionate about technology and art and I hope to be able to share more about that work when it’s public.</p><p>Outside of the day-to-day work though I also run several <a href="https://github.com/marmelroy">popular open source Swift projects</a> and enjoy <a href="https://github.com/marmelroy/Talks">speaking publicly about Swift</a>. It’s only natural that one of my first public-facing side projects within Spotify will be a Swift library.</p><h3>Hello SpotifyLogin</h3><p>Today I’m proud to share with you SpotifyLogin, Spotify’s first pure Swift open source framework and the latest addition to our public SDKs.</p><p>SpotifyLogin takes care of the flow needed to obtain a Spotify API token. It’s built with the latest version of Swift and takes advantage of modern iOS standards while offering a significantly simplified API (taking into account lessons I learned from writing open source projects) and a signficantly smaller footprint than the corresponding part of the current Objective C SDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Tr5yn_6OAWpYypP7W2T8Cw.gif" /><figcaption>SpotifyLogin in action</figcaption></figure><h4>How to use</h4><p>SpotifyLogin can be installed via Cocoapods or Carthage and is as simple to use as:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ccec1158aa7843e58f2eb6db3e59594/href">https://medium.com/media/6ccec1158aa7843e58f2eb6db3e59594/href</a></iframe><h4><strong>On Spotify and Swift</strong></h4><p>Swift is the fastest growing programming language in the world and our existing Objective C SDK didn’t make life easy for Swift developers. The main objective of SpotifyLogin was to make it much easier to intgerate Spotify with Swift projects.</p><p>Our iOS engineers are passionate about Swift and our level of Swift usage is regularly evaluated at Spotify. We have several teams working fully with Swift. However, due to limitations of Xcode and past versions of the language, the majority of our work is still done in Objective C. This is likely to change with Swift 4 and XCode 9.</p><p>Until then, SpotifyLogin signals our commitment to a Swift-y future. We also use our SDKs internally to build mockups, prototypes and hacks and the hope is that this project (and future Swift projects within Spotify) will encourage more Spotify engineers to learn and practice their Swift skills.</p><h4>Check it out on:</h4><h3><a href="https://github.com/spotify/spotifylogin/">github.com/spotify/SpotifyLogin</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fed49b6618" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/log-in-with-spotify-from-your-app-in-swift-7fed49b6618">Log in with Spotify from your app in Swift</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introspect and modify classes at runtime in your Swift app]]></title>
            <link>https://medium.com/swift-and-ios-writing/introspect-and-modify-classes-at-runtime-in-your-swift-app-aad64e17878e?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/aad64e17878e</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[runtime]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[objective-c]]></category>
            <category><![CDATA[objectivekit]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 20:07:20 GMT</pubDate>
            <atom:updated>2016-11-15T20:07:20.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arjs5gByAT67WXHettTHEw.png" /></figure><h4>Introducing ObjectiveKit</h4><p>Remember the big Dynamism-in-Swift debate of May 2016? If not, here’s a quick refresher:</p><p><a href="http://mjtsai.com/blog/2016/05/21/dynamic-swift-2/">Dynamic Swift</a></p><p>In short, the argument is that there are many types of problems that developers are currently solving with the dynamic features of the ObjC runtime. As we are (possibly) heading towards a future where Swift replaces Objective C completely, Swift will need to provide its own native dynamic solutions.</p><p>On iOS and macOS, for the foreseeable future at least, Swift will run on top of the Objective C runtime and this means we have full access to these functionalities. Sadly, they are a real pain to use in Swift. We can make it better…</p><h3><strong>Hello ObjectiveKit</strong></h3><p>ObjectiveKit is a new Swift framework for accessing Objective C runtime functions.</p><p>It makes things like introspection, modifying methods and creating classes at runtime super easy in a way that feels as native as possible to Swift.</p><p>How does it work? All you need to do is initialise an ObjectiveClass object that is typed to the class that you want to introspect/modify, then use one of ObjectiveKit’s many functions. Here’s a quick example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dcfcca5d8a324d00f6b71e0952a2d6b2/href">https://medium.com/media/dcfcca5d8a324d00f6b71e0952a2d6b2/href</a></iframe><p>Playing around with the Objective C runtime is both fun, educational and super useful for debugging. However, it is also dangerous — please exercise extreme caution before using it in production.</p><h4>Check it out on:</h4><h3><a href="http://github.com/marmelroy/ObjectiveKit">github.com/marmelroy/ObjectiveKit</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTfx7OZvJqauaI%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fthe-simpsons-my-posts-i-was-bored-Tfx7OZvJqauaI&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTfx7OZvJqauaI%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="313" frameborder="0" scrolling="no"><a href="https://medium.com/media/348f6cdf766fbed02205f40cbbbb86f7/href">https://medium.com/media/348f6cdf766fbed02205f40cbbbb86f7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aad64e17878e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/introspect-and-modify-classes-at-runtime-in-your-swift-app-aad64e17878e">Introspect and modify classes at runtime in your Swift app</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A quick look at Grand Central Dispatch and Swift 3]]></title>
            <link>https://medium.com/swift-and-ios-writing/a-quick-look-at-gcd-and-swift-3-732bef6e1838?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/732bef6e1838</guid>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[grand-central-dispatch]]></category>
            <category><![CDATA[gcd]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 19 Jul 2016 21:23:27 GMT</pubDate>
            <atom:updated>2016-07-19T21:24:09.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-9zBacrqXdFwujzsVCiEQ.png" /></figure><p>Multi threading and concurrency are essential for the modern app …and yet Grand Central Dispatch, the system level library for managing concurrent operations, has one of the more cumbersome and unfriendly APIs in the iOS SDK.</p><p>No more.</p><p>Swift 3 brings with it many improvements to Grand Central Dispatch syntax and usage. This is a quick look at some of what’s new.</p><h4>dispatch_async</h4><p>Previously, we would choose the dispatch method (sync vs async) and then the queue we wanted to dispatch our task to. The updated GCD reverses this order - we first choose the queue and then apply a dispatch method.</p><p>One of the most common GCD patterns is to perform work on a global background queue and update the UI on the main queue as soon as the work is done. This is what it looks like with the new API:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d7a8e8b715a185f37097f855a62ba15/href">https://medium.com/media/6d7a8e8b715a185f37097f855a62ba15/href</a></iframe><h4>Queue attributes</h4><p>You will notice that queues now take attributes on init. This is a Swift OptionSet and can include queue options such as serial vs concurrent, memory and activity management options and the quality of service (.default, .userInteractive, .userInitiated, .utility and .background).</p><p>The quality of service replaces the old priority attributes that were deprecated in iOS8. If you were used to priority queues, here’s how they map over to QOS cases:</p><pre>* DISPATCH_QUEUE_PRIORITY_HIGH:         .userInitiated<br>* DISPATCH_QUEUE_PRIORITY_DEFAULT:      .default<br>* DISPATCH_QUEUE_PRIORITY_LOW:          .utility<br>* DISPATCH_QUEUE_PRIORITY_BACKGROUND:   .background</pre><p>The memory and activity management options are new for this year’s Apple OS releases (OSX 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0). These include the ability to start a queue in an inactive state with .initiallyInactive or set a custom autorelease setting for your queue with .autoreleaseInherit, .autoreleaseNever and .autoreleaseWorkItem.</p><h4>Work items</h4><p>Queues are not the only part of GCD to get a Swift OptionSet. There’s an updated Swift syntax for work items too:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0f4f163829f4e2ea6ecabfad24795bc/href">https://medium.com/media/e0f4f163829f4e2ea6ecabfad24795bc/href</a></iframe><p>A work item can now declare a quality or service and/or flags on init. Both of these are optional and affect the execution of the work item. The flags are an option set that includes the following options: barrier, detached, assignCurrentContext, noQoS, inheritQoS, enforceQoS.</p><h4>dispatch_once</h4><p>dispatch_once was very useful for initialisation code and other functions that were to be executed once and only once.</p><p>In Swift 3, dispatch_once is deprecated and should be replaced with either global or static variables and constants.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/640a0983e460bce7d7b596106d0f35ce/href">https://medium.com/media/640a0983e460bce7d7b596106d0f35ce/href</a></iframe><h4>dispatch_time_t</h4><p>dispatch_time_t was a function that translated a specified time to a UInt64 that could be provided to a queue. The updated GCD introduces a much friendlier syntax for this (farewell NSEC_PER_SEC). Here is an example with dispatch after:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/105d3ab2dd4be0ec16eebd804db8cb9b/href">https://medium.com/media/105d3ab2dd4be0ec16eebd804db8cb9b/href</a></iframe><p>The .seconds is part of a new enum called DispatchTimeInterval. The cases have an associated value representing the count. It currently supports:</p><pre>* .seconds(Int)<br>* .milliseconds(Int)<br>* .microseconds(Int)<br>* .nanoseconds(Int)</pre><h4>dispatch_assert</h4><p>Also new in this year’s Apple OS releases are dispatch preconditions. These replace dispatch_assert and allow you to check whether or not you are on the expected thread before executing code. This is particularly useful for functions that update the UI and must be executed on the main queue. Here’s a simple example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f809ac3fa212fa5964e8faa4dd40b1df/href">https://medium.com/media/f809ac3fa212fa5964e8faa4dd40b1df/href</a></iframe><h4>Additional resources</h4><p>There are many more GCD improvements included in Swift 3 but the official documentation is still incomplete at the time of writing. To go deeper:</p><ul><li><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0088-libdispatch-for-swift3.md">apple/swift-evolution</a></li><li><a href="https://developer.apple.com/videos/play/wwdc2016/720/">Concurrent Programming With GCD in Swift 3 - WWDC16 - Videos - Apple Developer</a></li><li><a href="https://github.com/apple/swift-corelibs-libdispatch">apple/swift-corelibs-libdispatch</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=732bef6e1838" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/a-quick-look-at-gcd-and-swift-3-732bef6e1838">A quick look at Grand Central Dispatch and Swift 3</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A quick look at UIViewPropertyAnimator]]></title>
            <link>https://medium.com/swift-and-ios-writing/a-quick-look-at-uiviewpropertyanimator-a107fb9da5b5?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a107fb9da5b5</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ui-animation]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 14 Jun 2016 07:44:10 GMT</pubDate>
            <atom:updated>2016-06-14T07:49:09.965Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ackaQ05QkYayBw4q3pMjvQ.png" /></figure><p>Yesterday, the first day of WWDC, was full of exciting improvements to all of Apple’s platforms. For me, the most impressive update of all was to animations in UIKit. Meet the brand new UIViewPropertyAnimator.</p><p>Until iOS10, performing gesture-based and interruptible animations on iOS was a pain — often requiring a third party framework. Facebook’s <a href="https://github.com/facebook/pop">POP</a> was created for this very purpose and my most recent open source project, <a href="https://github.com/marmelroy/Interpolate">Interpolate</a>, tried to tackle the same problem.</p><p>It’s great to see this kind of functionality finally built into UIKit and I’m sure it will allow for many more ‘<em>magical’ </em>apps on iOS.</p><h4>How does it work?</h4><p>Animations are essentially interpolations between UIView properties that you define in a closure. You can either let an animation run with a duration or you can connect a gesture to update the animator’s fractionComplete property. All the animations are easily interruptible and reversible by default.</p><p>Here’s a simple example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91f8a267432b9f2b7f345cdb80eaf02d/href">https://medium.com/media/91f8a267432b9f2b7f345cdb80eaf02d/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8kqrtQiz9YqnS%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2F8kqrtQiz9YqnS&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F8kqrtQiz9YqnS%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6ebc343ed14e07629ad0ac6c946a496/href">https://medium.com/media/d6ebc343ed14e07629ad0ac6c946a496/href</a></iframe><p>To go deeper, check out the docs:</p><ul><li><a href="https://developer.apple.com/reference/uikit/uiviewpropertyanimator">UIViewPropertyAnimator</a></li><li><a href="https://developer.apple.com/reference/uikit/uiviewanimating">UIViewAnimating</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a107fb9da5b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/a-quick-look-at-uiviewpropertyanimator-a107fb9da5b5">A quick look at UIViewPropertyAnimator</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interactive gesture-driven animations in your iOS app (in Swift)]]></title>
            <link>https://medium.com/swift-and-ios-writing/interactive-gesture-driven-animations-in-your-ios-app-in-swift-e16c9d11fd8?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e16c9d11fd8</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 03 May 2016 21:43:58 GMT</pubDate>
            <atom:updated>2016-05-03T21:43:58.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-q0DsDX891Ji-twuoWe8g.png" /></figure><h4>Introducing Interpolate</h4><p>In a recent (excellent) talk at try! Swift, <a href="https://realm.io/news/tryswift-adam-bell-prototyping-magic/">Adam Bell argued that we should bring back the magic iOS apps lost when the world abandoned skeumorphism</a>. I couldn’t agree more.</p><p>Magic on iOS often comes in the shape of interactive gesture-driven animations. There’s something incredible about seeing the action on the screen respond perfectly to your touch. Do you remember your reaction to inertial scrolling the first time you saw it? to the old version of Twitter for iPad? to 53’s Paper?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*ndVSciLhWtxBbsAPVdWZzQ.png" /><figcaption>Remember this?</figcaption></figure><p>Interactive gesture-driven animations are hard work and usually involve interpolating different types of values following a gesture’s progress. I wanted to make it simpler…</p><h3>Hello Interpolate</h3><p>Interpolate is a new Swift interpolation framework for creating interactive gesture-driven animations. Here’s an example of it in action:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F26FxolLz3AR1oz61y%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2F26FxolLz3AR1oz61y&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F26FxolLz3AR1oz61y%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="773" frameborder="0" scrolling="no"><a href="https://medium.com/media/75f00f1f68cbc3141a3ab0c784825901/href">https://medium.com/media/75f00f1f68cbc3141a3ab0c784825901/href</a></iframe><p>The 🔑 to Interpolate is — <strong>all animation is the interpolation of values over time. </strong>A movement is just an interpolation from one CGPoint to another, a color change is an interpolation between two UIColors etc.</p><p>Interpolate is able to interpolate a wide range of types (more are coming). To use, just create an Interpolate object, give it a from value and a to value and apply it to the target view in a closure.</p><p>All you then need to do is to get a progress value from your gesture recognizer and provide it to the Interpolate object. That’s it. The code looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a1fe41d467ad860c74d0314771c20fc/href">https://medium.com/media/6a1fe41d467ad860c74d0314771c20fc/href</a></iframe><p>Interpolate is not just for dull linear interpolations. For smoother and richer animations, Interpolate supports the following functions out of the box- <strong>EaseIn, EaseOut, EaseInOut and Spring</strong>. You can even supply your own Interpolation functions (via a protocol).</p><p>Let’s build some magical apps…</p><h4>Check it out on:</h4><h3><a href="https://github.com/marmelroy/Interpolate">github.com/marmelroy/Interpolate</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlTp-4sXnXO4%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlTp-4sXnXO4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlTp-4sXnXO4%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa9c794feb0199b4b172c140b8227264/href">https://medium.com/media/fa9c794feb0199b4b172c140b8227264/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e16c9d11fd8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/interactive-gesture-driven-animations-in-your-ios-app-in-swift-e16c9d11fd8">Interactive gesture-driven animations in your iOS app (in Swift)</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I  Storyboards & Nibs]]></title>
            <link>https://medium.com/swift-and-ios-writing/i-storyboards-nibs-66143ba23a65?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/66143ba23a65</guid>
            <category><![CDATA[storyboard]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Mon, 28 Mar 2016 09:05:11 GMT</pubDate>
            <atom:updated>2016-03-28T11:41:16.424Z</atom:updated>
            <content:encoded><![CDATA[<p>Yesterday, NatashaTheRobot published a super insightful <a href="https://www.natashatherobot.com/i-heart-storyboards-nibs/"><strong>post</strong></a> about her love of storyboards, listing a multitude of reasons why storyboards and nibs are great.</p><p>I agree with most of the arguments — storyboard references make life easier, keeping things small and modular helps avoid many of the downfalls and IBDesignable/IBInspectable is seriously cool.</p><p>However, it’s still hard for me to 💖 storyboards &amp; nibs, my feelings are a lot more 🌀 (i.e. mixed). Here’s why:</p><h3>Can’t handle our scale</h3><p>Earlier this month, I attended mobile@scale at Facebook’s HQ in London. It was a fascinating day of presentations from Facebook, Google, Twitter, Spotify and Soundcloud. They shared many of their experiences and best practices when working on apps at scale. Here’s a note I made:</p><h3>Roy Marmelstein on Twitter</h3><p>3/ XCode, nibs and storyboards don&#39;t scale.</p><p>The main reason was build times and merge conflicts.</p><p>Facebook and Google might be special cases, with thousands of classes and hundreds of engineers sharing the same codebase and yes, by keeping your storyboards small and modular, merge conflicts are a lot less likely in a small team.</p><p>However, if you are working for a start-up with significant scaling ambitions, relying heavily on storyboards is the same as placing a major technical debt on the company and forcing a significant future rewrite when the team grows.</p><h3>Application flow</h3><p>Storyboards are great for laying out the flow of the application but they force a very linear idea of what that flow is. Implementing more modern navigation concepts and deep linking is significantly harder with storyboards and can easily result in the much feared “storyboard spiderweb”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3FPFMMeIXpeg0%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fspider-man-3FPFMMeIXpeg0&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3FPFMMeIXpeg0%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="319" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba16cb318e343bbb7f1e8627f60824d2/href">https://medium.com/media/ba16cb318e343bbb7f1e8627f60824d2/href</a></iframe><p>Also, it severely restricts your ability to build non-generic gesture-driven user interfaces — think Snapchat or Facebook’s Paper.</p><h3>Data Flow</h3><p>You may lay out the flow of your application in the storyboard but what about the data flow?</p><p>Apple’s solution for this, a big if statement inside prepareForSegue:sender, is very error prone and restrictive. Custom initialisers simply don’t work with storyboard segues.</p><p>One of the Twitter replies to Natasha’s post suggested using dependency injection as an alternative, which seems like a novel approach and something worth looking into.</p><h3><strong>Chchchchanges</strong></h3><p>Storyboards are not built for resuability and Natasha recommended using nibs for reusable views. Still though, designing views in nibs makes app-wide changes much harder.</p><p>Let’s take fonts and colours for example. In my current codebase, I have categories on UIColor and UIFont that reflect the current colour and typeface schemes for the app. For labels and views created in code, any change the designer makes can be applied by changing a few lines in the categories. For labels and views designed entirely in interface builder, these changes can be a huge pain to apply.</p><h3>Conclusion</h3><p>Storyboards are way way better than they used to be. They are fantastic tools for simpler apps or quick prototypes and they also make life a lot easier for anyone beginning iOS development.</p><p>However, the question of when to use them is still not an easy one to answer. It honestly depends on the needs and ambitions of the app you are creating and should be decided on a case-by-case basis. For now, I remain 🌀.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FJsKiYLRzEjpyo%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fweek-markets-JsKiYLRzEjpyo&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FJsKiYLRzEjpyo%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/e738cdd1627417d871a8530945b29110/href">https://medium.com/media/e738cdd1627417d871a8530945b29110/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66143ba23a65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/i-storyboards-nibs-66143ba23a65">I 🌀 Storyboards &amp; Nibs</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bringing Peek and Pop to all iOS users]]></title>
            <link>https://medium.com/swift-and-ios-writing/bringing-peek-and-pop-to-all-ios-users-63c677c0b42?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/63c677c0b42</guid>
            <category><![CDATA[peek-and-pop]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 15 Mar 2016 05:24:15 GMT</pubDate>
            <atom:updated>2016-03-15T06:56:24.070Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9X77bdKMfQ7B9kHj0lpLg.png" /></figure><h4>Introducing PeekPop</h4><p>With the iPhone 6S and 6S+, Apple introduced us to 3D Touch — a whole new way for your iPhone to sense pressure on the screen. One of the coolest features employing 3D touch was <strong>Peek and Pop</strong>. When you press softly on a view, you get what’s called a <strong>Peek</strong> — a pop-up preview of the next bit of content. Press more, and you <strong>Pop</strong> it to fill the screen. When implemented well, this is an incredibly powerful paradigm.</p><p>The only downside of Peek and Pop is that it’s only available on the two latest iPhones and 80% of the world is currently running older devices (yours truly included). Why can’t we get to enjoy this cool new way to preview content?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F77ek6XCDF6kWA%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fwe-touchand-77ek6XCDF6kWA&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F77ek6XCDF6kWA%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="217" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc84b1d04d473ed3ce463c05c5971b27/href">https://medium.com/media/bc84b1d04d473ed3ce463c05c5971b27/href</a></iframe><h3>Hello PeekPop</h3><p>PeekPop is a new Swift framework aiming to bring backwards compatibility to peeking and popping. On devices that are 3D touch capable, PeekPop uses Apple’s native 3D touch implementation. On older devices, it uses a faithful recreation of the feature. PeekPop ships with a gesture recognizer that senses pressure by observing changes in the surface area of the touch (assuming that when pressing harder on the screen, more of the finger is in contact with it). It works surprisingly well. Here it is running on iOS8:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o7ablu0adICfQ3OXC%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2F3o7ablu0adICfQ3OXC&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o7ablu0adICfQ3OXC%2Fgiphy-downsized-large.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="773" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d2c84e80697dbcf59f1328d4405d583/href">https://medium.com/media/2d2c84e80697dbcf59f1328d4405d583/href</a></iframe><p>PeekPop was developed with the objective of staying as close to Apple’s previewing API so implementing it stays super simple:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42e56d5f972413eb89a446dfcc55c4fa/href">https://medium.com/media/42e56d5f972413eb89a446dfcc55c4fa/href</a></iframe><p>The one missing feature currently is supporting UIPreviewActions on devices that don’t have 3D touch.</p><p>That will come soon…</p><h4>Check it out on:</h4><h3><a href="https://github.com/marmelroy/peekpop">github.com/marmelroy/PeekPop</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FotCpCn0l4Wo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DotCpCn0l4Wo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FotCpCn0l4Wo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b1808d025c09c11d9463da9fc643202/href">https://medium.com/media/1b1808d025c09c11d9463da9fc643202/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63c677c0b42" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/bringing-peek-and-pop-to-all-ios-users-63c677c0b42">Bringing Peek and Pop to all iOS users</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Browsing files in your iOS app in Swift]]></title>
            <link>https://medium.com/swift-and-ios-writing/browsing-files-in-your-ios-app-in-swift-bfbe9acd35ff?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfbe9acd35ff</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[files]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Tue, 16 Feb 2016 23:47:50 GMT</pubDate>
            <atom:updated>2016-02-16T23:51:05.571Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_8rzJcxNPZHJutcedEmiNg.png" /></figure><h4>Introducing FileBrowser</h4><p>Last month I released an open source iOS framework for zipping and unzipping files called <a href="https://github.com/marmelroy/Zip">Zip</a>.</p><p>For Zip’s example project, I wanted a quick Cocoapod that will display the file system with a nice UI and will let users use and observe Zip in action. Despite my best Googling skills, I couldn’t find such framework and ended up writing a very quick and simple implementation.</p><p>Browsing an app’s file system and interacting with files is incredibly useful (either as production UI or for debugging purposes). I decided to make an iOS file browser my next Swift project…</p><h3>Meet FileBrowser</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o6gaY6yLQkhjiok5W%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2F3o6gaY6yLQkhjiok5W&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o6gaY6yLQkhjiok5W%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="772" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ac0d6ee7381a8347c02148232deade1/href">https://medium.com/media/1ac0d6ee7381a8347c02148232deade1/href</a></iframe><p>FileBrowser is a simple Swift framework to view and select files in your app’s file system. It comes with a familiar UI (based on OS X’s Finder) and powerful features like peek &amp; pop previews and search. It’s as easy to display as:</p><pre>let fileBrowser = FileBrowser()<br>self.presentViewController(fileBrowser, animated: true, completion: nil)</pre><p>When a file is selected, the default behaviour is to push a preview viewcontroller with sharing options. You can provide an alternative behaviour by using a simple closure:</p><pre>fileBrowser.didSelectFile = { (file: FBFile) -&gt; Void in<br>    print(file.displayName)<br>}</pre><p>There are even more customisation options like changing the root folder and excluding specific file types or file paths.</p><h4>Check it out on:</h4><h3><a href="http://github.com/marmelroy/FileBrowser">github.com/marmelroy/FileBrowser</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FtQliIp3sn1T44%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2FtQliIp3sn1T44&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FtQliIp3sn1T44%2Fgiphy-downsized-large.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc35508ffb0d5cfadbaafa1bf7c0e1a9/href">https://medium.com/media/cc35508ffb0d5cfadbaafa1bf7c0e1a9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfbe9acd35ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/browsing-files-in-your-ios-app-in-swift-bfbe9acd35ff">Browsing files in your iOS app in Swift</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using a C library inside a Swift framework]]></title>
            <link>https://medium.com/swift-and-ios-writing/using-a-c-library-inside-a-swift-framework-d041d7b701d9?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d041d7b701d9</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Wed, 20 Jan 2016 23:20:50 GMT</pubDate>
            <atom:updated>2016-01-20T23:20:50.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2IYXPyCpv340FNWWNGj1g.png" /></figure><h4>A brief tutorial</h4><p>C is 44 years old. While that may sound like an ancient age for a programming language, C doesn’t care. It’s as energetic and as essential as ever. Yes, it might not be as ‘sexy’ as Swift or Go but it’s still often the best way to perform some low level tasks. Also, it is still the subject of healthy and passionate online debate — this week my Twitter feed was full of opinions and reactions to <a href="https://matt.sh/howto-c">https://matt.sh/howto-c</a>.</p><p>A few days ago I released my latest open source project — a Swift-native framework for zipping and unzipping files called Zip <a href="https://github.com/marmelroy/Zip">(see GitHub)</a>. Zip is built on top of minizip, an open-source C library and integrating the two together was rather challenging.</p><p>I’m sure other developers will face similar issues so here’s a quick step-by-step guide on how to use a C library inside a Swift framework.</p><h4><strong>Step 1 — Preparation</strong></h4><p>First, copy the C library’s folder to your project’s directory.</p><p>The next step is to create a <strong>module.modulemap</strong> file specifying the name of the framework and the headers you want to expose to your Swift code. For minizip, it looks like this:</p><pre>module minizip [system][extern_c] {<br> header “unzip.h”<br> header “zip.h”<br> export *<br>}</pre><h4>Step 2 — Xcode configuration</h4><p>Add your C library’s folder to your project. Make sure <strong>copy items if needed</strong> is deselected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70t_P26M96yiGsarQYAWRg.png" /></figure><p>Go to your project’s <strong>Build Settings</strong>. Find the header <strong>Swift Compiler — Search Paths. </strong>In<strong> Import Paths</strong>, add a relative path to your C library’s folder using<strong> ${SRCROOT}. </strong>If your folder includes subfolders select the recursive option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-56l7uzI3zm5qnTsl626Q.png" /></figure><p>Voila! You’re ready to go.</p><p>However, there’s one more thing…</p><h4>Step 3— Podspec configuration (BONUS)</h4><p>To distribute your Swift framework via Cocoapods, you will need to add the following to your podspec file:</p><p>Add the C library source files to <strong>s.source_files :</strong></p><pre>s.source_files = ‘Zip/minizip/*.{c,h}’, ‘Zip/minizip/aes/*.{c,h}’</pre><p>Add a relative path to the C library to the <strong>SWIFT_INCLUDE_PATHS</strong> configuration in <strong>s.pod_target_xcconfig</strong>. It’s imporant to remember that the relative path here is from the podspec’s perspective and it will likely be different to the relative path you added in the build settings.</p><pre>s.pod_target_xcconfig = {&#39;SWIFT_INCLUDE_PATHS&#39; =&gt; &#39;$(SRCROOT)/Zip/Zip/minizip/**&#39;}</pre><p>Next, you will need to add the module map to the <strong>s.preserve_paths</strong>:</p><pre>s.preserve_paths = ‘Zip/minizip/module.modulemap’</pre><h4>Step 4 — Party</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FykUYsNYRvrprq%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fdisney-the-jungle-book-mowgli-baloo-ykUYsNYRvrprq&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FykUYsNYRvrprq%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="255" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a13fbbc6d92ff2f2b951e2af192979d/href">https://medium.com/media/6a13fbbc6d92ff2f2b951e2af192979d/href</a></iframe><h4>Check out the full example on:</h4><h3><a href="https://github.com/marmelroy/Zip">github.com/marmelroy/Zip</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d041d7b701d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/using-a-c-library-inside-a-swift-framework-d041d7b701d9">Using a C library inside a Swift framework</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zipping and unzipping files in your Swift app]]></title>
            <link>https://medium.com/swift-and-ios-writing/zipping-and-unzipping-files-in-your-swift-app-1b33a82b4b88?source=rss-35d1429e88f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b33a82b4b88</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[zip]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Roy Marmelstein]]></dc:creator>
            <pubDate>Sun, 17 Jan 2016 22:31:29 GMT</pubDate>
            <atom:updated>2016-01-20T23:38:09.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_v81-kAzk6c5crowtKS8A.png" /></figure><h4>Introducing Zip, an iOS framework for working with Zip files.</h4><p>One of my favourite Objective C frameworks is <a href="https://github.com/ZipArchive/ZipArchive">SSZipArchive</a> - it’s a very useful wrapper on top of <a href="http://www.winimage.com/zLibDll/minizip.html">minizip</a>, an open source C library for zipping and unzipping files.</p><p>Last year I released a couple of <a href="https://github.com/marmelroy/">Swift frameworks</a> to help with phone number parsing and more general localization. For my first project of 2016, I wanted a different kind of challenge. Swift is super fun, powerful and elegant… until it needs to talk to C++ or C code. I wanted to try and create a Swift-native minizip wrapper that is lighter and takes advantage of what Swift has to offer (better type safety, progress closures, throwing errors etc).</p><p>Including a C library inside a Swift framework took plenty of xcode/podspec kung fu and I will write a more technical Medium post about that experience soon (<strong>UPDATE</strong>: <a href="https://medium.com/swift-and-ios-writing/using-a-c-library-inside-a-swift-framework-d041d7b701d9#.whk1otfk3">It’s here</a>).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FvEcyRJ5yysqk%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fthe-matrix-martial-arts-kung-fu-vEcyRJ5yysqk&amp;image=http%3A%2F%2Fmedia3.giphy.com%2Fmedia%2FvEcyRJ5yysqk%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="178" frameborder="0" scrolling="no"><a href="https://medium.com/media/e14fe536e46835770025d64860ffd904/href">https://medium.com/media/e14fe536e46835770025d64860ffd904/href</a></iframe><h3>Hello Zip</h3><p>Zip is super simple and crazy fast. The easiest way to use it is via the zip and unzip quick functions. Both take local file paths as NSURLs, throw if an error is encountered and return an NSURL to the destination if successful. This is what they look like…</p><pre>let unzipDirectory = try Zip.quickUnzipFile(filePath) <strong>//Unzip</strong><br>let zipFilePath = try Zip.quickZipFiles([filePath], fileName: &quot;archive&quot;) <strong>//Zip</strong></pre><p>For more advanced usage, Zip has functions that let you set custom destination paths, work with password protected zips and use a progress handling closure too.</p><h4>Check it out on:</h4><h3><a href="https://github.com/marmelroy/Zip">github.com/marmelroy/Zip</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F9hSsOshicxQHe%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2F9hSsOshicxQHe&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F9hSsOshicxQHe%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/5338271af0afb89ce6711c105ec0871c/href">https://medium.com/media/5338271af0afb89ce6711c105ec0871c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b33a82b4b88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swift-and-ios-writing/zipping-and-unzipping-files-in-your-swift-app-1b33a82b4b88">Zipping and unzipping files in your Swift app</a> was originally published in <a href="https://medium.com/swift-and-ios-writing">Swift and iOS Writing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>