<?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 Keshu | RaiTechLabs.com on Medium]]></title>
        <description><![CDATA[Stories by Keshu | RaiTechLabs.com on Medium]]></description>
        <link>https://medium.com/@keshurai?source=rss-9c8b6e436883------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_BZEwK9bzmt5LRxSbsEEzQ.jpeg</url>
            <title>Stories by Keshu | RaiTechLabs.com on Medium</title>
            <link>https://medium.com/@keshurai?source=rss-9c8b6e436883------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:12:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keshurai/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[Send Email In Swift 5.5 using MFMailComposeViewController]]></title>
            <link>https://medium.com/@keshurai/send-email-in-swift-5-5-using-mfmailcomposeviewcontroller-bcd0f57b218b?source=rss-9c8b6e436883------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcd0f57b218b</guid>
            <category><![CDATA[mail]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[viewconroller]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Keshu | RaiTechLabs.com]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 06:12:18 GMT</pubDate>
            <atom:updated>2022-06-24T19:30:55.839Z</atom:updated>
            <content:encoded><![CDATA[<p>There might be a time when you have to ask the user to send an email directly to you or other users. Like recently while developing the CryptoWatch App, I wanted a way to let users report any bugs they find in the app and send it directly to me. For that, I searched and found the functionality to send email in swift using MFMailComposeViewController.</p><p>Using <a href="https://developer.apple.com/documentation/messageui/mfmailcomposeviewcontroller">MFMailComposeViewController</a> class, you can integrate send email in swift. <a href="https://developer.apple.com/documentation/messageui/mfmailcomposeviewcontroller">MFMailComposeViewController</a> class lets you assign the Recipient&#39;s Email Address, Add People in CC, Add People in BCC, set the subject and body of the email and many other features.</p><p>If you are also interested in integrating push notifications in your app, you might wanna read this: <a href="https://iosarchitect.com/show-push-notifications-when-app-running-in-foreground-ios-swift/">How To Integrate Push Notifications In Swift</a></p><blockquote><em>The mail will be sent only once the user has tapped the send email button. You can not send mail directly, user action is required.</em></blockquote><p>Now let’s see how it can be implemented through code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/791b84f0794a86c8e755387164705b4e/href">https://medium.com/media/791b84f0794a86c8e755387164705b4e/href</a></iframe><ol><li>We start by importing MessageUI for using MFMailComposeViewController.</li><li>Create a sendEmail() function and check if user can send email or not. If it fails, handle the case in else statement. You should show an alert message to the user in this case to inform if about the alternate way to reach out.</li><li>Create an object of the MFMailComposeViewController and set the delegate of the controller to self. You need mailComposeDelegate to access didFinishWith method to know that user has completed sending email and now you need to dismiss the mail controller. It does not dismisses itself automatically when the mail is sent, you will need to do it through the delegate method as we have done above.</li><li>Set the receipient’s email address, cc, bcc, subject and message body. You dont need to set all these values, only use the ones you need.</li><li>Once all set, present the controller.</li></ol><blockquote><em>NOTE: </em><em>MFMailComposeViewController does not work in simulator. Use a real device to test it.</em></blockquote><p>Now once you have implemented the send email functionality, this is how it should appear in your app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/0*Vxwy4_4haPiKA6cF.jpeg" /></figure><p>I hope you understood how to implement send email in swift using MFMailComposeViewController. If you have any queries, feel free to ask in the comments.</p><p>If you like the article and want to read more on iOS and Swift, Please Follow.</p><p><em>Originally published at </em><a href="https://iosarchitect.com/send-email-in-swift-5-5-using-mfmailcomposeviewcontroller/"><em>https://iosarchitect.com</em></a><em> on October 6, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcd0f57b218b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Show Push Notifications when app running in the foreground iOS Swift]]></title>
            <link>https://medium.com/@keshurai/show-push-notifications-when-app-running-in-the-foreground-ios-swift-b33359faff6f?source=rss-9c8b6e436883------2</link>
            <guid isPermaLink="false">https://medium.com/p/b33359faff6f</guid>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[push-notification]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Keshu | RaiTechLabs.com]]></dc:creator>
            <pubDate>Mon, 30 Dec 2019 19:56:54 GMT</pubDate>
            <atom:updated>2022-06-24T19:37:17.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IBa0fvkJzjK5t3h_.jpeg" /></figure><p>Push notifications are a nice way to inform your users about the offers, user-specific updates or any message that you want to broadcast to all users.</p><p>If your app is running, it can be in two states. Either in the background or in the foreground.</p><p>Push notifications work well when the app is in the background and you can see the notification banner presented with a sound(if provided) on your iPhone/iPad. But what about when the app is in the foreground?</p><p>Apple does not show up push notifications by default when your app is in the foreground state. So what to do? You have to write some code to deal with the situation of your app receiving a notification while it is in the foreground.</p><blockquote><strong><em>If you receive local or remote notifications while your app is running in the foreground, you’re responsible for passing the information to your users in an app-specific way.</em></strong></blockquote><p>Apple guidelines are clear. You are responsible for handling the push notifications in the foreground state. So how to achieve this? Don’t worry, it’s pretty easy. Below are the steps.</p><h3>Steps to show Push Notifications in the foreground</h3><p><strong>Step 1 :</strong> Add delegate UNUserNotificationCenterDelegate in AppDelegate class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/67b144b3eb6b99bade490ff52f2774b7/href">https://medium.com/media/67b144b3eb6b99bade490ff52f2774b7/href</a></iframe><p><strong>Step 2:</strong> Set the UNUserNotificationCenter delegate in didFinishLaunchingWithOptions</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8160a6d6d96c4f940f0bb83769df7cca/href">https://medium.com/media/8160a6d6d96c4f940f0bb83769df7cca/href</a></iframe><p><strong>Step 3:</strong> This step will allow your app to show Push Notification even when your app is in the foreground</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/18c43107656ae90ca7dab10742b86be7/href">https://medium.com/media/18c43107656ae90ca7dab10742b86be7/href</a></iframe><p><strong>Step 4:</strong> If you want to perform an action with the click of a push notification, you can do it using the below method</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70110a417f8595a26aea84b408d9da71/href">https://medium.com/media/70110a417f8595a26aea84b408d9da71/href</a></iframe><p>Well, that was it! You have successfully configured push notifications to receive them in the foreground state too.</p><p>It was EASY, right? Do let me know in the comments.</p><p>Also, If you want to read more about iOS and Swift Programming, please do follow.</p><p>Namaste!</p><p><em>Originally published at </em><a href="https://iosarchitect.com/show-push-notifications-when-app-running-in-foreground-ios-swift/"><em>https://iosarchitect.com</em></a><em> on December 30, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b33359faff6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STEP BY STEP GUIDE TO INSTALL XCODE FOR IOS DEVELOPMENT]]></title>
            <link>https://medium.com/@keshurai/step-by-step-guide-to-install-xcode-for-ios-development-c70e49493c3d?source=rss-9c8b6e436883------2</link>
            <guid isPermaLink="false">https://medium.com/p/c70e49493c3d</guid>
            <category><![CDATA[learn-swift-programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[learn-ios-development]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Keshu | RaiTechLabs.com]]></dc:creator>
            <pubDate>Thu, 28 Sep 2017 21:34:33 GMT</pubDate>
            <atom:updated>2017-09-28T21:36:02.574Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*1tUQjH3ALfazllbC.png" /></figure><p>In this tutorial you will learn how to install Xcode in your MacBook.</p><p>Source : iosDevelopers.org -&gt; <a href="https://iosdevelopers.org/step-step-guide-install-xcode-ios-development/">Read Original Content here</a></p><h4>WHAT IS XCODE?</h4><p><strong>Xcode</strong> is an integrated development environment for macOS containing a suite of software development tools developed by Apple for developing software for macOS, iOS, watchOS and tvOS. This is the only software required for development for Apple applications. In this full iOS Development Course you will be using this software only. XCODE is your weapon from now. XCode not only supports Swift, but support other programming languages like C, C++, Objective-C, Objective-C++, Java, AppleScript, Python, Ruby, ResEdit and many others too.</p><h4>HOW MUCH DOES XCODE COST?</h4><p>As an Apple Developer you wont come to hear this word much but yes Xcode is <strong>FREE. </strong>So for now you can continue learning without spending a penny. But yes after learning the basics if you want to upload your app to appstore, you would need a developer account which would cost you $99. We will discuss about it later. For now, you can continue without it.</p><h4>HOW TO INSTALL XCODE?</h4><p>Here are the steps you need to follow to install Xcode in your MAC :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q9u3ZgFLa0Qp11Bq.png" /></figure><ol><li>Check your MAC version .Go to the Apple icon in the top left of your screen and Cick -&gt; About this MAC. You can now see your MAC version. Xcode 8 has a minimum system requirement of OS X 10.11.5 or above (El Capitan) or ideally you should be running macOS Sierra (10.12). If you are still running an earlier OS then you need to update your OS now.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*1WXUfbMeyDI48MtK.png" /></figure><p>2. Open Appstore on your MAC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FLUV2wiaxnuvrFae.png" /></figure><p>3. Search for XCODE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*J3M_DBrEkKJ6F6_G.png" /></figure><p>4. Click on the GET button below Xcode and wait for it to install. Approx size is around 4.8GB so it may take time if you are still using 2G (Not me of course)</p><p>5. After the installation is finished, click on the XCODE icon in applications and launch it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*47QI-aar8jCtNJaE.png" /></figure><p>6. Boom! You are ready to rock.</p><p>Now you have successfully installed Xcode on your MAC and all set for starting Swift. So lets move to the next chapter. See you there</p><p>NOTE: We discussed some basics of Swift in chapter 1. If you have missed that chapter then read it here : <a href="https://iosdevelopers.org/introduction-swift/">Click here for Chapter 1</a></p><p>If you like my tutorial and would like to learn iOS and Swift, visit my blog <a href="http://www.iosdevelopers.org/">www.iosdevelopers.org</a></p><p>For now, Namaste ! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c70e49493c3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>