<?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 Priyanka Sabhagani on Medium]]></title>
        <description><![CDATA[Stories by Priyanka Sabhagani on Medium]]></description>
        <link>https://medium.com/@priyanka.sabhagani?source=rss-b2e9686f4de0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oG5_4f5NxlYMbjm8UNswoQ.png</url>
            <title>Stories by Priyanka Sabhagani on Medium</title>
            <link>https://medium.com/@priyanka.sabhagani?source=rss-b2e9686f4de0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:28:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@priyanka.sabhagani/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[KeyValuePairs vs Dictionary in Swift]]></title>
            <link>https://medium.com/@priyanka.sabhagani/keyvaluepairs-vs-dictionary-in-swift-ce390b3c0c9f?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce390b3c0c9f</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[dictionary]]></category>
            <category><![CDATA[swift-5]]></category>
            <category><![CDATA[key-value-pair]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 15:05:31 GMT</pubDate>
            <atom:updated>2019-03-12T15:07:58.186Z</atom:updated>
            <content:encoded><![CDATA[<p>Swift provides three primary <em>collection types</em>, known as arrays, sets, and dictionaries, for storing collections of values. We use a dictionary if we want a key-value association of elements.</p><p>We use a dictionary when we need to look up values based on their identifier. For example:</p><pre>let namesOfInteger: [Int: String] = [1: &quot;one&quot;, 2: &quot;two&quot;, 3: &quot;three&quot;]<br>print(namesOfInteger[2]) //Prints &quot;two&quot;</pre><p>You can access the value of an element by using subscript. Dictionary conforms to Hashable protocol, i.e it maintains a lookup table for all the keys. Thus, making it faster to access an element with its key.</p><p>KeyValuePairs, which is still in Beta, is a way to make usage of a <strong>dictionary literal</strong>, which does not conform to Hashable, thus saving the heap memory in which lookup table was stored. It comes up with an added advantage of multiple keys with the same name.</p><p>You can create it as:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b19781966a29562708e745d3f8c77fb/href">https://medium.com/media/7b19781966a29562708e745d3f8c77fb/href</a></iframe><p>And it can be accessed as:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3b9b9df8b55578ba99ca1ec6811911b/href">https://medium.com/media/a3b9b9df8b55578ba99ca1ec6811911b/href</a></iframe><p>It prints:</p><pre><strong>Evelyn Ashford set a 100m record of 10.76 seconds.</strong></pre><p>KeyValuePairs also maintain the ordering of its elements, as opposed to the Dictionary. It can also be used in cases where a function expects a key-value pair as a parameter.</p><p>In short,</p><ol><li>KeyValuePairs is a type used for dictionary literal.</li><li>KeyValuePairs can store multiple keys with the same name.</li><li>KeyValuePairs does not maintain hash lookup, thus complexity to access an element is O(<em>n</em>) rather than O(1) if you like Big O.</li><li>KeyValuePairs maintains the ordering of elements.</li></ol><p><em>Comment if you find an interesting use-case around this. That’s it for this article! I hope you enjoyed it and leave a few claps if you did. Feedbacks are most welcomed.</em></p><p>References:</p><ul><li><a href="https://www.hackingwithswift.com/example-code/language/what-are-keyvaluepairs">What are KeyValuePairs? - free Swift 4.2 example code and tips</a></li><li><a href="https://developer.apple.com/documentation/swift/keyvaluepairs">KeyValuePairs</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce390b3c0c9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Libraries you should know about,  for iOS development]]></title>
            <link>https://medium.com/@priyanka.sabhagani/libraries-you-should-know-about-for-ios-development-a2e8c68d0bea?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2e8c68d0bea</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 13:56:42 GMT</pubDate>
            <atom:updated>2019-01-20T13:56:42.425Z</atom:updated>
            <content:encoded><![CDATA[<h3>Libraries you should know about, for iOS development</h3><p>Starting with iOS development? Working with CocoaPods and swift? Here is the list of open-source libraries you should know about, which can make your life easy:</p><ol><li><strong>Alamofire</strong></li></ol><p>Every app makes network calls. Alamofire is an elegant swift based networking library, which simplifies common networking tasks. Few of its features include chainable request/response methods, validation of response, public key pinning. You can find all the features here: <a href="https://cocoapods.org/pods/Alamofire">https://cocoapods.org/pods/Alamofire</a>.</p><p>It also includes few advanced features in the latest release like task metrics which gives you fantastic statistical information about the request and response execution.</p><p>You can start integrating and developing it with below tutorial:</p><p><a href="https://www.raywenderlich.com/35-alamofire-tutorial-getting-started">https://www.raywenderlich.com/35-alamofire-tutorial-getting-started</a></p><p><strong>2. SwiftyJSON</strong></p><p>You can parse the swift response using JSONSerialization, which becomes quite messy in case of optional chaining. Also, after a point, it also becomes difficult to read.</p><p>Example:</p><pre>if let JSONObject = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [[String: Any]],<br>    let username = (JSONObject[0][&quot;user&quot;] as? [String: Any])?[&quot;name&quot;] as? String {<br>        // There&#39;s our username<br>}</pre><p>With SwiftyJSON, you can do it like this:</p><pre>let json = JSON(data: dataFromNetworking)<br>if let userName = json[0][&quot;user&quot;][&quot;name&quot;].string {<br>  //Now you got your value<br>}</pre><p>Isn’t it simpler to read? Hell yes!</p><p>3. <strong>RealmSwift</strong></p><p>If you want to persist your data, you can go for it. Realm is faster than raw SQLite on common operations. It is a mobile database which can be queried via code and is exposed as objects. You can watch a video tutorial from here: <a href="https://realm.io/docs/tutorials/realmtasks/">https://realm.io/docs/tutorials/realmtasks/</a></p><p>4. <strong>RxSwift</strong></p><p>This is one of the most interesting libraries which provides you to do functional reactive programming with Swift. With this, you can actually reduce lines of code to less than half.</p><p>You can start with the following tutorial: <a href="https://www.raywenderlich.com/688-introducing-rxswift-reactive-programming-with-swift">https://www.raywenderlich.com/688-introducing-rxswift-reactive-programming-with-swift</a></p><p>If you want detailed control of your system, have a look at RxCocoa.</p><p>5. <strong>ObjectMapper</strong></p><p>You can create custom models and map JSON using those. It supports structs as well. You can avoid using with the introduction of Codable protocol in Swift 4 and achieve the same functionality as ObjectMapper using the CodableExtensions. There is a great article which expresses the difference of two by <a href="https://medium.com/u/1ca032149fdf">James Ruston</a> (<a href="https://medium.com/you-dont-know-swift/codable-vs-objectmapper-af5fe8e8efd5">https://medium.com/you-dont-know-swift/codable-vs-objectmapper-af5fe8e8efd5</a>).</p><p><strong>6. Fabric and Crashlytics</strong></p><p>Testing is the most important stage in an app life cycle. You can use Fabric to share the builds which are faster when compared to TestFlight. Crashlytics can be used to analyze the crash reports.</p><p>So, what libraries are you using? Feedbacks and comments are most welcomed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2e8c68d0bea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The journey of my first app on Flutter(Part 2)]]></title>
            <link>https://medium.com/@priyanka.sabhagani/the-journey-of-my-first-app-on-flutter-part-2-1220bdde38ce?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1220bdde38ce</guid>
            <category><![CDATA[listview]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[widget]]></category>
            <category><![CDATA[floating-action-button]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 13:54:28 GMT</pubDate>
            <atom:updated>2019-01-20T13:54:28.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*MJkshK46oHi0WyouCNvzww.jpeg" /></figure><p>You must have already read the part 1, if not you can find it <a href="https://medium.com/@priyanka.sabhagani/the-journey-of-my-first-app-on-flutter-part-1-9454ab6f458b">here</a>:</p><p>We will build following listview whose content is dynamic, dependent on user actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*m-DoqCHMeNoa3CEiGDLQIw.gif" /></figure><p>Let’s start building the app:</p><p>Start editing main.dart file. We will have to make use of variable which will get updated on the click of floating action buttons, which will, in turn, update our list. Here, we need two floating action buttons, one of them is already provided by flutter default app. We need ‘-’ icon in the other button. Flutter provides us with too many icons. We will make use of it. You can find the list of icons <a href="https://docs.flutter.io/flutter/material/Icons/remove-constant.html">here</a>.</p><p>Let’s add one more button below it:</p><pre>FloatingActionButton(<br>              onPressed: _decrementCounter,<br>              tooltip: &#39;Decrement&#39;,<br>              child: Icon(Icons.remove),<br>            ),</pre><p>Here, the tooltip parameter is optional. It describes the action that will occur when the button is pressed. The text gets displayed when the user long-presses on the button and is used for accessibility as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*ULEb9Mel8Etv-XJXH8mZvw.gif" /></figure><p>Let’s run the app and we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*IjPRuqA_6o3oRME9IqyZMQ.png" /></figure><p>Oh!! This is not what we expected!! It says ‘Duplicated named argument! Does it mean that we cannot have two FloatingActionButton????</p><p>Surely not. It means that we can have only one such argument (floatingActionButton). We will have to wrap the two buttons in a container. Now, what should we wrap it into? You can find a list of widgets <a href="https://docs.flutter.io/flutter/widgets/widgets-library.html">here</a>. Since we need the two buttons in a single row, let’s wrap it in a row as follows:</p><pre>floatingActionButton:Row(<br>          children: &lt;Widget&gt;[<br>            FloatingActionButton(<br>              onPressed: _incrementCounter,<br>              tooltip: &#39;Increment&#39;,<br>              child: Icon(Icons.add),<br>            ),<br>            FloatingActionButton(<br>              onPressed: _decrementCounter,<br>              tooltip: &#39;Decrement&#39;,<br>              child: Icon(Icons.remove),<br>            ),<br>          ],<br>        )</pre><p>We will have to define the _decrementCounter function to make it compile. Let us define a void function below the existing _incrementCounter which does nothing:</p><pre>void _decrementCounter() {<br>    <br>  }</pre><p>You will see the following changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*wM0kwyMxoyNHQlk7XkT-9A.png" /></figure><p>Okay! We need to align these buttons now. Since, we need to align it over the row, which is our main alignment axis here, we will use some parameter of MainAxisAlignment. We have the following options now:</p><ul><li>center</li><li>end</li><li>start</li><li>spaceAround</li><li>spaceBetween</li><li>spaceEvenly</li><li>values: With this, you can customize the spacing between each button</li></ul><p>I recommend you to try all the properties which will make you understand it better. In this case, we will use spaceAround. Add the following line in floatingActionButton:</p><pre>mainAxisAlignment: MainAxisAlignment.spaceAround,</pre><p>And here it is!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*_EN4A6dvnxc05Eq4iRyzXw.png" /></figure><p>It’s time to make the list. We can see <a href="https://docs.flutter.io/flutter/widgets/ListView-class.html">here</a> that we have multiple options for making a list.</p><ul><li><a href="https://docs.flutter.io/flutter/dart-core/List-class.html">List&lt;Widget</a>&gt;: This does work for all the children, even when they are out of the screen.</li><li><a href="https://docs.flutter.io/flutter/widgets/ListView/ListView.builder.html">ListView.builder</a>: It takes in itemBuilder parameter and builds the children on demand.</li><li><a href="https://docs.flutter.io/flutter/widgets/ListView/ListView.separated.html">ListView.separated</a>: It takes the parameter separatorBuilder and builds a separator between each item in your list.</li><li><a href="https://docs.flutter.io/flutter/widgets/ListView/ListView.custom.html">ListView.custom</a>: You can customize every list item and can control the algorithm used to estimate the size of children that are not actually visible.</li></ul><p>We will use the ListView.builder in this case.</p><p>Replace the children in the body with the following:</p><pre>children: &lt;Widget&gt;[<br>            ListView.builder(<br>              itemCount: 5,<br>              padding: EdgeInsets.all(20.0),<br>              shrinkWrap: true,<br>              itemBuilder: (context, int index) {<br>                return Container(<br>                    color: Colors.blue,<br>                    width: 220,<br>                    child: Text(<br>                      &#39;item&#39;,textAlign: TextAlign.center,<br>                    ),<br>                );<br>              },<br>            ),<br>          ],</pre><p>Notice that you will need shrinkWrap parameter as listView is inside Column else you will get an exception.</p><p>Now, we will create a variable which will store the data to be displayed in the list. Get rid of the counter variable and replace it with:</p><pre>var data = [&#39;1&#39;,&#39;2&#39;,&#39;3&#39;];</pre><p>And make use of this data in listview as:</p><pre>children: &lt;Widget&gt;[<br>            ListView.builder(<br>              itemCount: <strong>data.length,</strong><br>              padding: EdgeInsets.all(20.0),<br>              shrinkWrap: true,<br>              itemBuilder: (context, int index) {<br>                return Container(<br>                    color: Colors.blue,<br>                    width: 220,<br>                    child: Text(<br>                     <strong> data[index],</strong><br>                      textAlign: TextAlign.center,<br>                    ),<br>                );<br>              },<br>            ),<br>          ],</pre><p>Let’s mutate the state for increment and decrement functionality:</p><pre>void _incrementCounter() {<br>    setState(() {<br>      var count = data.length + 1;<br>      data.add(count.toString());<br>    });<br>  }</pre><pre>void _decrementCounter() {<br>    setState(() {<br>      data.removeLast();<br>    });<br>  }</pre><p>All done!!</p><p>It was quite easy. Isn’t it? Let’s put it all together:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3502b232dcd59ae42e4ab1d3bed43433/href">https://medium.com/media/3502b232dcd59ae42e4ab1d3bed43433/href</a></iframe><p>Here, we learned:</p><ul><li>Layouts for main axis alignment</li><li>Properties for floating action button</li><li>When to make use of different widgets like ‘Row’</li><li>How to build a list view</li><li>Mutate the state to update our widget</li><li>Usage of array, add and remove operations.</li></ul><p>There is a loooong way ahead!! In the upcoming parts, we will learn how to debug flutter app, make use of some pretty animations and much more. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1220bdde38ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The journey of my first app on Flutter(Part 1)]]></title>
            <link>https://medium.com/@priyanka.sabhagani/the-journey-of-my-first-app-on-flutter-part-1-9454ab6f458b?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9454ab6f458b</guid>
            <category><![CDATA[listview]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[widget]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 13:50:57 GMT</pubDate>
            <atom:updated>2019-01-20T14:04:12.527Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*MJkshK46oHi0WyouCNvzww.jpeg" /></figure><p>Being primarily an iOS developer, transitioning in a mobile developer, it is important to keep yourself updated with the latest technologies and know the pros and cons of each one, thereby making the required amendments in your work life. Google has launched a stable release for Flutter 1.0 nearly a month back, which has become quite a word in the industry.</p><p>Let’s do a little hands-on and then have a verdict on it. This series will cover everything from scratch to building the first beautiful flutter app. Let’s start!!</p><ol><li>Install and setup your editor by following <a href="https://flutter.io/docs/get-started/install">https://flutter.io/docs/get-started/install</a>.</li></ol><p>2. Create a flutter app by running the following command:</p><pre>flutter create flutter_list</pre><p>3. Run your app using</p><pre>cd flutter_list<br>flutter run</pre><p>You will the following default app running in your simulator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*4FsqMrz9HEPgfuvYFyg2Ew.gif" /><figcaption>Default flutter app</figcaption></figure><p>4. We will go through the main.dart file and understand what each block is meant for.</p><p>UIView of iOS or View of Android is equivalent to Widget in Flutter and these Widgets are implemented using material design. Therefore, firstly we must include its package which you can see in the first line:</p><pre>import &#39;package:flutter/material.dart&#39;;</pre><p>A dart program starts its execution from main(). Now, to show something on screen we must inflate the required widget and attach it to the screen. This is done by runApp().</p><p>Therefore, the next statement:</p><pre>void main() =&gt; runApp(MyApp());</pre><p>Let’s go over the next block:</p><pre>class MyApp extends StatelessWidget {<br>  <a href="http://twitter.com/override">@override</a><br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      title: &#39;Flutter Demo&#39;,<br>      theme: ThemeData(<br>        primarySwatch: Colors.blue,<br>      ),<br>      home: MyHomePage(title: &#39;Flutter Demo Home Page&#39;),<br>    );<br>  }<br>}</pre><p>A MaterialApp configures the top-level <a href="https://docs.flutter.io/flutter/widgets/Navigator-class.html">Navigator</a>, where home contains the default first page and you can route to next screens using routes. You can refer <a href="https://docs.flutter.io/flutter/widgets/Navigator-class.html">https://docs.flutter.io/flutter/widgets/Navigator-class.html</a> for more details on routing.</p><p>Theme indicates the color scheme of your application.</p><p>Change theme to the following:</p><pre>theme: ThemeData.dark(),</pre><p>And you will see the changes as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*rX-0AknfZYkTwm-K1VzfYw.png" /></figure><p>You can check out the following link to see different themes provided by flutter: <a href="https://docs.flutter.io/flutter/material/ThemeData-class.html">https://docs.flutter.io/flutter/material/ThemeData-class.html</a></p><p>Now let’s go over next piece of code:</p><pre>class MyHomePage extends StatefulWidget {<br>  MyHomePage({Key key, this.title}) : super(key: key);</pre><pre>final String title;</pre><pre><a href="http://twitter.com/override">@override</a><br>  _MyHomePageState createState() =&gt; _MyHomePageState();<br>}</pre><p>MyHomePage is the first widget that appears on your screen. You might wonder that why didn’t I cover <strong>extends StatelessWidget </strong>in the above section. It is done purposely as things can be better understood if they are compared.</p><p>When the description of the user interface is not fully concrete, i.e., it is dependent on some factors ( these factors are termed as ‘state’ ), we use <strong>StatefulWidget. createState()</strong>, as the name indicates, creates a state for the widget. In this case, <strong>_MyHomePageState()</strong>.</p><p>(Note that underscore before class or function denotes that it is a private member).</p><p>You can form an analogy between <strong>functional components</strong> in React Native and <strong>StatelessWidget.</strong></p><p>Now, the final class which builds the widget:</p><pre>class _MyHomePageState extends State&lt;MyHomePage&gt; {<br>  int _counter = 0;</pre><pre>void _incrementCounter() {<br>    setState(() {<br>      _counter++;<br>    });<br>  }</pre><pre><a href="http://twitter.com/override">@override</a><br>  Widget build(BuildContext context) {<br>        title: Text(widget.title),<br>      ),<br>      body: Center(<br>        child: Column(<br>          mainAxisAlignment: MainAxisAlignment.center,<br>          children: &lt;Widget&gt;[<br>            Text(<br>              &#39;You have pushed the button this many times:&#39;,<br>            ),<br>            Text(<br>              &#39;$_counter&#39;,<br>              style: Theme.of(context).textTheme.display1,<br>            ),<br>          ],<br>        ),<br>      ),<br>      floatingActionButton: FloatingActionButton(<br>        onPressed: _incrementCounter,<br>        tooltip: &#39;Increment&#39;,<br>        child: Icon(Icons.add),<br>      ), <br>    );<br>  }<br>}</pre><p>If you want to change the state of a variable and make changes in your UI accordingly, you will have to use setState().</p><p>Widget.build() is an overriden method which is responsible for building the elements. If you don’t want it as a StatefulWidget, you can write it as follows:</p><pre>class MyHomePage extends StatelessWidget {<br>  MyHomePage({this.title});</pre><pre>  final String title;</pre><pre>  @override<br>    Widget build(BuildContext context) {<br>    .....<br>  }<br>}</pre><p>If you use this, no matter how many times you call _incrementCounter, your UI won’t get updated.</p><p>That’s it for the basic understanding. Let’s get our hands dirty on and build an application! We will create a basic listview, whose length will be dynamic, depending on the user interactions in our next post.</p><p>Feedbacks and comments are most welcomed.</p><p>Where to go from here? We will have hands-on the <a href="https://medium.com/@priyanka.sabhagani/the-journey-of-my-first-app-on-flutter-part-2-1220bdde38ce">next part.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9454ab6f458b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Fastlane for iOS app]]></title>
            <link>https://medium.com/@priyanka.sabhagani/using-fastlane-for-ios-app-2b7018aa245b?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b7018aa245b</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[fastfile]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[fastlane]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 18:10:52 GMT</pubDate>
            <atom:updated>2019-01-06T18:26:31.551Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*A_T4gJ_2FE9UFG8tRBlAPQ.png" /><figcaption>Automation done right!</figcaption></figure><p>Being an iOS developer, it is quite tedious to set provisioning profiles, create archives, export, upload and then share the build to QAs and then to your audience. Imagine a single command does it all for you. Amazing! Isn’t it?</p><ol><li>Install and setup fastlane in your project:</li></ol><pre>brew cask install fastlane</pre><p>Run the following command from your project directory:</p><pre>fastlane init</pre><p>2. Edit the Appfile in the Fastlane folder of your repo and put app_id, apple_id and team_id as:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c58460512477ae3952d0f5e23a17edc/href">https://medium.com/media/2c58460512477ae3952d0f5e23a17edc/href</a></iframe><p>3. Edit the Fastfile in the Fastlane folder of your repo. Here, you can make as many lanes as you like. For the most common scenarios, we will make use of debug and release lanes.</p><p>Debug lane will deploy to crashlytics while release lane will deploy to TestFlight. (All of this is very much configurable with the help of fastlane actions).</p><p>Following is an example of a Fastfile:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/626acb07104249be9aedb002df5c6814/href">https://medium.com/media/626acb07104249be9aedb002df5c6814/href</a></iframe><p>Since I have multiple Xcode versions on my system, I always use ‘xcode_select’ action in the lane to specify which one to use for the building. It’s just a safety check.</p><p>The default build configuration on Fastlane is of release. Hence, we need to explicitly mention ‘configuration’ and ‘provisioningProfiles’ for the debug lane.</p><p>4. Run ‘fastlane debug’ or ‘fastlane release’ from the root project directory.</p><p>And you’re done. You can further explore fastlane actions here: <a href="https://docs.fastlane.tools/actions/">https://docs.fastlane.tools/actions/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b7018aa245b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pure components in practice in React Native]]></title>
            <link>https://medium.com/@priyanka.sabhagani/pure-components-in-practice-in-react-native-8e976debb6a1?source=rss-b2e9686f4de0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e976debb6a1</guid>
            <category><![CDATA[purecomponent]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Priyanka Sabhagani]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 18:06:45 GMT</pubDate>
            <atom:updated>2019-01-06T18:31:23.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*B2Pe9AFAHxKw8MDNxAj8uQ.png" /></figure><p>We can avoid re-rendering of entire component (when only a part of it has to be updated ) by using Pure components, as it does the shallow comparison, i.e, re-render the component only when their references are changed. When the attributes of an object change, it does not get re-rendered. We will demonstrate this by making a list where the input data is static. Every row has a counter variable which increments or decrements on the press of ‘+’ or ‘-’ buttons respectively.</p><p>Let’s dive into the basic listing implementation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/19e96d6aa02f2fb7ad40ac129e3bbaad/href">https://medium.com/media/19e96d6aa02f2fb7ad40ac129e3bbaad/href</a></iframe><p>Please find the full source code here: <a href="https://github.com/pikaaa/listing/tree/24a9efcde7622862723b05899e685df36b3d5625">https://github.com/pikaaa/listing/tree/24a9efcde7622862723b05899e685df36b3d5625</a></p><p>It creates the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hhWCO_-B0UUxA5wpLq1bDg.gif" /></figure><p>Here, you will find that when I press ‘+’ on any row, entire list re-renders.</p><p>Let’s use PureComponents and solve this by making each list item as a separate component as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c861c4822ea4c38af7d7b97e73963423/href">https://medium.com/media/c861c4822ea4c38af7d7b97e73963423/href</a></iframe><p>And use it as:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8029413fba751871bb228a93541ae6f1/href">https://medium.com/media/8029413fba751871bb228a93541ae6f1/href</a></iframe><p>Now, observe the result of re-rendering:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZwhF-51dufJndCHcziD-Q.gif" /></figure><p>Wohoo! We just avoided re-rendering of an entire listing. This will have a great performance impact when it’s a complicated screen.</p><p>Source code is available at: <a href="https://github.com/pikaaa/listing/">https://github.com/pikaaa/listing/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e976debb6a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>