<?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 Jigyasaa Alemu Sood on Medium]]></title>
        <description><![CDATA[Stories by Jigyasaa Alemu Sood on Medium]]></description>
        <link>https://medium.com/@jjsood?source=rss-36791f4fddb1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zdFn6AT0j4kifMTq_ZQOZg.jpeg</url>
            <title>Stories by Jigyasaa Alemu Sood on Medium</title>
            <link>https://medium.com/@jjsood?source=rss-36791f4fddb1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:54:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jjsood/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[Local Notifications in iOS Apps]]></title>
            <link>https://medium.com/the-sd-coders/local-notifications-in-ios-apps-b660af8764eb?source=rss-36791f4fddb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b660af8764eb</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[local-notifications]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Jigyasaa Alemu Sood]]></dc:creator>
            <pubDate>Thu, 13 May 2021 20:58:33 GMT</pubDate>
            <atom:updated>2021-05-13T20:58:33.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nz-gJD632h3X84hl" /><figcaption>Photo by <a href="https://unsplash.com/@jamie452?utm_source=medium&amp;utm_medium=referral">Jamie Street</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Often we want to send notifications to our users, outside of our application.</p><p>Notifications can be used to present alerts, play sounds or update our badge icon. We can use notifications to present important updates and grab our user’s attention.</p><p>There are two approaches to doing this:</p><ul><li><strong>Local notifications </strong>— scheduled and sent by the application itself</li><li><strong>Push notifications </strong>— scheduled and sent by a cloud database / server connected to the application</li></ul><p>In order to use <strong>push notifications</strong>, an Apple Developer Account is required. This is also very implementation-specific, since it is triggered from the cloud database or server end. For this reason, we cover local notifications here.</p><p>To send a local notification we need to create a <strong>UNMutableNotificationContent() </strong>which will store the details of our notification — such as the title, body and sound. We also establish a <strong>trigger</strong> to define when the notification will be sent</p><p>There are various triggers:</p><ul><li>Time elapsed</li><li>Calendar dates / times</li><li>Locations</li></ul><p>Each of these has a certain data type such as <strong>UNTimeIntervalNotificationTrigger</strong>, <strong>UNCalendarNotificationTrigger </strong>and <strong>UNLocationNotificationTrigger </strong>respectively.</p><p>We create a push notification by creating a <strong>UNNotificationRequest </strong>by providing an identifier, notification content and a trigger.</p><p>For our example we will demonstrate how to setup a time interval:</p><pre>func displayNotifications(timing: Double) {<br> <br> //local notifications need 3 objects: content, trigger and request</pre><pre> let content = UNMutableNotificationContent()<br> content.title = “Title!”<br> content.body = “This is a notification body, check it!”<br> content.sound = UNNotificationSound.default<br> <br> //trigger defines when the notification will be sent</pre><pre> let trigger = UNTimeIntervalNotificationTrigger(timeInterval: initialTiming, repeats: false) //time in seconds, if should be fired repeatedly <br> <br> let request = UNNotificationRequest(identifier: “testIdentifier”, content: content, trigger: trigger)<br> <br>//send the notification</pre><pre> UNUserNotificationCenter.current().add(request, withCompletionHandler: nil) <br> }</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b660af8764eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-sd-coders/local-notifications-in-ios-apps-b660af8764eb">Local Notifications in iOS Apps</a> was originally published in <a href="https://medium.com/the-sd-coders">The SDCoders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add FaceID & TouchID to your iOS App (Swift)]]></title>
            <link>https://medium.com/the-sd-coders/add-faceid-touchid-to-your-ios-app-swift-9518c86eac0b?source=rss-36791f4fddb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9518c86eac0b</guid>
            <category><![CDATA[biometric-authentication]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[face-id]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[touch-id]]></category>
            <dc:creator><![CDATA[Jigyasaa Alemu Sood]]></dc:creator>
            <pubDate>Wed, 28 Apr 2021 06:16:17 GMT</pubDate>
            <atom:updated>2021-04-28T06:16:45.109Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUv-6NWsVYUlCvTBz4RonA.jpeg" /></figure><p>To log our users into our apps, users often have to enter their usernames and passwords. This is a common approach used in nearly all software platforms.</p><p>In iOS, we can take advantage of <strong>biometrics</strong> — unique personal identifiers a user has (like a fingerprint or facial appearance) to <strong>authenticate</strong> or verify a user’s identity. Touch ID authenticates a user using their fingerprints and Face ID authenticates via a user’s facial appearance.</p><p>The iOS framework for this functionality is called <strong>LocalAuthentication</strong>. Let see how this works!</p><p>Steps:</p><ol><li>Add login button to ViewController</li><li>Import the LocalAuthentication framework</li><li>Check if the device is capable of using biometrics, if the sensor is present and the setting is enabled by the user</li><li>If enabled, send a request to the user</li><li>If the request is successful, this is the device’s owner and we can unlock the app</li><li>Otherwise — send a failure message</li></ol><p><strong>First, let’s set up the UI on the Main.storyboard</strong></p><p>Add a button to your login page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G7pbO3RyhDLA0eSB_fAmtQ.gif" /></figure><p>Then add an ibaction for that button, which runs every time you click on the button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHjgp88kt-BePnWcAqCChg.gif" /></figure><p>Create a segue from the login ViewController to your app’s first screen’s ViewController</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mbmrq0hnuXRofI97_B1qJg.gif" /></figure><p><strong>Now let’s add some code to the ViewController.swift file that is connected to the Login page</strong></p><p>let’s import the LocalAuthentication framework, which stores the biometric functionality we want to tap into:</p><pre><strong>import</strong> LocalAuthentication</pre><p>We will design a function called <strong>authenticate() </strong>to perform the authentication. It will store a context of type <strong>LAContext </strong>and hold an error of NSError? If something goes wrong, the error will contain a message of what went wrong.</p><pre><strong>@IBAction</strong> <strong>func</strong> didTapLoginBtn(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre>    authenticate()</pre><pre>}</pre><pre><strong>func</strong> authenticate() {</pre><pre><strong>    let</strong> context = LAContext()</pre><pre><strong>    var</strong> error: NSError? = <strong>nil</strong></pre><pre><strong>  if</strong>        context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &amp;error) {</pre><pre><strong>   let</strong> reason = &quot;Identify yourself!&quot;</pre><pre>   context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics,</pre><pre>                          localizedReason: reason) {</pre><pre>       [<strong>weak</strong> <strong>self</strong>] success, authenticationError <strong>in</strong></pre><pre>       DispatchQueue.main.async {</pre><pre><strong>          guard</strong> success, error == <strong>nil</strong> <strong>else</strong>{</pre><pre>          //Authentication failed, prompt an error message to the    <br>          //user</pre><pre><strong>         return</strong></pre><pre>       }</pre><pre>   //Authentication successful! Proceed to next app screen.</pre><pre><strong>   self</strong>?.performSegue(withIdentifier: &quot;loginSegue&quot;, sender: <strong>nil</strong>)</pre><pre>  }</pre><pre> }</pre><pre>} <strong>else</strong> {</pre><pre>//No biometrics available</pre><pre><strong>let</strong> alert = UIAlertController(title: &quot;Unavailable&quot;, message: &quot;FaceID Auth not available&quot;, preferredStyle: .alert)</pre><pre>alert.addAction(UIAlertAction(title: &quot;Dismiss&quot;, style: .cancel, handler: <strong>nil</strong>))</pre><pre>present(alert, animated: <strong>true</strong>)</pre><pre>}</pre><pre>}</pre><p>context.evaluatePolicy() will have a closure that contains the parameters of <strong>success </strong>and <strong>authenticationError</strong>. Since it takes a few seconds to take a user’s biometrics to identify them, this is an asynchronous action so we need to use <strong>DispatchQueue </strong>to send this task to the async thread.</p><p>Check the success and authenticationError condition of context.evaluatePolicy() and perform whatever behavior we want within the closure.</p><p>This approach works for Touch ID and Face ID.</p><p>One last step in order to make the code work is to add permission for FaceID in the info.plist file. Go to Info.plist and add a key for <strong>Privacy — Face ID Usage Description. </strong>This will take the form of the reason provided to the user within Face ID, instead of using the reason in our closure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*XfZoJGyqoKEO_j2J4ZrP1Q.gif" /></figure><p><strong>Running on a simulator</strong></p><p>When you first run your app and press the login button, you might see an error message like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*VxNFuG3GWR7yw1EsAltQyQ.png" /></figure><p>To fix this, just make sure to check “Enrolled” in order to allow faceID on simulator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*IsG4o2fN_zVBowJgMLxndg.png" /></figure><p>Once you do that, when you click login again, it should prompt you to use faceID!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*FrtDPdm9jz7UCdsgF0gmCg.gif" /></figure><p>You can go back to the simulator’s nav bar and test if faceID is working by clicking Matching face and non-matching face after you click on the login button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b9XSLtdvFOd82YIIIAHvMg.png" /></figure><p>Upon successful login, I see my app’s main screen!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*E2Kx96_bA7p4NC2rnd8ilQ.gif" /></figure><p>That’s it! Quick and easy tutorial on how to implement FaceID and TouchID for iOS apps, hope you liked it :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9518c86eac0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-sd-coders/add-faceid-touchid-to-your-ios-app-swift-9518c86eac0b">Add FaceID &amp; TouchID to your iOS App (Swift)</a> was originally published in <a href="https://medium.com/the-sd-coders">The SDCoders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Git version control with Terminal and Xcode]]></title>
            <link>https://medium.com/the-sd-coders/using-git-version-control-with-terminal-and-xcode-aabeae21f17e?source=rss-36791f4fddb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/aabeae21f17e</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[version-control]]></category>
            <dc:creator><![CDATA[Jigyasaa Alemu Sood]]></dc:creator>
            <pubDate>Sun, 07 Feb 2021 06:50:04 GMT</pubDate>
            <atom:updated>2021-02-07T06:50:04.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XxMKcsSk-ti-IT9GfWG3XA.jpeg" /></figure><p>Version control is something that most programmers should know, as programming, contrary to the stereotypical depiction in Hollywood movies, is a collaborative effort!</p><p><strong>Well, you might ask, what is version control?</strong></p><p>Version control, also known as source control, is a good software engineering practice of keeping track of changes to your code. One of the most popular and commonly used version control systems is Git, and it is hosted on Github. It can handle very small to very large scale projects, so, regardless of the complexity of the application, anyone can use it to keep track of their code changes :)</p><p>You might think, oh man, I just wanna code, I don’t care or want to know about version control, why do we need it anyway?</p><p>Well, there are a number of cases in which Git version control comes in handy and even comes to your rescue:</p><ol><li>You are working on your project alone, but your computer ended up crashing and now all your code is GONE (big oof). Command Z ain’t working, and chanting Hail Mary’s won’t either. <br>If you were using Git, then your code would be completely safe, on Github where you can just go and download or clone the latest and up to date code on there within a matter of seconds!</li><li>You are working in a group and your project is getting too big for you to keep on just zipping it up and emailing it to your teammates upon every damn change you make just so they have updated code when they start coding their part. <br>If you had Git, then all you would need to do is commit and push your code and your teammates would get notified that there is a code update and they would just need to pull your code in one command and boom, now everybody has updated project code!</li><li>You are working in a group and y’all spent a week fixing all the bugs in your code and one confused teammate ended up making an error and pushing that same buggy code again, and now everyone has buggy code! Oh no, not again! Command Z can only do so much and now’s not the time to pull all your hair out and take another week to fix your code…</li></ol><p>If you were using Git, you could just revert back to a previous version of your code and boom, it’s like that buggy code never happened!</p><p>And the list goes on…but you get the point, I’m sure! Having version control is super helpful in keeping track of all your code, bugs resolved, features completed, etc. Through version control you have the ability to view not only your latest saved code, but code you and your team had saved hours, days, months, and years ago!</p><p>Before we dive into setting up version control, let me explain some common terms and commands used in version control so you understand what everything means!</p><ul><li><strong>Repo</strong>, short for <strong>Repository</strong>: it’s a storage space where you project or code resides in, it’s like a folder for your code! There are two types of repos, local and remote.</li><li><strong>Local Repo</strong>: it is going to be on the machine (laptop or computer) where your code is stored at. Locally storing it means only you have access to the code and if your computer crashes or you lose that code, then it would be pretty hard to get it back.</li><li><strong>Remote Repo</strong>: it is going to be hosted on a website, like Github, for example, and your code here is accessible to not just you, but your whole team! If you lose your code on your computer, your code is still safe on here! This is akin to iCloud storage.</li><li><strong>Committing </strong>code: saving code locally on your computer, to your local repo.</li><li><strong>Pushing</strong> code: saving your committed code onto some hosted platform like Github, to your remote repo.</li><li><strong>Pulling</strong> code: downloading updated code from your remote repo to your local repo (machine).</li><li><strong>Branch</strong>: it’s a like folder inside your repo, where you can organize what features are in which folder. Say, you and your teammate are working on an app together and you are working on feature 1 and they are working on feature 2. You can just have two different branches, feature1 and feature2 to keep your code more organized and prevent bugs!</li><li><strong>Merge</strong>: when you use multiple branches, sometimes you want to combine the code in both branches, that is called a merge.</li></ul><p>So now that you are familiar with the key terminology related to Git, without further ado, let’s discuss how to set git version control for your project, both via terminal and through Xcode!</p><p><strong>** You can use Git version control in the terminal or through Xcode, I will show you how to use it via both methods, you can choose which one you like!</strong></p><h3>Git version control set up via terminal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*BDzFbHuiWRIBpBHNcQvXoQ.png" /></figure><ul><li><strong>Step 0</strong>: Create an Xcode project. (either a new project or you can even work with an old project that doesn’t have version control yet!)</li><li><strong>Step 1</strong>: go to <a href="http://www.github.com/">github.com</a> and sign in and create a new repository.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Av6xlqhWN_PWA0ku" /></figure><p>and then, add a unique name for your new repo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4pTnyywpgeu9Gv9F" /></figure><ul><li><strong>Step 2</strong>: Go to your project folder in your terminal.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giZnspVHOgVNQZQbo28A_A.gif" /></figure><ul><li><strong>Step 3</strong>: on your new repository on Github, you should see a screen as shown the image below which will have a bunch of commands for you to run in your terminal in order to connect that remote repo to your local repo.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AbB6sRHZXhw4CJOu" /></figure><p>Make sure you have selected HTTPS and run the commands I highlighted, in your project directory in the terminal like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s1UF1VSTa5J-ctjX" /></figure><p>Now, when you go back to Github, and refresh the page, you should see an initial commit on there! Each commit is a labelled copy of your current code! It represents what has changed since the last version of your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jkxNeVwLJkaa2LAi" /></figure><p>Done! That’s it, your project is now connected to your remote Github repository.</p><h3>Git version control set up from within Xcode</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*qQ7HREuPwO-iXKDjLAsK5Q.png" /></figure><p>The difference via Xcode is that you don’t need to go to Github and manually create a new repo, Xcode will create a new repo for you automatically!</p><ul><li>Step 0: Create an Xcode project (either a new project or you can even work with an old project that doesn’t have version control yet!)</li><li>Step 1: click on the source control navigator to connect to a repo.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5QHmewaZ37sdSSMi" /></figure><ul><li>Step 2: click on the settings at the bottom and add a new repo and follow the steps in the screenshots below!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*RZiH_Vez5wkUOQSGH2I4LQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/0*DKb2JaSwFox1wI7S" /></figure><p>If it’s saying authentication failed, then you can always add a different account. This is most likely to happen now since Github just enforced 2-factor authentication and you would need to save the token you generate on Github as your credential to log in here.</p><p><a href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token">how to create a Github access token</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/0*RYyViAUNU1oW5FoM" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/0*Fx2vz1S41C2y2q2Z" /></figure><p>paste the access token you generated here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/0*IZRGhnmgycvXZaae" /></figure><p>And you’re <strong>done</strong>! Now, in order to view your repo, you can just click on settings again and view your repo on Github!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3PM-d8uQ5zyQGqFU" /></figure><p>and here is what it your remote repo looks like on Github!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ut9TJi-sskKfwwyz" /></figure><h3>How to Commit, Push, and Pull code in Xcode</h3><p>aight so now you have your repo all set up! Let’s see how to actually use version control in Xcode.</p><ul><li><strong>Step 1</strong>: commit edited code. **never pull anything unless you have already committed (saved) your code</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eBefIJqOHpsXIDFe" /></figure><p>You can either just locally commit to keep track of your changes and save your work locally or commit and push to the remote repo so that your teammates can download your version of the code!</p><p>so, commit locally :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BtchAQ1okozZ8V91" /></figure><p>or, commit and push your changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y-I1CfyYQbMZGjXw" /></figure><p>In order to pull your teammate’s code, just go back to the source control tab on the navigation bar and then click pull (make sure you have committed your local changes first, else they will be overwritten!!)</p><p>That’s it! May the Gods of version control be with you :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aabeae21f17e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-sd-coders/using-git-version-control-with-terminal-and-xcode-aabeae21f17e">Using Git version control with Terminal and Xcode</a> was originally published in <a href="https://medium.com/the-sd-coders">The SDCoders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>