<?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 Bhumita Panara on Medium]]></title>
        <description><![CDATA[Stories by Bhumita Panara on Medium]]></description>
        <link>https://medium.com/@bhumitapanara?source=rss-51699c6802ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*I75v35yBj-ZhGrZORMfOkQ.jpeg</url>
            <title>Stories by Bhumita Panara on Medium</title>
            <link>https://medium.com/@bhumitapanara?source=rss-51699c6802ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 03:54:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhumitapanara/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[WWDC 2024 : Exploring iOS & iPadOS 18]]></title>
            <link>https://medium.com/simform-engineering/wwdc-2024-exploring-ios-ipados-18-81565622c3ac?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/81565622c3ac</guid>
            <category><![CDATA[wwdc-2024]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple-intelligence]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[ios18]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Wed, 12 Jun 2024 08:33:27 GMT</pubDate>
            <atom:updated>2024-06-12T08:33:27.752Z</atom:updated>
            <content:encoded><![CDATA[<h3>WWDC 2024 : Exploring iOS &amp; iPadOS 18</h3><h4>Dive into the Cutting-Edge Features of iOS &amp; iPadOS 18 Revealed at WWDC 2024</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*J-pR5WONwJqKwZMKKEOOJw.gif" /><figcaption>Experience the groundbreaking features of iOS 18 and iPadOS 18 unveiled at WWDC 2024.</figcaption></figure><h3><strong>Introducing iOS 18</strong></h3><p>At WWDC 2024, Apple introduced the latest updated iOS version for iPhone and iPad devices, which offers great customization and a sense of privacy.</p><p>To achieve this, the control center, widgets, and live activities have been updated. Furthermore, with <strong>Apple Intelligence, you can bring personal intelligence into your apps to deliver new capabilities</strong>—all with great performance and built-in privacy.</p><blockquote>Announcements on iOS 18 have remarkable updates on built-in apps such as Controls, HomeScreen, Wallet and Apple Pay, Messages, Map, Mail, and Photos. Privacy concerns are effectively managed alongside the release of new functionalities.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pl0aKATACovGZF1hCWrSSQ.jpeg" /><figcaption>iOS 18 brings new ways to customize the iPhone, additional ways to stay connected in Messages, the biggest-ever redesign on the Photos app, and so much more.</figcaption></figure><p>We will explore the app&#39;s features and updates, gaining wonderful insights into what’s excitingly new. So, let’s get started!</p><h3><strong>Controls</strong></h3><p>Control Centre in iOS 18 offers new levels of customization and capability, helping you access many of the things you do every day even faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgTYKJs25M46j_jwnoI3rA.jpeg" /><figcaption>Control Center has been redesigned to provide easier access to many things users do daily.</figcaption></figure><ul><li>It isn’t limited to just the controls we see; we can now swipe to multiple new groups of controls, like for media playback. Multiple controls can be visible with a single continuous swipe. In addition, from iOS 18,<strong> a developer can include custom controls from their app using the new Controls API</strong>.</li><li>These new controls are also available from the lock screen, which means swap a camera and flashlight can be replaced by different controls, making it more adoptable.</li><li>In addition to that, you can also involved these new controls using action buttons on iPhone 15. Now, it’s faster and easier for people to complete frequent tasks from your apps with new controls in the Control Center and on the Lock Screen.</li><li>App icons and widgets can now appear in Light, Dark, or with a Tint, regardless of how the app icon is rendered.</li></ul><blockquote>Furthermore, developers can offer an intuitive way to pair your accessories that keeps your devices private and makes pairing seamless.</blockquote><h3><strong><em>Messages</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIijFpZnlUFlnDDL5ua5XQ.jpeg" /><figcaption>Tap Backs in Messages</figcaption></figure><ul><li>The Native Messages app is now more powerful, as iOS 18 has brought some engaging features, such as tap-backs that<strong> are redesigned and expanded to include any emoji or sticker</strong>.</li><li>Users can now <strong>easily schedule the message to be sent later and prompt suggestions </strong>to reply in a conversation, and more ways to express the tone using formatting options such as bold, italic, and so on.</li><li>Messages via satellite to connect with people even on off-grid.</li></ul><h3><strong><em>Mail</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPj4OH5K910EpirKxVSSFw.jpeg" /><figcaption>Mail introduces new ways to manage an inbox with categorization, including Primary, Transactions, Updates, and Promotions.</figcaption></figure><ul><li>Users can manage incoming emails with on-device categorization. In addition to the primary category, emails are organized into new categories, such as transactions, newsletters, and promotions.</li><li>The new digest view pulls together all the relevant emails received from a specific user, making it easier to track the conversation.</li></ul><h3><strong><em>Map</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Au8rAT_sosjOW_blak_yLQ.jpeg" /><figcaption>Discover new topographic maps with detailed trail networks.</figcaption></figure><blockquote><strong>Maps deliver new topographic maps with detailed trail networks. Users can explore thousands of hikes in national parks across the United States and effortlessly create custom walking routes, all accessible offline.</strong></blockquote><h3><strong><em>Wallet</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOs1sOwdbjE7l_w0cKmCRQ.jpeg" /><figcaption><strong>Apple Pay Tap to Cash</strong></figcaption></figure><blockquote>In iOS 18, enhancement to the wallet app by introducing the <strong>Tap to Cash</strong> feature, users can send and receive Apple Cash by simply holding two iPhone devices together.</blockquote><h3><strong><em>Photos</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dOcrxx0ME4MEITWp__0xug.jpeg" /><figcaption>A simplified, single view displays helpful new collections.</figcaption></figure><ul><li>The look and feel of the photos app have been redesigned to include interesting and handy features such as a categorized collection, which users can find in the photos faster than before using keywords.</li><li>Customization of the look and feel has been added to the Photos app, allowing users to arrange photos categorized by a specific person, favorite album, and more, giving it a personal touch.</li></ul><blockquote>Supported Devices: The newly launched iOS 18 is compatible with devices ranging from the iPhone SE to the latest models.</blockquote><h3><strong>Glimpse on iPadOS 18</strong></h3><figure><img alt="iPadOS 18 takes iPad to the next level with new ways to customise iPad and the introduction of Calculator with Math Notes." src="https://cdn-images-1.medium.com/max/1024/1*9wemktfttmfor3i3_sqgSA.jpeg" /><figcaption>iPadOS 18 takes the iPad to the next level with new ways to customize it and introduces a Calculator with Math Notes.</figcaption></figure><blockquote>iPadOS 18 has a big update to native apps such as Notes, Shareplay, and Freeform including iOS features such as personalizing your home screen, customized control center, and photos app.</blockquote><ul><li>Beginning with enhancements to user experience, there’s now a floating tab bar that simplifies navigation, alongside a feature allowing users to add tabs based on their frequent usage.</li><li><strong>The calculator app</strong> is now introduced to iPadOS 18, bringing <strong>mathematical capability</strong> with advanced features like <strong>Math Notes</strong>, The <strong>calculator app can now understand handwritten math problems </strong>and solve them on tap, isn’t it amazing!!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MyZIDDRuRxEaPWpyxqyttA.gif" /><figcaption>The Calculator app delivers an entirely new way to use Apple Pencil to solve expressions.</figcaption></figure><ul><li>In addition to the excellent existing handwriting features, such as the capability to select and copy text and even straighten it, Apple is introducing <strong>Smart Script</strong>.</li><li>This feature enhances the appearance of your writing as you jot it down. With functions like <strong>spell check, the ability to copy and paste content into handwritten notes, and the option to erase by simply scratching it</strong> <strong>out</strong>, Smart Script ensures a smooth note-taking experience.</li></ul><p>iPadOS 18 will be available this fall as a free software update for the following devices:</p><p>— iPad Pro (M4)</p><p>— iPad Pro 12.9-inch (3rd generation and later)</p><p>— iPad Pro 11-inch (1st generation and later)</p><p>— iPad Air (M2)</p><p>— iPad Air (3rd generation and later)</p><p>— iPad (7th generation and later)</p><p>— iPad mini (5th generation and later)</p><p><strong>Conclusion:</strong></p><p><strong>In conclusion, iOS 18 offers enhanced customization and personalized experiences for users.</strong></p><p>Meanwhile, the updates in iPadOS elevate the<strong> unique iPad experience, featuring significant app improvements that enhance navigation and responsiveness.</strong></p><blockquote><strong>For more updates on the latest tools and technologies, follow the </strong><a href="https://medium.com/simform-engineering"><strong>Simform Engineering Blog</strong></a><strong>.</strong></blockquote><blockquote><strong>Follow us: </strong><a href="https://twitter.com/simform"><strong>Twitter</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/simform/"><strong>LinkedIn</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81565622c3ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/wwdc-2024-exploring-ios-ipados-18-81565622c3ac">WWDC 2024 : Exploring iOS &amp; iPadOS 18</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blocking numbers in your Custom app with CallKit Extension]]></title>
            <link>https://medium.com/@bhumitapanara/blocking-numbers-in-your-custom-app-with-callkit-extension-c822e84f3f2e?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/c822e84f3f2e</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[callkit]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Mon, 19 Feb 2024 03:17:32 GMT</pubDate>
            <atom:updated>2024-02-19T03:17:32.819Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone! As a developer, we often encounter multiple requirements or features that enhance the natively provided feature. Native Frameworks like HealthKit, Callkit, SiriKit, ARKit, SceneKit, AVKit, and many more, all can be adopted in your application. For instance, if we wish to enable users to send commands and perform actions using Siri, we can utilize the native SiriKit framework. This is one use case example whereas there are multiple kits/frameworks available natively. In the context of this blog post, we will explore and will be discussing the Callkit framework for covering the specific feature of blocking a number from your custom app.</p><p>Before diving into the code, let’s get along with what CallKit can be used for?</p><p>Basically, Callkit Framework provides the calling interface. We can bring the native UI of incoming and outgoing calls in our application. When your application contains Voip services, one can use CallKit interface to handle back-end communication. Along with handling the calls and back-end communication in Voip, call directory extension is used to achieve features like providing/customising caller ID information, displaying the block list and blocking a number from your custom app.</p><p>To delve into the depth and scope of the framework, please refer to the Apple developer document: <a href="https://developer.apple.com/documentation/callkit">https://developer.apple.com/documentation/callkit</a></p><p>Although Callkit has a wider scope but will try to achieve one single feature to have basic idea on how we can utilize native framework. Without further ado, let’s get started.</p><p>I have demonstrated the implication using simple UI, having</p><ul><li>A UITextfield to enter the number.</li><li>A UIButton to perform block functionality.</li><li>A UITableView to show list of the blocked contact.</li></ul><p><strong>1] Add CallDirectory Extension to the target:</strong></p><p>In order to extend native Phone app feature, adding CallDirectory Extension is the first and mandatory step.</p><blockquote>To add the extension, in Xcode click on the current project -&gt; ‘+’ sign on Bottom left Pane which eventually will navigate to an application extension popup. Look for Call Directory Extension and click Next.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gbgnme7tgXcaAXdXv84sIw.png" /></figure><p>[<strong>Tip</strong>: When dealing with extensions like NotificationService or Call Directory extension, signing certificate needs to be generated and managed separately. Always check on signing tab to assure on bundle identifiers and provisioning profiles.]</p><p>On completing step 1, a CallDirectoryHandler file is generated, which includes predefined functions such as</p><p>— addAllBlockingPhoneNumbers<br> — addOrRemoveIncrementalBlockingPhoneNumbers<br> — addAllIdentificationPhoneNumbers</p><p>Also, it has a requestFailed function which extends the <strong><em>CXCallDirectoryExtensionContextDelegate</em></strong> delegate. This function can be used to track error occurred while performing native function.</p><p><strong>2] Interaction between Containers:</strong></p><p>The native function to block or to add identification to a phone number is already present in a CallDirectoryHandler file, now the important question is how to interact with this function from our project or say how can we send/bring user inputs to these functions! The answer to this is using AppGroup. It’s a feature that allows an app and its app extensions, to share a common group of data in their sandboxed file systems.</p><blockquote>AppGroup can be added to the project from capability tab. I.e “Signing &amp; Capabilities” -&gt; “+ Capability”.</blockquote><p>[Note: When choosing the name for the AppGroup — Reverse Domain Name Notation is an ideal approach. For example — if my project bundle identifier is com.company.blocknumber, then my AppGroup name would be group.com.company.blocknumber]</p><p><strong>3] Setting up the common functions to be used across:</strong></p><p>Coming back to the point of setting up the basic UI, now the idea is to store and update the block list using UserDefault. The flow would be when a user enters a number and, after performing the required validation, updates the block list using the below code. Also, let’s make a function to get a list of blocked contacts.</p><pre>    func updateBlockedContactsList(contacts: [String]) {<br>        let defaults = UserDefaults(suiteName: &quot;group.com.BlockNumberDemo&quot;)<br>        defaults?.removeObject(forKey: &quot;blockList&quot;)<br>        defaults?.set(contacts, forKey: &quot;blockList&quot;)<br>        defaults?.synchronize()<br>    }<br>    <br>    func getBlockedContacts() -&gt; [String] {<br>        let defaults = UserDefaults(suiteName: &quot;group.com.BlockNumberDemo&quot;)<br>        let blockedContacts = defaults?.value(forKey: &quot;blockList&quot;) ?? []<br>        return blockedContacts as! [String]<br>    }</pre><p><strong>4] Adding commands in the CallDirectory Handler file:</strong></p><p>Let’s set the code to command the native function “addAllBlockingPhoneNumbers”, which is already present there with a good example of its use case. As the blocked list is already been maintained and updated through UserDefault, add a function to fetch the block list in the same way we had done in step 3. [Refer to code below for clarity.]</p><p><em>CallDirectoryHandler file:</em></p><pre> func addAllBlockingPhoneNumbers(to context: CXCallDirectoryExtensionContext) {<br>      if !self.getBlockedContacts().isEmpty{<br>            let numbers = self.getBlockedContacts()<br>            for phoneNumber in numbers {<br>               let phInt = Int64(phoneNumber as String)<br>               context.addBlockingEntry(withNextSequentialPhoneNumber: phInt!)<br>            }<br>      }<br> }<br><br>func getBlockedContacts() -&gt; [String] {<br>    let defaults = UserDefaults(suiteName: &quot;group.com.BlockNumberDemo&quot;)<br>    let blockedContacts = defaults?.value(forKey: &quot;blockList&quot;)<br>    return blockedContacts as! [String]<br>}</pre><p>Seems like everything got its place and is just ready to hit the run button, but wait!! We had added a call directory Extension — good, set up Appgroup so that the container can share content — better!! But did we trigger the extension after updating the block contact list?</p><p>Yes, to trigger active method we need to add just a line code as given:</p><pre>CXCallDirectoryManager.sharedInstance.reloadExtension(withIdentifier: &quot;com.test.BlockNumberDemo.BlockNumberDirectory&quot;, completionHandler: nil)</pre><p>One last thing to note: as we have added the CallKit extension to our project, Apple’s security requires us to obtain the user’s permission for it to function.</p><blockquote>Essentially, when you run the project, simply navigate to the Settings app, then the Phone app, find “Identifying Block Numbers,” and enable the extension.</blockquote><p>There you go, hit a run button and explore it practically.</p><p>Check out the GitHub <a href="https://github.com/bhumi018/CallKitNumberBlockingDemo">REPO</a> for the sample project.</p><p>Happy Coding!</p><p>Thank you so much for reading. I hope you have a better idea about this topic and you had as much fun reading this as I did writing it. For further questions and queries reach out at <a href="/service/mailto:bhumitapanara@gmail.com">bhumitapanara@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c822e84f3f2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BLE(Bluetooth Low Energy) with iOS Swift]]></title>
            <link>https://medium.com/@bhumitapanara/ble-bluetooth-low-energy-with-ios-swift-7ef0de0dff78?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ef0de0dff78</guid>
            <category><![CDATA[bluetooth-low-energy]]></category>
            <category><![CDATA[corebluetooth]]></category>
            <category><![CDATA[ble]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 02:53:39 GMT</pubDate>
            <atom:updated>2023-08-09T02:53:39.011Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4MsDHRq6XH4IGnl5" /><figcaption>Photo by <a href="https://unsplash.com/@moritz_photography?utm_source=medium&amp;utm_medium=referral">Moritz Kindler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hello everyone! In this post, we will explore BLE technology and its applications with Swift Language, as well as grasp some fundamental BLE ideas.</p><p>Bluetooth was introduced back in 1999 whereas BLE I.e. Bluetooth Low Energy came into the picture later on, core differentiation between both is: 1] Power consumption and 2] Range. Observing all of the surrounding devices that don’t need more range and can cope with less power for them BLE is a suitable technology. It has covered multiple sectors such as Medical, Fitness, Sensors, and Sports applications occupy the major portion.</p><p>Working with the BLE technology for the iOS applications has been possible due to the native library CoreBluetooth, using which we can connect to a BLE device to read and write data.</p><p>Before starting on the iOS native methods let’s go through some of the basic terminology:</p><p><strong>Peripheral</strong>: Devices that deliver the information demanded by the central. For example heart rate monitor.</p><p><strong>Central</strong>: Devices that seek information from nearby peripherals.</p><p>Considering the iOS mobile application which connects to a BLE device, in this case, the BLE device will act as a peripheral and the app as central.</p><p><strong>Services</strong>: Every device has multiple pieces of information which are categorized as services. For example Device information services. These are discovered by central on successful connection with the peripheral.</p><p><strong>Characteristics</strong>: Data is stored and transferred as Characteristics listed under multiple services and are defined on BLE devices. Characteristics can be categorised as 1] Notify 2] Indicate.</p><p><strong>Notify</strong>: — Peripheral advertises data packets/information in a specific time interval, for notifying types of characteristics central device need not ask/acknowledge the server I.e. peripheral. Peripheral does not guarantee the delivery of information to the client.</p><p><strong>Indicate</strong>: — For Indicate types characteristics central device need to acknowledge the peripheral I.e. by sending commands to the server/peripheral. Peripheral guarantees the delivery of the information to the client.</p><p>Firstly make sure you have a working BLE device that you need to connect and exchange information with. [BLE device which can send advertising data.]</p><p>Well, it’s a vast area with multiple requirements, and also device configuration plays a vital role so here will focus on the main native methods to work with. We will be connecting to a specific peripheral and after a successful connection with the central, we will work on services and characteristics.</p><p>In the given demo, the basic flow is to fetch the device name and read the battery of the connected peripheral.</p><h4><strong>1] Primary Setup:</strong></h4><p>Set up the basic UI for the project and before moving towards the Bluetooth native methods set the NSBluetoothAlwaysUsageDescription key in info.plist and set the info message for asking for Bluetooth permission from the user dialog.</p><pre> &lt;key&gt;NSBluetoothAlwaysUsageDescription&lt;/key&gt;<br> &lt;string&gt;App needs bluetooth access to connect to nearby devices.&lt;/string&gt;<br> &lt;key&gt;UIApplicationSceneManifest&lt;/key&gt;</pre><h4><strong>2] Scan for peripherals:</strong></h4><p>In order to work with Bluetooth import the CoreBluetooth library, and inherit — CBCentralManagerDelegate, and CBPeripheralDelegate to your main view controller. Declare a variable of type CBCentralManager and initialize it in the viewDidLoad method. Now, add the scan code for the peripheral as shown below. [Note: Before scan check for the power state to be on for central.]</p><pre>import CoreBluetooth<br>class MainVC: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate{<br>    <br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        <br>        centralManager = CBCentralManager(delegate: self, queue: nil)<br>    }<br>}<br><br>func centralManagerDidUpdateState(_ central: CBCentralManager) {<br>    if central.state == .poweredOn{<br>        central.scanForPeripherals(withServices:nil)<br>    }<br>}</pre><h4><strong>3] Discover Peripherals:</strong></h4><p>There is a mere possibility that you will get multiple peripherals while scanning, connecting/filtering to specific peripheral can be done in two ways:</p><p>(i) By looking for predefined prefix in peripheral name:</p><pre>//MARK: - METHOD_1 FOR FILTERING THE PERIPHERALS<br>if let name = peripheral.name{<br>    if name.hasPrefix(&quot;CJ&quot;){<br>        self.centralManager.stopScan()<br>        self.centralManager.connect(peripheral, options: nil)<br>        self.peripheral = peripheral<br>        if let deviceName = self.peripheral?.name{<br>            lblDeviceName.text = &quot;Device Name : \(deviceName)&quot;<br>        }<br>        print(&quot;EXPECTED_PERIPHERALS - \(self.peripheral!)&quot;)<br>    }<br>}</pre><p>(ii) By comparing the uuid of peripheral:</p><pre>//MARK: - METHOD_2 FOR FILTERING THE PERIPHERALS<br>if peripheral.identifier == UUIDdevice{<br>    self.centralManager.stopScan()<br>    self.centralManager.connect(peripheral, options: nil)<br>    self.peripheral = peripheral<br>    if let deviceName = self.peripheral?.name{<br>        lblDeviceName.text = &quot;Device Name : \(deviceName)&quot;<br>    }<br>    print(&quot;EXPECTED_PERIPHERALS = \(self.peripheral!)&quot;)<br>}</pre><p>Code for DidDiscover method using 2nd method of filtering the peripherals:</p><pre>func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {<br>    guard peripheral.name != nil else { return }<br>    if peripheral.identifier == UUIDdevice{<br>        self.centralManager.stopScan()<br>        self.centralManager.connect(peripheral, options: nil)<br>        self.peripheral = peripheral<br>        if let deviceName = self.peripheral?.name{<br>            lblDeviceName.text = &quot;Device Name : \(deviceName)&quot;<br>        }<br>        print(&quot;EXPECTED_PERIPHERALS = \(self.peripheral!)&quot;)<br>    }<br>}</pre><h4><strong>4] DidConnect method:</strong></h4><p>After a successful connection with the peripheral, we need to discover the services related to discovered peripherals.</p><pre>func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {<br>    self.peripheral?.discoverServices(nil) //can provide array of specific services<br>    self.peripheral?.delegate = self<br>}</pre><h4><strong>5] Discover peripheral services:</strong></h4><p>Each peripheral could have one or more than one service and each service could have one or more than one characteristic. In the didDiscoverServices native method we will be able to discover multiple services and then for each service will set a code to discover respective characteristics.</p><pre>func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {<br>    if let services = peripheral.services{<br>        for service in services{<br>            peripheral.discoverCharacteristics(nil, for: service)<br>        }<br>    }<br>}</pre><h4>6] Discover characteristics related to specified service:</h4><p>After the successful discovery of services, we can now move toward discovering characteristics. In order to read data of characteristics we have to set notify true for it. In our demo, we are reading battery characteristics.</p><pre>var characteristicData: [CBCharacteristic] = []<br>let BATTERY_LEVEL_CHARACTERISTIC = CBUUID(string: &quot;2B18&quot;)<br><br>func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {<br>    for charac in service.characteristics!{<br>        <br>        characteristicData.append(charac)<br>        if charac.uuid == BATTERY_LEVEL_CHARACTERISTIC{<br>            peripheral.setNotifyValue(true, for: charac)<br>            peripheral.readValue(for: charac)<br>        }<br>    }<br>}</pre><h4>7] Reading the values:</h4><p>Information by peripheral would be sent in the form of data packets [unit: Byte], so each bit or byte represents the value we want. For example, a data packet of 1 Byte sent by a peripheral/server is having a battery at 0 Index, firmware version at 1 index, and so on. As we have already set notify true for interested characteristics, now we will get data in the didUpdateValueFor method. [Prerequisite: you need to know how each data is configured on the firmware side to understand the operation you need to perform on received data.]</p><pre>func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) {<br>    <br>    guard let data = characteristic.value else {<br>        return<br>    }<br>    <br>    if characteristic.uuid == BATTERY_LEVEL_CHARACTERISTIC{<br>        batteryLevelValue = Int(data[0]) //we are getting battery information at index 0, this would vary based on how firmware is configured to sent data on specific index.<br>    }<br>}</pre><p>This method is crucial for fetching data sent by peripherals.</p><h4>8] Send command to peripheral:</h4><p>For Indicate the type of characteristics, you need to acknowledge the peripheral for the data.</p><pre>let charUuid = CBUUID(string: &quot;2B19&quot;)<br>let char = peripheral.services?.compactMap({ $0.characteristics }).flatMap({ $0 }).first(where: { $0.uuid == charUuid })<br>peripheral.writeValue(data, for: char!, type: .withoutResponse)</pre><p>Whole Code:</p><pre>import UIKit<br>import CoreBluetooth<br><br>class MainVC: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate {<br>    <br>    //MARK: - OUTLETS<br>    @IBOutlet weak var lblDeviceName: UILabel!<br>    @IBOutlet weak var lblBatteryLevel: UILabel!<br>    <br>    <br>    //MARK: - GLOBAL VARIABLES<br>    var centralManager = CBCentralManager()<br>    var peripheral: CBPeripheral?<br>    let UUIDdevice = UUID(uuidString:&quot;A6DCBC6F-0021-6BO9-10C1-BDA4S6CV8N68&quot;)<br>    var characteristicData: [CBCharacteristic] = []<br>    var batteryLevelValue = 0<br>    let BATTERY_LEVEL_CHARACTERISTIC = CBUUID(string: &quot;2B18&quot;)<br>    <br>    <br>    //MARK: - UI VIEW CONTROLLER LIFE CYCLES<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        <br>        centralManager = CBCentralManager(delegate: self, queue: nil)<br>    }<br>    <br>    //MARK: - DELEGATE METHODS<br>    func centralManagerDidUpdateState(_ central: CBCentralManager) {<br>        if central.state == .poweredOn{<br>            central.scanForPeripherals(withServices:nil)<br>        }<br>    }<br>    <br>    func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {<br>        guard peripheral.name != nil else { return }<br>        <br>        //MARK: - METHOD_2 FOR FILTERING THE PERIPHERALS<br>        if peripheral.identifier == UUIDdevice{<br>            self.centralManager.stopScan()<br>            self.centralManager.connect(peripheral, options: nil)<br>            self.peripheral = peripheral<br>            if let deviceName = self.peripheral?.name{<br>                lblDeviceName.text = &quot;Device Name : \(deviceName)&quot;<br>            }<br>            print(&quot;EXPECTED_PERIPHERALS = \(self.peripheral!)&quot;)<br>        }<br>    }<br>    <br>    func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {<br>        self.peripheral?.discoverServices(nil) //can provide array of specific services<br>        self.peripheral?.delegate = self<br>    }<br>    <br>    func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {<br>        if let services = peripheral.services{<br>            for service in services{<br>                peripheral.discoverCharacteristics(nil, for: service)<br>            }<br>        }<br>    }<br>    <br>    func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {<br>        for charac in service.characteristics!{<br>            <br>            characteristicData.append(charac)<br>            if charac.uuid == BATTERY_LEVEL_CHARACTERISTIC{<br>                peripheral.setNotifyValue(true, for: charac)<br>                peripheral.readValue(for: charac)<br>            }<br>        }<br>    }<br>    <br>    func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) {<br>        <br>        guard let data = characteristic.value else {<br>            return<br>        }<br>        <br>        if characteristic.uuid == BATTERY_LEVEL_CHARACTERISTIC{<br>            batteryLevelValue = Int(data[0]) //we are getting battery information at index 0, this would vary based on how firmware is configured to sent data on specific index.<br>        }<br>    }<br>    <br>    func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {<br>        if let peripheral = peripheral as CBPeripheral?{<br>            peripheral.delegate = nil<br>            centralManager.cancelPeripheralConnection(peripheral)<br>        }<br>    }<br>    <br>    //MARK: - ACTIONS<br>    @IBAction func onClickBtnBatteryLevel(_ sender: UIButton) {<br>        lblBatteryLevel.isHidden = !lblBatteryLevel.isHidden<br>        lblBatteryLevel.text = &quot;Battery Level : \(batteryLevelValue)&quot;<br>    }<br>    <br>    @IBAction func onClickMoreCharac(_ sender: UIButton) {<br>        let main = UIStoryboard.init(name: &quot;Main&quot;, bundle: nil)<br>        let vc = main.instantiateViewController(withIdentifier: &quot;DetailVC&quot;) as! DetailVC<br>        vc.characteristicData = characteristicData<br>        self.present(vc, animated: true)<br>    }<br>    <br>}</pre><p><strong><em>Some Tips:</em></strong></p><blockquote>While discovering the peripheral for the first time, feasible filtering ways are: (1) Specific predefined advertisement data sent by the peripheral before connecting with it. (2) Compare to uuid mentioned in advertisement data (3) Try filtering through prefixes in peripheral names.</blockquote><blockquote>Advertisement data can be read from the didDiscover peripheral native method.</blockquote><blockquote>BLE packet size is 23 bytes, the maximum could be 512 bytes, so do understand in what format data is sent at each byte.</blockquote><blockquote>centralManagerDidUpdateState method can be used for tracking the Bluetooth state. i.e. to perform some actions based on Bluetooth state, properties could be observed by checking the state of central.</blockquote><p>Check out the GitHub <a href="https://github.com/bhumi018/ble_ios">REPO</a> for the sample project. I have attached screenshots of the demo performed on the actual device.</p><p>Happy Coding!</p><p>Thank you so much for reading. I hope you have a better idea about this topic and you had as much fun reading this as I did writing it. For further questions and queries reach out at <a href="/service/mailto:bhumitapanara@gmail.com">bhumitapanara@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ef0de0dff78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infinite scroll using UICollectionView and UIPageControl]]></title>
            <link>https://medium.com/@bhumitapanara/infinite-scroll-using-uicollectionview-and-uipagecontrol-b043b3bf6561?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/b043b3bf6561</guid>
            <category><![CDATA[collectionview]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 08:20:13 GMT</pubDate>
            <atom:updated>2023-07-06T08:20:13.647Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Eil-1CmB869c_6py" /><figcaption>Photo by <a href="https://unsplash.com/@timmossholder?utm_source=medium&amp;utm_medium=referral">Tim Mossholder</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hello readers, mostly all of us might have worked on carousel view demos or actual use cases in our career journey. Well, we have come across requirements like an image carousel view, a dynamic collection view for an image gallery, and working with animations for an automatic scroll carousel view. Today we are going to explore something similar to the above scenarios, we will be developing a demo app that will generate a simple image carousel view with infinite scroll/loop alike using UICollectionView and UIPageControl. Will keep it simple, so let’s dive in.</p><p>Let’s do it with some code and explanation.</p><p>Firstly create a simple collection view of images.</p><pre>import UIKit<br>import Foundation<br><br>class MainVC: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource{<br><br> //MARK: - OUTLETS<br>    @IBOutlet weak var colVw: UICollectionView!<br><br>//MARK: - GLOBAL VARIABLES<br>    var imageArray = [&quot;place_canada&quot;,&quot;place_costa_rica&quot;,&quot;place_germany&quot;,&quot;place_greece&quot;,&quot;place_india&quot;] //add your sample images<br><br>//MARK: - DELEGATE METHODS<br>    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {<br>        return imageArray.count<br>    }<br>    <br>    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {<br>        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: &quot;cell&quot;, for: indexPath) as! DetailCollectionViewCell<br>        cell.imgView.image = UIImage(named: imageArray[indexPath.row])<br>        return cell<br>    }<br>}</pre><p>Run the above code you will observe the cell size of the image to be a bit uneven, before moving further let’s fix that.</p><pre>func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {<br>        CGSize(width: UIScreen.main.bounds.width, height: 250)<br>    }</pre><p>The delegate method will set the CGSize of a cell but we have to make some changes to the storyboard. Select your collection view and open the size inspector from the right pane and change the estimated size of the collection view to none. Now re-run the code. We have to fix the uneven cells. Hi-Fi</p><p>Moving further, add UIPageControl to the storyboard by giving appropriate constraints and bind it to a swift file. For page number and page control setup we will code to scroll view delegate methods: scrollViewDidEndDecelerating and scrollViewDidEndDragging respectively.</p><pre>//MARK: - GLOBAL VARIABLES<br>    var frame = CGFloat(0)<br>    <br>//MARK: - UI VIEW CONTROLLER LIFE CYCLES<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        pageControl.numberOfPages = imageArray.count<br>    }<br><br>func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {<br>        let pageNumber = scrollView.contentOffset.x/scrollView.frame.size.width<br>        pageControl.currentPage = Int(pageNumber)<br>        if pageControl.currentPage == 1{<br>            frame = pageNumber<br>        }<br>    }<br>    <br>func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {<br>        if pageControl.currentPage == imageArray.count - 1{<br>            pageControl.currentPage = 0<br>            colVw.contentOffset = CGPoint(x: 0, y: 0)<br>        }<br>    }</pre><p>The whole code should look like this:</p><pre>import UIKit<br>import Foundation<br><br>class MainVC: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UIScrollViewDelegate{<br><br>    //MARK: - OUTLETS<br>    @IBOutlet weak var colVw: UICollectionView!<br>    @IBOutlet weak var pageControl: UIPageControl!<br>    <br>    //MARK: - GLOBAL VARIABLES<br>    var imageArray = [&quot;place_canada&quot;,&quot;place_costa_rica&quot;,&quot;place_germany&quot;,&quot;place_greece&quot;,&quot;place_india&quot;]<br>    var frame = CGFloat(0)<br>    <br>    //MARK: - UI VIEW CONTROLLER LIFE CYCLES<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        pageControl.numberOfPages = imageArray.count<br>    }<br><br>    //MARK: - DELEGATE METHODS<br>    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {<br>        return imageArray.count<br>    }<br>    <br>    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {<br>        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: &quot;cell&quot;, for: indexPath) as! DetailCollectionViewCell<br>        cell.imgView.image = UIImage(named: imageArray[indexPath.row])<br>        return cell<br>    }<br>    <br>    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {<br>        CGSize(width: UIScreen.main.bounds.width, height: 250)<br>    }<br>    <br>    func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {<br>        let pageNumber = scrollView.contentOffset.x/scrollView.frame.size.width<br>        pageControl.currentPage = Int(pageNumber)<br>        if pageControl.currentPage == 1{<br>            frame = pageNumber<br>        }<br>    }<br>    <br>    func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {<br>        if pageControl.currentPage == imageArray.count - 1{<br>            pageControl.currentPage = 0<br>            colVw.contentOffset = CGPoint(x: 0, y: 0)<br>        }<br>    }<br>}</pre><p>That’s it, give your demo a final run.</p><p>Considering there are multiple code requirements and manipulation that can be done using collection view, over here we have tried to achieve one.</p><p>Check out the GitHub <a href="https://github.com/bhumi018/InfiniteScrollCollectionView">Repo</a> for the sample project. Happy Coding!</p><p>Thank you so much for reading. I hope you have a better idea about this topic and you had as much fun reading this as I did writing it. For further questions and queries reach out at <a href="/service/mailto:bhumitapanara@gmail.com">bhumitapanara@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b043b3bf6561" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google I/O 2023]]></title>
            <link>https://medium.com/@bhumitapanara/google-i-o-2023-87bb029f7dce?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/87bb029f7dce</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[google-io-2023]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Fri, 19 May 2023 03:37:26 GMT</pubDate>
            <atom:updated>2023-05-19T03:37:26.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDU9wFddA-fSO34avq3biQ.jpeg" /><figcaption>io.goggle</figcaption></figure><p><strong>Google I/O</strong> an annual developer conference was held by Google in Shoreline Amphitheater in Mountain View, California on May 10, 2023. As one of the most influential tech gatherings worldwide, Google I/O never fails to captivate audiences with its exciting lineup of keynote presentations, immersive experiences, and hands-on demonstrations. Announcements made at the event were quite exciting and innovative. The theme for the whole event revolves around Making AI useful for everyone. The event announced what wonders the new generative AI can do in the upcoming time. In this blog, I’ll be briefing you about the features and upcoming technologies engineered by Google announced at the event. Without further ado, let’s begin!</p><h4><strong>Make AI Helpful for Everyone:</strong></h4><p>Google would be working on emphasizing more and more areas where AI could be helpful in the near future. Currently, it has announced what wonders the generative AI can do with Google services such as google workspace and google cloud. It focuses on making the existing application deliver more powerful features by adding AI features to it.</p><p><strong>=&gt; Add-ons to existing features:</strong></p><p><strong>— Gmail</strong></p><p>The introduction of AI to Gmail comes first in 2017 when automated short and smart responses were introduced proceeded by suggesting best-suited sentences as you type. Taking it to the next level google is introducing the “Help me Write” feature which would be rolling with other workspace applications too. Basically, it can generate the response based on input Information provided and then can be used as best suited reply to be sent. For example, if you want the reply asking for a refund on a canceled flight then the AI will fetch flight details from the mail and would generate a fair response based on that.</p><p><strong>— Google Maps</strong></p><p>Last year google came up with an immersive Google map that uses AI to create a high-fidelity representation of a place, so you experience it before you visit. In addition to that Google come up with an Immersive view of Routes, along with traffic details, weather details, air quality, and much more.</p><p><strong>— Google Photo</strong></p><p>It was introduced at Google I/O 2015, focussing on the Magic eraser feature, uses AI-powered computational properties to remove unwanted distractions, and now with the help of semantic understanding and generative AI, introduces Image Editor that will help adjust/complete the image with the help of AI.</p><p>Justifying or talking broadly about the concept of Making AI helpful and how Sundar Pichai discusses the visionary four ways to achieve it,</p><p>1] By improving knowledge and learning along with deepening the understanding of the world.</p><p>2] By boosting creativity and productivity so that everyone can express and achieve more efficient output.</p><p>3] Enabling developers and businesses to build their own transformative products and services.</p><p>4] Building and Developing AI responsibly so that everyone can benefit equally.</p><p><strong>— paLM:</strong></p><p>A powerful Language model was introduced last year. paLM-2 will power Google’s updated Bard chat tool. It also announces paLM-2 along with domain-specific models such as</p><p>1] <strong><em>Sec-paLM</em>:</strong> security domain-specific, detect malicious script, and help security expert to understand and resolve threats.</p><p>2] <strong><em>Med — paLM</em>:</strong> It works on synthesizing information from medical imaging like plain firm and mammogram, interprets images, and can communicate the results.</p><p>paLM-2 is highly computational and will support 100+ languages. It also now features improved support for writing and debugging code, which would help developers working around the world.</p><p>Talking about Google’s ongoing project Gemini(which is still in training), was created from the ground up to be a multi-modal, highly efficient ai tool and Api Integrations, and built to enable future innovations, like memory and planning. Keeping the Responsible AI in the center, Sundar Pichai mentioned two important concepts of watermarking and metadata in upcoming innovation.</p><p><strong>— Adapting Bard AI functionality to multiple platforms.</strong></p><p>Talking about the implications of Bard AI in a variety of areas will give a boost to existing features. Google announces Bard can now collaborate on code generation, debugging, explain the code in multiple coding languages. Moreover, responses from Bard could be exported to Docs or Gmail. Taking it one step ahead Bard can help to make sheets based on clarifying the context and again users will be able to export it to Google Sheets. Basically, Bard + tools will be exciting to work with in the upcoming time.</p><p>In the upcoming days, Bard will be talking in 40 languages, and currently Japanese and Korean languages are introduced. Adobe Firefly in collaboration with Adobe will help users to generate images from scratch taking text descriptions as input.</p><p><strong>=&gt; Duet AI for workspace:</strong></p><p>The true potential of AI as a collaborator, introducing AI collaborations with google workspace, AI’s Help Me Write will bring magic to workspace applications such as docs, sheets, and slides.</p><p><strong>=&gt; Generative AI Search:</strong></p><p>Google introduced more precise AI search result that will allow the audience to search complex question that includes multiple requirements to be justified, in response AI generated answer will give brief along with related services such as shopping apps, price comparison, weather data, and much more. In addition to this specific answer, it allows the audience to ask follow-up questions, retaining already entered information along with suggested next steps.</p><p><strong>=&gt; Duet AI for Google Cloud:</strong></p><p>Vertex AI combines data engineering, data science, and ML engineering workflows, enabling your teams to collaborate using a common toolset, in upcoming times it will collaborate with character.ai, salesforce, GitLab, Accenture, Jasper, and many others. It will be developed in three models:-</p><p><em>(1) </em><strong><em>Imagen </em></strong>— which powers image generation, editing, and customization from text inputs.</p><p>(2) <strong><em>Codey </em></strong>— Code completion and generation.</p><p>(3) <strong><em>Chirp </em></strong>— universal speech model which brings speech-to-text accuracy for over 300 languages.</p><p>A3 Virtual machines based on Nvidia’s h100 GPUs will provide the widest choice to compute options for leading AI companies. Also. Google is working on reinforcement learning from human feedback on vertex AI.</p><p><strong>=&gt; Project Tailwind:</strong></p><p>Google announces that developers are working on a model that after studying or analyzing the content will help in creating a private AI model from a piece of information and would be able to do wonders such as pull out questions from the given information along with comparing/getting opinions about some facts. Seems quite Interesting and Creative!</p><p><strong>=&gt; Bold and Responsible AI:</strong></p><p>Mentioning how crucial it is to make AI responsible. Google is working on multiple ways that can maintain/bring authenticity to the data generated by AI. Google will introduce an image evaluating feature that will provide the various source of images along with information such as where is the image first appeared, or used, fact-checking, and social sites.</p><p>Generative image capability in the upcoming time will ensure that every one of the AI-generated images has metadata and markup in the original file to give context more authenticity. In addition, the creator/publisher can even add similar metadata while uploading.</p><p><strong>— Universal Translator:</strong></p><p>It is next generation translator which with the help of generative AI will make the dubbing more accurate and more specific to the language chosen. Next-generation translators would be available to authorized partners so that can avoid misuse of software.</p><p><strong>— Automated Adversarial testing:</strong></p><p>To bring generative AI with responsible behavior, google is working on vigorous testing and safety measures under automated adversarial testing. LLM(Large Language Models) are being used to avoid bad/inappropriate output through AI models.</p><p><strong>=&gt; What’s new with Android OS:</strong></p><p>A factor that people love about Android is customization. Google has worked to bring wonders to the customization arena by bringing generative AI to it.</p><p><strong>— Magic Compose:</strong></p><p>It will make conversations expressive, fun, and playful, by suggesting message responses in various modes (playful, professional, funny).</p><p><strong>— Bringing Emoji to wallpaper:</strong></p><p>A new feature to create wallpaper playing around with chosen emojis and themes.</p><p><strong>— Generative AI wallpaper:</strong></p><p>Mentioning the type, things, or location in the form of text will render you an originally AI-generated Image to set as wallpaper. That’s indeed a unique one!!</p><p>Google will be launching What’s App + Wear OS: (Bringing certain whats app features to Wear OS in upcoming times.)</p><p><strong>=&gt; Find my Device feature for Android OS:</strong></p><p>It finds connected/added devices to phones would be possible with this new feature. Not only devices but tracker tags can also help to track anything. Prioritizing the security features your device will show unknown tracker alerts (if an unrecognized tracker is moving with you and help to locate it) and it will work across all smartphones.</p><p><strong>=&gt; What’s in Device Launch:</strong></p><p>A new member in the A series — Pixel 7a and for the first time, Google launched pixel tablets and foldable phones in the market with all upcoming generative AI features.</p><p>Overall the event gives upcoming AI wonders by Google. Along with Generative AI, there are updates for Firebase which would level up its use cases for the developers. Generative AI is bringing lots of innovation and tech in upcoming times making the outputs and content more and more rich, specific, and creative on its own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87bb029f7dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Local Notifications in Swift]]></title>
            <link>https://medium.com/@bhumitapanara/local-notifications-in-swift-e7f93eff691e?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7f93eff691e</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[local-notificationswift]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Tue, 16 May 2023 09:59:33 GMT</pubDate>
            <atom:updated>2023-05-16T09:59:33.471Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-yEbXtA8NotCRKWx" /><figcaption>Photo by <a href="https://unsplash.com/@jonasleupe?utm_source=medium&amp;utm_medium=referral">Jonas Leupe</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Notifications are crucial where user engagement is important. Comparing the application with and without notification would have a huge difference in user engagement. Mastering the notification by understanding its implication can help you take your even simple application to new rises. Notifications in iOS are of two kinds:</p><p>1] Rich/Custom/Remote/Push Notification 2] Local Notification</p><p>In this blog, I’ll try to cover the <strong>basics of Local Notification</strong>, they are used for use cases such as setting reminders, notifying users in a specific interval, or say when you are dealing with alarms and timer kind of application. It is quite easy to add and customize local notifications based on the project requirement, so let’s begin…</p><p>Create one project with a simple UI say a button that reads send notification, set up the button outlet, and action into your swift file. Also, <em>Import UserNotifications</em> in order to work with notification native methods. Great now we are good to start with the code part.</p><p><strong>1] Ask for User permission:</strong></p><p>Create a center global variable of type <em>UNUserNotificationCenter.current()</em>, request to allow notification through the native <em>requestAuthorization</em> method which comes with a completion handler to handle the user input. Make sure to alert your users in a case where the user denies allowing notification.</p><pre>// Step - 1: Ask for permission<br> let center = UNUserNotificationCenter.current()<br> center.requestAuthorization(options: [.alert, .sound]) { grantedPermission, error in<br>            <br>            <br>            //Step - 2: Handle if user denies<br>            if !grantedPermission{<br>                DispatchQueue.main.async {<br>                    // UI update through label<br>                }<br>            }else{<br>                self.sendNotification()<br>                DispatchQueue.main.async {<br>                    // UI update through label<br>                }<br>            }<br>        }</pre><p>Considering the case where the user has allowed for notification, let’s move further</p><p><strong>2] Create the Notification Content:</strong></p><p>Set up a variable content of type <em>UNMutableNotificationContent()</em>, it allows you to set properties such as the title and body of the notification, go ahead and play with whatever you want to set.</p><pre>  //Step - 3: Create the Notification Content<br>  let content = UNMutableNotificationContent()<br>  content.title = &quot;Hello, there!&quot;<br>  content.body = &quot;Working with local notifications&quot;</pre><p>Now, In order to trigger our notification we can try different ways as per requirement, for example over here let’s trigger the notification after a time interval of say 15 seconds. For this, you need to set the required date and date component variables and then assign them to <em>UNCalendarNotificationTrigger</em>.</p><pre> //Step - 4: Notification Trigger<br> let date = Date().addingTimeInterval(15)<br> let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute,.second], from: date)<br> let triggerData = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)</pre><p>Note: — you can also schedule the trigger as per a specific weekday and time, just by setting the date components such as weekday, hour, and minute.</p><p><strong>3] Requesting with given data:</strong></p><p>For requests use the <em>UNNotificationRequest</em> method with argument parameters — <em>identifier</em>, <em>content</em>, and <em>trigger</em>. Provide the function with content and trigger data set before.</p><pre>// Step - 5: Requesting with given data<br>let uuidString = UUID().uuidString // when working with simulator<br>let uuidString = UIDevice.current.identifierForVendor!.uuidString // while testing on device<br>let req = UNNotificationRequest(identifier: uuidString, content: content, trigger: triggerData)</pre><p><strong>4] Register the request:</strong></p><p>Finally, with the above detail, we would register the request:</p><pre> //Step - 6: Register the request<br> center.add(req) { error in<br>     if error != nil{<br>          // UI update if any (as in to notify the user about the failure.)<br>     }<br> }</pre><p>Checkout the whole code it should look like this:</p><pre> let center = UNUserNotificationCenter.current()<br> func getAccessRequest(){<br>        // Step - 1: Ask for permission<br>        center.requestAuthorization(options: [.alert, .sound]) { grantedPermission, error in<br>            <br>            <br>            //Step - 2: Handle if user denies<br>            if !grantedPermission{<br>                DispatchQueue.main.async {<br>                    // UI update through label<br>                }<br>            }else{<br>                self.sendNotification()<br>                DispatchQueue.main.async {<br>                   // UI update through label<br>                }<br>            }<br>        }<br>    }<br>    <br>    func sendNotification(){<br>        <br>        //Step - 3: Create the Notification Content<br>        let content = UNMutableNotificationContent()<br>        content.title = &quot;Hello, there!&quot;<br>        content.body = &quot;Working with local notifications&quot;<br>        <br>        //Step - 4: Notification Trigger<br>        let date = Date().addingTimeInterval(15)<br>        let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute,.second], from: date)<br>        let triggerData = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)<br>        <br>        // Step - 5: Requesting with given data<br>        let uuidString = UUID().uuidString<br>        let req = UNNotificationRequest(identifier: uuidString, content: content, trigger: triggerData)<br>        <br>        //Step - 6: Register the request<br>        center.add(req) { error in<br>            if error != nil{<br>                // UI update if any (as in to notify the user about the failure.)<br>            }<br>        }<br>    }</pre><p>After completing the setup, go to your button action and call <em>getAccessRequest().</em></p><p>That’s it, wasn’t it simple and easy to work with?</p><p>Check out the GitHub <a href="https://github.com/bhumi018/localNotificationSwift">Repo</a> for the sample project. Happy Coding!</p><p>Thank you so much for reading. I hope you have a better idea about this topic and you had as much fun reading this as I did writing it. For further questions and queries reach out at <a href="/service/mailto:bhumitapanara@gmail.com">bhumitapanara@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7f93eff691e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FOCUS- A Smart Weapon To Beat Time.]]></title>
            <link>https://medium.com/@bhumitapanara/focus-a-smart-weapon-to-beat-time-eaf9018f54fb?source=rss-51699c6802ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaf9018f54fb</guid>
            <category><![CDATA[motivational]]></category>
            <dc:creator><![CDATA[Bhumita Panara]]></dc:creator>
            <pubDate>Mon, 08 May 2023 03:00:45 GMT</pubDate>
            <atom:updated>2023-05-08T03:00:45.906Z</atom:updated>
            <content:encoded><![CDATA[<p>“Yipeee!!! Mom, I completed my homework in just 2 hours!!” shouted a small kid with a joyful expression, when I stepped into my neighbor’s home in the evening. The small kid was happy and at a time astonished both, the reason for his blended emotions was that he was happy that in a quite short time, he completed his work but astound to note that the same homework took him 5 hours yesterday!! This makes him ask his mother: Why so Mom?? Mom, listening to his son’s question smiled and said “My son you were watching tv while doing your homework yesterday, weren’t you?” Now this statement raises many questions in my mind such as boy is doing work with other activities aren’t we doing the same with our life? Aren’t we diverting our minds during work!!</p><p>This whole incident took me to flashback, the first day of my job. When in the very first slot of the morning I was assigned with certain work. It took me four hours to complete a single section whereas, in the second slot, it took me just an hour to complete one section having the same difficulty level, Isn’t that surprising enough?? Isn’t it peculiar enough to notice that we all do have 24 hours a day then why does our performance differs each day though we dedicate the same work hour?? It’s us responsible for our work then how the output could vary, right? The answer to all such circumstances is one fine word “FOCUS”.</p><p>FOCUS- this is indeed one of the quotidian though powerful words that everyone knows. If not then quotes, motivational speech, etc reminds us of this word. But as we all know true wisdom lies in adopting the knowledge into our lives rather than just knowing about it. One of the German author Eckhart Tolle has said the sayings -</p><p><strong><em>“ ​ Realize deeply that the present moment is all you ever have. Make the Now the primary focus of your life ​ ”- Eckhart Tolle.</em></strong></p><p>We all in some way or the other do focus on things about which we are passionate enough and not only do we reach our goals but in the diminutive time ever!! But achieving our goals and being master at it in diminutive time occurs rarely that is only when we are dealing with our passions, not regularly. One of the best outcomes of having a good focus on whatever work we do is smart usage of rapidly moving time. Specifically to stand strong in this highly developing corporate world.</p><p>To focus on work is quite understandable but how could that matter to term time? Focus and time are inversely proportional to each other,i.e. More the focus, less the time required. You may question how? Let’s have a look at how to focus and how it impacts.</p><p><strong><em>*Explanation through science theory: </em></strong>We all had a strong belief in science principles right? So do you remember one of the conclusions that the principle of pressure carries out — when pressure is applied to a single point on a surface area is more effective than applied to the whole surface area because applied to the whole surface area pressure gets divided the same is with a focus in our life if we are focused on more thing at a time then our attention and capability get divided and output so obtained is diversified in all fields. For example, if you are supposed to work on three projects then working on 3 simultaneously and switching internally among them in a short period would mess up all three of them and may you won’t be able to submit any of them before the deadline. Whereas working on one for a specific time and full concentration and then switching, this is a smart switch among tasks that requires focus for flawless outcomes.</p><p><strong><em>*Giving 100% at each point:</em></strong> It’s not all time you are allocated to your passionate work but sometimes you are responsible for doing that work that you dislike/hated such as me loving to do maths won’t let me escape from doing science homework. In such a case as per Eckhart Tolle, <em>make the now the primary focus of your life</em>. Running away from work should not be an option for work but doing it better by applying all your focus and giving your 100% would be much worth it in your own eyes. Especially when it’s compulsion you must check out your working capacity.</p><p><strong><em>*Time is Money:</em></strong> Saving time from our daily routines has been a great task in this highly emerging technology world. Where we are damn busy with our jobs, duties, and responsibilities. We all have noticed the work that has been accomplished with our full attention and focus would take quite less time and the work done along with distractions and less attention would take an abundant amount of time. It often happens such as trying to read one definition when your mind is wandering here and there and reading it when nothing goes in your mind, you would find it difficult to understand with a wandering mind. Of course, working with full focus saves lots of our time that can be utilized in other work that we often like to do, or rather completing work on time would help out in a good and pride taking a break. And also you would feel more like a responsible person.</p><p><strong><em>*Benchmarks for Encouragement:</em></strong> To measure the amount of focus you are applying to your work, just simply set benchmarks. Benchmarks not only keep us active but also motivate us to achieve them. When I am allocated to ​disapprobation work I usually set benchmarks and divide my work to set of levels and on completion of each level would appreciate my performance seems to be self-appraising but this works as fuel to reach to goal.</p><p>While reading any of the articles other than getting acknowledge to certain new concepts or sayings we all are often more curious for getting an answer to the question WHY? Why should we follow these theories? So here are certain reasons that could satisfy the so-called WHY? of the readers out there.</p><p><strong><em>=&gt; </em>How long would you work on something that you don’t like/one that annoys you?</strong></p><p>Well, in this case, if you ask me how much time I would give to it then I would obviously answer that dude, I’ll complete it as soon as I can. Why would I spend more time doing the thing I don’t like? I guess we all think in the same way but we come across thoughts like when would I complete? I am getting bored now, Let’s peep here and there to get fresh, Let’s take a break as the work given is not to my taste, or rather sometimes we decide to do it just for the sake of doing it(with no efficiency output). Rather than struggling with lots of questions we could have developed an approach towards work as I am responsible for this work and I would give my best irrespective of the area it belongs to. It’s that simple and adding a flavor of <strong>FOCUS</strong> while doing work would complete it in a short period ever letting you feel satisfied with your work rather than searching for ways to escape from the work. In addition, the focus is a kind of flavor that reduces human effort while doing work. One should add such flavor to make the dish more tastier.</p><p><strong><em>CONCLUSION:</em> </strong>Rapidly moving time is more precious than any other thing. Surviving is just like moving with time, not after time. If you are running late would put you down in many ways in your life. You can imagine the impact of running late in the highly scheduled meetings throughout the day could badly impact the business to a great extent. The invention of machines in this era has the great benefit of saving human effort and time for doing any work. We adopt machines in day-to-day life so that we can save time and can apply them in other workspaces to multiply productivity. Basically, our focus relies much on how our precious time could be saved. Same way applying focus to our work is the key to saving an abundant amount of time. Also, a person capable of putting all his genuine effort into the area of allocated work is truly a responsible person. If working with the focus can reduce time then that ultimately we are primarily benefited from it, not society. Do it for self-concern too. If changes could improve our performance and save time for us then I think such changes are inevitable. So yeah, Focus is truly a smart weapon to beat time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf9018f54fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>