<?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[rahulkatariya - Medium]]></title>
        <description><![CDATA[Swift Developer - Medium]]></description>
        <link>https://medium.com/rahulkatariya?source=rss----7ba24a77ce95---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>rahulkatariya - Medium</title>
            <link>https://medium.com/rahulkatariya?source=rss----7ba24a77ce95---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:31:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/rahulkatariya" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I manage my tmuxinator files using AarKay]]></title>
            <link>https://medium.com/rahulkatariya/how-i-manage-my-tmuxinator-files-with-aarkay-7f417ace6fb8?source=rss----7ba24a77ce95---4</link>
            <guid isPermaLink="false">https://medium.com/p/7f417ace6fb8</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[tmux]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Rahul Katariya]]></dc:creator>
            <pubDate>Fri, 04 Jan 2019 14:11:12 GMT</pubDate>
            <atom:updated>2018-03-14T20:38:14.313Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a big fan of <strong>Tmux</strong> and <strong>Tmuxinator</strong>. It makes it so easy to switch between multiple projects using sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iov1efut0FkseL8Ys8Jwxw.png" /></figure><p>To add a new a project in <strong>Tmuxinator, </strong>we generally use the following:-</p><pre>tmuxinator new [project]</pre><p>A new file with default template is opened which we can edit with our configuration and add to our tmuxinator directory.</p><p>Lets say you want to create mulitple tmuxinator projects that have the same configuration of windows? 🤣</p><p>I have been working on a tool, called <strong>aarkay,</strong> for a long time to make such tasks simple and fast.</p><p>Let’s try adding projects in Tmuxinator using aarkay in just 3 steps.</p><ol><li>Creating a template</li><li>Create the data</li><li>Run aarkay</li></ol><p>Let’s create a template for Tmux inside <em>~/Developer/AarKay/AarKayTemplates/AarKay/Mux.yml.stencil</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/12ca0efb8855e672fa3a26d4da0c575c/href">https://medium.com/media/12ca0efb8855e672fa3a26d4da0c575c/href</a></iframe><p>Let’s create our data at <em>~/Developer/AarKay/AarKayFiles/RahulKatariya/macOS/dotfiles/tmuxinator/[rk].Mux.yml</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/54aa178b3521e50d903c93b3f4748536/href">https://medium.com/media/54aa178b3521e50d903c93b3f4748536/href</a></iframe><p>The last step is to run <strong>aarkay </strong>inside the destination folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u10bz7KZDA6q4vtpBlktVg.png" /></figure><p>All my tmuxinator projects are created with a single command 😊</p><blockquote>This is just one small use case of the tool.</blockquote><p><a href="https://github.com/RahulKatariya/AarKay">RahulKatariya/AarKay</a></p><p>Happy Templating! 😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f417ace6fb8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rahulkatariya/how-i-manage-my-tmuxinator-files-with-aarkay-7f417ace6fb8">How I manage my tmuxinator files using AarKay</a> was originally published in <a href="https://medium.com/rahulkatariya">rahulkatariya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating Swift Networking Code using AarKay]]></title>
            <link>https://medium.com/rahulkatariya/generating-swift-network-code-using-aarkay-64ad6d49d337?source=rss----7ba24a77ce95---4</link>
            <guid isPermaLink="false">https://medium.com/p/64ad6d49d337</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Rahul Katariya]]></dc:creator>
            <pubDate>Fri, 04 Jan 2019 14:11:03 GMT</pubDate>
            <atom:updated>2019-01-04T11:30:25.715Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*s7WEanvLTC_vCoY8CLCy2w.png" /></figure><p>In this tutorial, we will see how we can leverage <a href="https://github.com/RahulKatariya/AarKay"><strong>AarKay</strong></a><strong> </strong>to generate the Networking Code.</p><p>For Networking, we will use the <a href="https://github.com/Restofire/Restofire"><strong>Restofire</strong></a> created by me that lets you write services without switch cases and router.</p><h3>Prerequisites —</h3><ul><li><a href="https://github.com/RahulKatariya/AarKay">AarKay</a></li><li><a href="https://github.com/Restofire/aarkay-plugin-restofire">aarkay-plugin-restofire</a></li></ul><h3>Plugin Setup</h3><p>To add restofire plugin</p><ul><li>Add the following contents to `AarKayfile` —</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4d900c72d4afbb21242cd98ebb59050/href">https://medium.com/media/f4d900c72d4afbb21242cd98ebb59050/href</a></iframe><p>Next, we run aarkay update to update the runner and add restofire plugin to AarKay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vAaRWzu1R4KeSG3UafM2eA.png" /></figure><h3>Create Datafile</h3><p>Let’s create the Datafile with the following contents at <br>AarKay/AarKayData/<strong><em>{path}</em></strong>/Example.Requestable.yml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6FGAIqE0ENmkrAd6FSjaw.png" /></figure><h3>Run AarKay</h3><p>Now we have our Datafile and Templatefile setup, We can now run <strong>aarkay</strong> to generate our files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yYVPOMMUM99-dxh6hX9qg.png" /></figure><p>This generated the code for network service using the <strong>Example Datafile</strong> and <strong>Restofire Templatefile.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5765867770564f3a50080605e957ded/href">https://medium.com/media/d5765867770564f3a50080605e957ded/href</a></iframe><p><a href="https://github.com/RahulKatariya/AarKay">RahulKatariya/AarKay</a></p><p>Happy Networking! 😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64ad6d49d337" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rahulkatariya/generating-swift-network-code-using-aarkay-64ad6d49d337">Generating Swift Networking Code using AarKay</a> was originally published in <a href="https://medium.com/rahulkatariya">rahulkatariya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AarKay — A code generator for all developers]]></title>
            <link>https://medium.com/rahulkatariya/aarkay-a-code-generator-for-all-developers-65f3803db704?source=rss----7ba24a77ce95---4</link>
            <guid isPermaLink="false">https://medium.com/p/65f3803db704</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Rahul Katariya]]></dc:creator>
            <pubDate>Sat, 10 Mar 2018 11:15:31 GMT</pubDate>
            <atom:updated>2018-03-17T08:54:24.647Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*s7WEanvLTC_vCoY8CLCy2w.png" /></figure><blockquote>AarKay is a code generator designed for all developers to create any type of file from data and template.</blockquote><blockquote>Updated for AarKay 0.0.2</blockquote><p>The tool is designed especially for developers working on many projects at large scale. All projects have some files which are identical and only the data is what changes. These files can be converted into a template and data can be supplied to either generate or update all these files with a single command.</p><ul><li>All your Datafiles are located inside one folder giving you the birds eye view of your data.</li><li>The Datafiles directory structure is directly mapped with the Generatedfiles directory structure.</li></ul><h3>Installation</h3><p>Using Homebrew — brew install rahulkatariya/formulae/aarkay</p><h3>Components</h3><ul><li>Templatefiles</li><li>Datafiles</li></ul><h3>Templatefiles</h3><p>A Templatefiles consists of three components — <strong>Name</strong>, <strong>Extension</strong> and a <a href="https://github.com/kylef/Stencil"><strong>Stencil</strong></a><strong> </strong>template.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1596091c66c941fc1978907b44036773/href">https://medium.com/media/1596091c66c941fc1978907b44036773/href</a></iframe><p><strong>Breaking down the above Tempaltefile — <em>Greeting.txt.stencil</em></strong></p><ul><li><strong>Greeting</strong> — This is a unique name of the template.</li><li><strong>txt</strong> — This is the extension for all Generatedfiles.</li><li><strong>Hello {{name}}</strong> — This is the <a href="https://github.com/kylef/Stencil"><strong>Stencil</strong></a> template.</li></ul><blockquote><strong>Templatefiles Directory</strong> — <em>~/AarKay/AarKayTemplates/AarKay/</em>.</blockquote><p>All the templates should be created inside <strong><em>Templatefiles Directory</em></strong>.</p><h3>Datafiles</h3><p>A Datafile consists of three components — <strong>Filename</strong>, <strong>Template</strong> and <strong>Data </strong>for that template in <strong>JSON</strong> or <strong>Yml</strong> format.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b62dd8127477d377e106ccd94f3e8330/href">https://medium.com/media/b62dd8127477d377e106ccd94f3e8330/href</a></iframe><p><strong>Breaking down the above Datafile — Rahul.Greeting.yml</strong></p><ul><li><strong>Rahul </strong>— This is the name of Generatedfile.</li><li><strong>Greeting</strong> — This is the template to search for in <strong><em>Templatefiles Directory</em></strong>.</li><li><strong>name: Rahul</strong> — This is the data to be rendered with template <strong>Greeting</strong>.</li></ul><blockquote><strong>Datafiles Directory</strong> — <em>~/AarKay/AarKayData/</em>.</blockquote><p>All the data should be created inside <strong>Datafiles<em> Directory</em></strong>.</p><h3>Getting Started</h3><p>Let’s create a project inside <em>~/</em><strong>{project/path}/AarKayExample</strong> and run the command <strong>aarkay</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DDAcKKxs7DCB8YbDRKbSsQ.png" /></figure><p>This will create your Datafiles directory at <strong><em>AarKayFiles</em></strong> <strong><em>Directory</em></strong> plus the relative path of your project with base URL as ~/— <em>~/AarKay/AarKayData/</em><strong>{project/path}/AarKayExample</strong>.</p><h3>Creating a Template</h3><p>Let’s create the <strong>Greeting</strong> template inside <strong><em>Templates Directory</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GlPWR-AoKyOwe64dDg_FrA.png" /></figure><h3>Creating the data</h3><p>Instead of creating a one-to-one file, Let’s use the feature of creating one-to-many files by providing data with the <strong>Collection Datafile</strong>.</p><p><strong>Collection Datafile</strong> is a special kind of data file which has an Array of template data and uses [] as prefix in the Datafile name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KokI2WSsP0hB7lp5hMKYNQ.png" /></figure><h3>Generating the files</h3><p>The final step is to generate the files by running <strong>aarkay </strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hp0az4Yopc2htDt4f5sWTA.png" /></figure><blockquote>This is a tool which I created for personal use and wanted to share and open source soon so all developers can take advantage of it. Please share feedback by creating an issue on <a href="https://github.com/RahulKatariya/AarKay">github</a> or send it over <a href="https://twitter.com/rahulkatariya91">twitter</a> and don’t forget to applaud :).</blockquote><p><a href="https://github.com/RahulKatariya/AarKay">RahulKatariya/AarKay</a></p><p>Happy Code Generating! 😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65f3803db704" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rahulkatariya/aarkay-a-code-generator-for-all-developers-65f3803db704">AarKay — A code generator for all developers</a> was originally published in <a href="https://medium.com/rahulkatariya">rahulkatariya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean Architecture: Networking  in Swift]]></title>
            <link>https://medium.com/rahulkatariya/clean-architecture-networking-in-swift-185ee4855a15?source=rss----7ba24a77ce95---4</link>
            <guid isPermaLink="false">https://medium.com/p/185ee4855a15</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[alamofire]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Rahul Katariya]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 08:05:30 GMT</pubDate>
            <atom:updated>2018-02-15T19:23:17.218Z</atom:updated>
            <content:encoded><![CDATA[<h3>Clean Architecture: Networking in Swift</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*ogvVXFxxHiRa-vDNtUA_Ug.png" /></figure><p>We all are moving towards a clean architecture in iOS and for this, we have been experimenting with a lot of approaches like: moving from <strong>MVC</strong> to <strong>MVVM</strong> to make our <strong>View Models</strong> independent and easy to test. More patterns like <strong>Viper </strong>and<strong> MVVM-C </strong>have also emerged and are widely adopted by developers.</p><p>In this tutorial, we will see how we can write clean network requests using <a href="https://github.com/Restofire/Restofire"><strong>Restofire</strong></a>.</p><blockquote><a href="https://github.com/Restofire/Restofire"><strong>Restofire</strong></a> is a Protocol Oriented Network Abstraction Layer written on top of <a href="https://github.com/Alamofire/Alamofire"><strong>Alamofire</strong></a> to use services in a declarative way</blockquote><h3>List Notes API</h3><p>We will use Notes API from apiary.io — <a href="https://rahulkatariya.docs.apiary.io/#reference/notes">https://rahulkatariya.docs.apiary.io/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6HyBhVNKjSBna2YaBaMU6w.png" /></figure><h4>Breaking down the cURL request</h4><ol><li><strong>Host</strong> — private-07c21-rahulkatariya.apiary-mock.com</li><li><strong>Headers</strong> — Content-Type: application/json</li><li><strong>Path</strong> — notes</li><li><strong>Response</strong> — A collection of NoteResponseModel</li></ol><h3>Configuration</h3><p>The best place to configure Restofire is inside <em>didFinishLaunchingWithOptions</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b94d50b6a95dc4ab3fa9d70f7de3c4db/href">https://medium.com/media/b94d50b6a95dc4ab3fa9d70f7de3c4db/href</a></iframe><p>Once we have set the host and headers, it will be applied to all the network requests we make using Restofire.</p><blockquote>You can provide more configuration globally like request timeout, retry codes, retry interval, maximum retry count, validation, authentication and more.</blockquote><h3>ResponseSerializer</h3><p>By default, all network responses are of type Data but we can set custom response serializers according to our need. For this demo, we will make use of JSONDecodableResponseSerializer by adding the following snippet inside the application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7947e17fb621faea7bdf2b965f1af4c7/href">https://medium.com/media/7947e17fb621faea7bdf2b965f1af4c7/href</a></iframe><p>By adding the above code, we can now use decodable types as Response from the requests. Let’s create a decodable model for Note response.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31854074b6a4006f8720cc9c5e1e4335/href">https://medium.com/media/31854074b6a4006f8720cc9c5e1e4335/href</a></iframe><h3>Requestable</h3><p>In Restofire, every HTTP request is independent and is represented by a <strong>Requestable </strong>protocol and provides delegate methods to handle the response. The delegate methods can be used to save the response inside <strong>CoreData</strong> or <strong>Realm</strong> or <strong>UserDefaults</strong> or you can do any custom action. Let’s create our first network request to get all notes.</p><p>We have already configured the host and headers globally in AppDelegate. Let’s create NotesGetAllService service with <strong>path</strong> as &quot;<strong>notes</strong>&quot; and <strong>response</strong> as <strong>[NoteResponseModel]</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b60242846c068e0f9da3677334a33a0/href">https://medium.com/media/7b60242846c068e0f9da3677334a33a0/href</a></iframe><p>You may have noticed that I have passed a NSManagedObjectContext inside the requestable to store the results of the response inside CoreData by listening to the response callback as in the following code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a5eafadf402c61279d66faea71bfc3b/href">https://medium.com/media/0a5eafadf402c61279d66faea71bfc3b/href</a></iframe><p>Now, TheNotesGetAllService is flexible enough to be called from anywhere in our code and it will store the response inside CoreData.</p><p>We can now make the request to get all the notes after setting up CoreData in AppDelegate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4dbe13b9bc1df5db41b7acd13dc9473/href">https://medium.com/media/b4dbe13b9bc1df5db41b7acd13dc9473/href</a></iframe><p>The execute method is a default implementation of Requestable protocol which makes the request and calls the delegate method of NotesGetAllService.</p><blockquote>Note: You can also pass a completion handler inside the execute method if you want the response also to be delivered with the call.</blockquote><p>When the request is completed, it will save the list of notes inside CoreData and NotesTableViewController which is bound with FRC will automagically show the results.</p><p>A fully functioning demo including NotePostService and NoteDeleteService accompanying this article can be found here — <a href="https://github.com/Restofire/RestofireDemo">https://github.com/Restofire/RestofireDemo</a></p><p>Happy Networking 😎</p><p><a href="https://github.com/Restofire/Restofire">Restofire/Restofire</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=185ee4855a15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rahulkatariya/clean-architecture-networking-in-swift-185ee4855a15">Clean Architecture: Networking  in Swift</a> was originally published in <a href="https://medium.com/rahulkatariya">rahulkatariya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>