<?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 Pavan Kumar C on Medium]]></title>
        <description><![CDATA[Stories by Pavan Kumar C on Medium]]></description>
        <link>https://medium.com/@pavankumarchalla?source=rss-653f154083ea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*60E8DbXiDroCwPxoLlDAZg.jpeg</url>
            <title>Stories by Pavan Kumar C on Medium</title>
            <link>https://medium.com/@pavankumarchalla?source=rss-653f154083ea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 07:09:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pavankumarchalla/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[Synchronize Apple calendar with Microsoft Teams events]]></title>
            <link>https://pavankumarchalla.medium.com/synchronize-apple-calendar-with-microsoft-teams-events-a1b79a41a1ed?source=rss-653f154083ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1b79a41a1ed</guid>
            <category><![CDATA[microsoft-teams]]></category>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[apple-calendar]]></category>
            <dc:creator><![CDATA[Pavan Kumar C]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 02:20:22 GMT</pubDate>
            <atom:updated>2021-01-21T02:24:02.849Z</atom:updated>
            <content:encoded><![CDATA[<h3>Synchronize Apple calendar with Microsoft Teams</h3><p>I use Mac and iPhone for my day in and out, And I am completely dependent on my Apple calendar for all my schedules, meetings and remainders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*VWhS_ngaPQAjzAwM3Kr9oQ.jpeg" /></figure><p>Here is how you sync Teams calendar events to Apple Calendar,</p><p>Step 1: Open your Apple Calendar and go to preferences</p><p>Step 2: Click on Account and then click on + and select Microsoft Exchange and click continue as shown in the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mUyedbDuYKn_LWnTFXKNyA.png" /></figure><p>Step 3: Enter your Name and Email Address(Teams) and Sign In.</p><p>Step 4: Once you have signed in you can sync your Mail, Calendar, Remainder etc</p><p>And that’s it, your Apple calendar is now synced up with Teams calendar events.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1b79a41a1ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about debounce: 4 ways to achieve debounce in Swift.]]></title>
            <link>https://blog.tarkalabs.com/all-about-debounce-4-ways-to-achieve-debounce-in-swift-e8f8ce22f544?source=rss-653f154083ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f8ce22f544</guid>
            <category><![CDATA[uisearchcontroller]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[responsive]]></category>
            <category><![CDATA[debounce]]></category>
            <dc:creator><![CDATA[Pavan Kumar C]]></dc:creator>
            <pubDate>Thu, 27 Aug 2020 11:18:40 GMT</pubDate>
            <atom:updated>2020-08-27T11:18:40.428Z</atom:updated>
            <content:encoded><![CDATA[<h3>All about debounce: 4 ways to achieve debounce in Swift</h3><p>Often times we come to a situation where we have to search 100 000+ records from local database (coredata or realm) or from a file or a plist etc.</p><p>And when user starts to search, each key press will make the call to method that queries this large data resulting in unresponsive app.</p><p>One way to optimise this will be implementing debounce.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3N-eOGzIGOR1s1-e8hfzMg.png" /></figure><p>What is debounce? Its a function which forces the execution to wait a certain amount of time before running again.</p><p>We have 4(may be more) ways to achieve debounce in Swift</p><h4><strong>1. Timer</strong></h4><p>Timers are a great way to run code on a repeating basis, and iOS has the <strong>Timer</strong> class to handle it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be40f7997c2c811ddabb7527771c55be/href">https://medium.com/media/be40f7997c2c811ddabb7527771c55be/href</a></iframe><p><strong>updateSearchResults </strong>is the UISearchController delegate method which gets called on each key press.</p><p><strong>searchTimer</strong> is an instance variable to store the <strong>Timer</strong>, Timer is scheduled to execute the closure for 0.5s but if the method gets called before that, then the timer is invalidated and reinitialised.</p><h4><strong>2. DispatchWorkItem</strong></h4><p>A DispatchWorkItem encapsulates work to be performed on a dispatch queue or within a dispatch group.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/180985fb7bf0bb9c4feda81632dd3e85/href">https://medium.com/media/180985fb7bf0bb9c4feda81632dd3e85/href</a></iframe><p><strong>updateSearchResults </strong>is the UISearchController delegate method which gets called on each key press.</p><p><strong>searchTask </strong>has the property to store <strong>DispatchWorkItem. </strong>DispatchQueue executes the DispatchWorkItem closure after the deadline time 0.5s and if the method gets called before the deadline then the searchTask is invalidated and reinitialised.</p><h4><strong>3. RxSwift</strong></h4><p>RxSwift is a framework for interacting with the Swift programming language, while RxCocoa is a framework that makes Cocoa APIs used in iOS, easier to use with reactive techniques.</p><p>First you will have to add RxSwift and RxCocoa to the project. You could use Cocoapods or Carthage or Swift Package Manager to add these dependencies</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b02947faedb728ceeabdafb31433b2a3/href">https://medium.com/media/b02947faedb728ceeabdafb31433b2a3/href</a></iframe><p>Disposebag<strong> </strong>is used for memory management and it holds all the disposables and allows us not to have to dispose of each subscription individually</p><p>searchBar is wrapped to Rx and is subscribed to search text changes.</p><p>debounce() listens to user events and publishes if there is a delay of 0.5s in user activity.</p><p>Subscriber receives the event of the search text which then is queried against the actual records.</p><p>DisposeBag collects all the disposables.</p><h4><strong>4. Combine</strong></h4><p>Combine is Apple’s new reactive framework for handling events over time. Combine Framework is Natively supported from iOS 13 and Swift 5 onwards.</p><p>First you will have to import Combine Framework.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9098db5902714c3e3925b5c02c0288d2/href">https://medium.com/media/9098db5902714c3e3925b5c02c0288d2/href</a></iframe><p>Cancellable is a protocol indicating that an activity or action supports cancellation. It frees up any allocated resources. It also stops side effects such as timers, network access, or disk I/O.</p><p>Publisher publishes the events whenever there is a change in the text in searchBar.</p><p>debounce() listens to user events and publishes if there is a delay of 0.5s in user activity.</p><p>sink() collects all the cancellable activities.</p><h4>Conclusion</h4><p>The query happens only if the user activity is idle for 0.5s while entering the search text, in this way we would be limiting a lot of redundant queries which results in app being responsive.</p><p>Now we are left with a question. Which one to choose?</p><p>In my opinion, if you are using RxSwift or Combine in your projects then you already know what you should go for and if you aren’t then using RxSwift or Combine to achieve debounce is bit overkill, in which case you could achieve using Timer or DispatchWorkItem.</p><p>Please find the sample solution here.</p><p><a href="https://github.com/pavankumarchalla/ResponsiveSearch">pavankumarchalla/ResponsiveSearch</a></p><p>Thanks for reading. Happy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f8ce22f544" width="1" height="1" alt=""><hr><p><a href="https://blog.tarkalabs.com/all-about-debounce-4-ways-to-achieve-debounce-in-swift-e8f8ce22f544">All about debounce: 4 ways to achieve debounce in Swift.</a> was originally published in <a href="https://blog.tarkalabs.com/">Tarka Labs Blogs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>