<?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 Rohit Das on Medium]]></title>
        <description><![CDATA[Stories by Rohit Das on Medium]]></description>
        <link>https://medium.com/@rohitdas19?source=rss-b5a6be9fada3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8xNYBzgHmgnd0tqqh4QWWg.jpeg</url>
            <title>Stories by Rohit Das on Medium</title>
            <link>https://medium.com/@rohitdas19?source=rss-b5a6be9fada3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 03:16:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohitdas19/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[Error: Gradle task assembleDebug failed with exit code 1: Solved ✅]]></title>
            <link>https://rohitdas19.medium.com/error-gradle-task-assembledebug-failed-with-exit-code-1-solved-6e6201977ddc?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e6201977ddc</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Tue, 29 Apr 2025 20:08:30 GMT</pubDate>
            <atom:updated>2025-04-29T20:14:20.813Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>What went wrong:</li></ul><blockquote>A problem occurred configuring project ‘:app’. &gt; [CXX1101] NDK at /Users/rd/Library/Android/sdk/ndk/26.3.11579264 did not have a source.properties file * Try: &gt; Run with — stacktrace option to get the stack trace. &gt; Run with — info or — debug option to get more log output. &gt; Run with — scan to get full insights. &gt; Get more help at <a href="https://help.gradle.org./">https://help.gradle.org.</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*WXqmQaTQmrxk0kcNp-OhOA.png" /></figure><p>Have you faced this issue while setting up a Flutter project and while running Android simulators? This gradle build error stressed me out.</p><p>So let&#39;s directly solve the issue.</p><p>This Android build is failing because there is an issue with the NDK(Native Development Kit) installation in your Android SDK.</p><p>the error indicates that the NDK at the specified path (/Users/rd/Library/Android/sdk/ndk/26.3.11579264) is missing the source.properties file, which is essential for Gradle to recognize the NDK installation.</p><p>Since I am using VS Code(instead of Android Studio), I am using the terminal to fix the NDK issue.</p><p>These are a few steps:</p><blockquote>Install or Reinstall NDK via Command Line:</blockquote><p>You can install the correct NDK version using the sdkmanager tool from the Android SDK.</p><p>Check available NDK versions</p><pre>/Users/rd/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --list | grep &quot;ndk&quot;</pre><p>You will see different NDK versions,</p><blockquote>Install a stable NDK version(eg. 25.2.9519653),</blockquote><pre>/Users/rd/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager &quot;ndk;25.2.9519653&quot;</pre><p>Verify Installation</p><blockquote>Check if source.properties exists:</blockquote><pre>ls -la /Users/rd/Library/Android/sdk/ndk/25.2.9519653/source.properties</pre><p>if it exists, it will show a similar output (given below) ⬇️</p><blockquote>-rw-r — r — 1 rd staff 51 March 25 17:18 /Users/rd/Library/Android/sdk/ndk/25.2.9519653/source.properties</blockquote><p>If it is missing, the NDK is corrupted, so you must reinstall it.</p><p>Now, once a stable NDK version is properly installed. , let’s configure your Flutter project to use this NDK version and resolve the build error.</p><p>Open your Flutter project</p><blockquote>First, <strong>modify your </strong>android/app/build.gradle.kts to explicitly set the NDK version we know works (25.2.9519653):</blockquote><pre>android {<br>    namespace = &quot;com.example.my_app&quot;<br>    compileSdk = flutter.compileSdkVersion.toInt()<br>    ndkVersion = &quot;25.2.9519653&quot;  // Changed from flutter.ndkVersion to explicit version<br><br>    // ... rest of your existing configuration ...<br>}</pre><blockquote>Second, <strong>Update your </strong>android/local.properties to ensure it has the NDK path:</blockquote><pre>sdk.dir=/Users/rd/Library/Android/sdk<br>flutter.sdk=/Users/rd/flutter<br>flutter.buildMode=debug<br>flutter.versionName=1.0.0<br>flutter.versionCode=1<br>ndk.dir=/Users/rd/Library/Android/sdk/ndk/25.2.9519653</pre><blockquote>Third, <strong>Clean and rebuild</strong>:</blockquote><pre>flutter clean<br>cd android<br>./gradlew clean<br>flutter run</pre><p>And the issue is Resolved ✅,</p><p>If you still see issues: Here are 3 additional steps to troubleshoot:</p><p>1. Verify NDK installation:</p><pre>ls -la /Users/rd/Library/Android/sdk/ndk/25.2.9519653</pre><p>2. Check for multiple NDK versions:</p><pre>ls /Users/rd/Library/Android/sdk/ndk</pre><p>3. Consider removing problematic NDK versions:</p><pre>rm -rf /Users/rd/Library/Android/sdk/ndk/26.3.11579264</pre><p>That’s it. I hope you have successfully resolved this issue. If you face any problem related to it, you can let me know in the comments.</p><p>Thank you :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e6201977ddc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unblocking the Main Thread: A Guide to Asynchronous Image Handling in iOS]]></title>
            <link>https://rohitdas19.medium.com/unblocking-the-main-thread-a-guide-to-asynchronous-image-handling-in-ios-9164f27fae2d?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9164f27fae2d</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[async]]></category>
            <category><![CDATA[asynchronous]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 09:45:25 GMT</pubDate>
            <atom:updated>2024-08-17T09:45:25.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JDCTSAc61LWPJLPwh7Yyyw.jpeg" /></figure><p>Have you ever received this warning while image loading?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FNJnS7QVNstixfc8JMRxQ.png" /></figure><p>The warning is due to synchronous URL loading on the main thread, which can lead to UI unresponsiveness.</p><p>Lets deep dive,</p><pre>   func updateView(imageUrlString: String) {<br>            let imageData = try! NSData(contentsOf: .init(string: imageUrlString)!) as Data<br>            self.imageView.image = UIImage(data: imageData)<br>        }</pre><p>In this above code snippet, I am trying to fetch an image from an imageUrl synchronously (Synchronous Loading) using NSData(contentsOf:).</p><p>What does it really do?</p><p>This means the UI will wait until the data is completely loaded. If the network is slow or if there’s any delay in fetching the image, the UI will become unresponsive during this time.</p><p>Performing this synchronous operation on the main thread causes <strong>Main Thread Blocking.</strong></p><p>Since the fetching occurs on the main thread, any delay in loading the image, whether due to network slowness or large file size can result in the UI freezing, leading to a poor user experience.</p><p>What’s the solution then?</p><h4>Transition to Asynchronous Image Loading</h4><pre> func updateView(imageUrlString: String) {<br>        <br>        guard let url = URL(string: imageUrlString) else { return }<br>        <br>        // Load image data asynchronously<br>        DispatchQueue.global().async {<br>            if let imageData = try? Data(contentsOf: url), let image = UIImage(data: imageData) {<br>                DispatchQueue.main.async {<br>                    self.imageView.image = image<br>                }<br>            } else {<br>                // Optionally handle the case where the image could not be loaded<br>                DispatchQueue.main.async {<br>                    self.imageView.image = UIImage(systemName: &quot;exclamationmark.triangle&quot;) <br>                }<br>            }<br>        }<br>    }</pre><p>Now in the modified code above, the image data is fetched in the background thread using ‘<em>DispatchQueue.global().async‘.</em></p><p>This ensures that the UI remains responsive while the image is being downloaded.</p><p>Because the image loading happens on a background thread, the main thread (which handles UI updates) is not blocked, leading to a smoother user experience.</p><blockquote>The actual setting of the imageView.image is done on the main thread using DispatchQueue.main.async. This is crucial because all UI updates in iOS must be performed on the main thread.</blockquote><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9164f27fae2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding NFTs: Understanding the Evolution of Digital Ownership]]></title>
            <link>https://rohitdas19.medium.com/decoding-nfts-understanding-the-evolution-of-digital-ownership-7f38a38bf923?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f38a38bf923</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[ufc]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[celebrity]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 08:00:20 GMT</pubDate>
            <atom:updated>2023-09-13T09:06:13.662Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*GSpaDzr9OOMpzUytQaCJEw.png" /></figure><p>Have you seen this guy on social media? That evil laugh…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*-YHf_mqpxAtjlOqLJ4xm2w.png" /><figcaption>Hasbulla (mini khabib)</figcaption></figure><p>Allegedly, Hasbulla is said to have a weight of roughly 40 pounds, distributed across a frame that measures slightly over 3 feet in stature. His cherubic features contribute to his youthful appearance, creating the illusion that he is approximately five years old, due to Growth Hormone Deficiency.</p><p>On TikTok and Instagram, the youngster first gained an audience by posting videos of him pretending to fight actual children. He’s fond of cars and hence his car racing videos gained attention. In the process, he’s racked up hundreds of millions of views on various social media accounts. Oh, and he’s since challenged Conor McGregor to a fight.</p><p>He chills out with the former UFC lightweight champ Khabib Nurmagomedov, from which many people started calling him Mini Khabib.</p><blockquote>But why I am talking about this cute dude in a blog about Decoding NFTs, let see,</blockquote><p>As the Metaverse gains prominence, he undergoes a transformation, emerging as a new persona known as Crypto Hasbulla, with a mission to conquer this virtual realm.</p><p>Let&#39;s talk about the business model,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*NJ-c08hVhl4tGE1xgMlcfA.jpeg" /></figure><p><strong>Crypto Hasbulla’s</strong> journey kicked off in the heart of a Discord community. The initial concept revolved around testing the waters, with the goal of amassing <strong>20,000 members</strong> to gauge interest in launching a series of NFTs. This test phase was swiftly completed, and as a result, the NFTs were unleashed to resounding success, with Hasbulla successfully selling his digital artworks in this format.</p><p>The Crypto Hasbulla NFT is a collection of 10,000 unique NFTs created in January 2023. The NFT art is hand-drawn, a quality that makes them one-of-a-kind.</p><p>Enough talk about him, Now let&#39;s dive into NFTs,</p><p><strong>Understanding NFTs</strong></p><p>NFTs represent digital assets that signify ownership of a one-of-a-kind item or piece of content, typically recorded on a blockchain — a decentralized and secure digital ledger. Distinguishing them from cryptocurrencies like Bitcoin or Ethereum, NFTs are inherently non-fungible, meaning they cannot be exchanged on a one-to-one basis due to their unique and irreplaceable nature.</p><p><strong>How NFTs Work</strong></p><p>The creation of NFTs hinges upon smart contracts, self-executing agreements with the terms explicitly encoded within the contract’s code. These contracts serve to define the rules and intricacies surrounding the ownership of a digital asset, guaranteeing transparency and security. To mint an NFT, a digital item — whether it’s a piece of artwork, a musical composition, a video, or even a tweet — is subjected to tokenization through a unique identifier that is then recorded on the blockchain.</p><p><strong>Ownership and Provenance</strong></p><p>An inherent feature of NFTs is their unparalleled capacity to establish and authenticate ownership and provenance. Each NFT is accompanied by metadata that meticulously documents information about its creator, the date of creation, and the history of ownership transfers. This data is securely stored on the blockchain, rendering it immutable and easily accessible. This facet of NFTs proves to be advantageous for artists and content creators, ensuring they receive due royalties even when their work changes hands in the secondary market.</p><p><strong>Applications of NFTs</strong></p><p>1. Art and Collectibles: Artists sell their digital art and unique items like virtual real estate as NFTs. These can go for big bucks!</p><p>2. Music and Entertainment: Musicians and creators use NFTs for special music releases, concert tickets, and cool fan experiences.</p><p>3. Gaming: Gamers can now really own and trade in-game stuff using NFTs. This has even led to virtual worlds and economies.</p><p>4. Real Estate: Some real estate experts are trying out NFTs to make it easier to buy and sell property.</p><p>5. Sports and Memorabilia: Athletes are getting in on the NFT action by turning their famous moments into NFTs. Fans can own a piece of sports history!</p><p><strong>Concerns:</strong></p><p>Despite the exciting prospects NFTs offer, they bring along a series of pivotal challenges and concerns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z07hpAHMBCUoOEOSXK_bZA.png" /></figure><p>As early as July 2022, American Boxer / YouTuber <strong>Logan Paul </strong>confirmed that the price of NFT had fallen sharply, confirming that it was worth practically nothing.</p><p>According to international expert <strong>Wall Street Silver</strong>, the same NFT that <strong>Logan Paul </strong>bought for over $600,000 is now worth $10</p><p>Another Renowned figure in the list is <strong>Brazilian football sensation Neymar</strong> <strong>Jr.</strong>, who reportedly spent over $1 million (£900,000) on two NFTs from the Bored Apes Yacht Club, which is regarded as one of the most coveted non-fungible token collections, earlier this year.</p><p>Sadly, Neymar has paid a high price for belonging to this exclusive club. According to DappRadar, a website that tracks NFT values, his two apes, which he purchased in January for approximately $480,000 and $570,000, are now worth $153,000 and $171,000, respectively. The football player now faces potential paper losses of over $700,00.</p><p>The NFT market remains susceptible to price volatility and speculation, prompting concerns of a potential bubble.</p><p>As the NFT ecosystem continues to evolve in 2023, it is imperative to address challenges while facilitating sustainable growth.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f38a38bf923" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn how to build UI programmatically in iOS]]></title>
            <link>https://medium.com/swiftable/learn-how-to-build-ui-programmatically-in-ios-e8d8bb3564db?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8d8bb3564db</guid>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Tue, 05 Sep 2023 09:16:28 GMT</pubDate>
            <atom:updated>2023-09-05T09:18:40.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*wnCEYiU5Ym4UklO27RGqtw.png" /><figcaption>These are the screenshots of the UI that we will make</figcaption></figure><p>In this guide, you will learn how to design and implement a user profile screen programmatically using UIKit without using storyboards in Swift.</p><p>So we will be making the UI given above, so let&#39;s start:</p><blockquote>Note: As you can see the ProfileViewController has embedded in a tab bar controller, as it was a part of a project, so we are not going be discussing it.</blockquote><h4>Create the Class</h4><p>Define the ProfileViewController class, which should subclass UIViewController and conform to the necessary protocols (UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextFieldDelegate).</p><pre>class ProfileViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextFieldDelegate {</pre><h4>Declare Properties</h4><p>Declare the properties required for your UI, such as UI components like image views, text fields, and views.</p><pre>let imageView: UIImageView = {<br>        let imageView = UIImageView()<br>        imageView.translatesAutoresizingMaskIntoConstraints = false<br>        imageView.contentMode = .scaleAspectFill<br>        imageView.layer.cornerRadius = 75<br>        imageView.layer.borderWidth = 2.0<br>        imageView.layer.borderColor = UIColor.white.cgColor<br>        imageView.layer.masksToBounds = true<br>        imageView.isUserInteractionEnabled = true<br>        imageView.backgroundColor = .lightGray<br>        return imageView<br>    }()<br>    let headerView: UIView = {<br>        let view = UIView()<br>        view.translatesAutoresizingMaskIntoConstraints = false<br>        view.backgroundColor = .systemBlue<br>        return view<br>    }()<br>    <br>    let nameTextField: UITextField = {<br>        let textField = UITextField()<br>        textField.placeholder = &quot;Name&quot;<br>        textField.borderStyle = .roundedRect<br>        textField.backgroundColor = UIColor.white.withAlphaComponent(0.8) // Add transparency<br>        textField.textColor = UIColor.black<br>        textField.font = UIFont.boldSystemFont(ofSize: 16.0)<br>        textField.layer.cornerRadius = 8.0<br>        textField.layer.masksToBounds = true<br>        textField.setLeftPaddingPoints(8.0)<br>        textField.translatesAutoresizingMaskIntoConstraints = false<br>        return textField<br>    }()<br>    <br>    let addressTextField: UITextField = {<br>        let textField = UITextField()<br>        textField.placeholder = &quot;Address&quot;<br>        textField.borderStyle = .roundedRect<br>        textField.backgroundColor = UIColor.white.withAlphaComponent(0.8) // Add transparency<br>        textField.textColor = UIColor.black<br>        textField.font = UIFont.boldSystemFont(ofSize: 16.0)<br>        textField.layer.cornerRadius = 8.0<br>        textField.layer.masksToBounds = true<br>        textField.setLeftPaddingPoints(8.0)<br>        textField.translatesAutoresizingMaskIntoConstraints = false<br>        return textField<br>    }()<br>    <br>    let ageTextField: UITextField = {<br>        let textField = UITextField()<br>        textField.placeholder = &quot;Date of Birth&quot;<br>        textField.borderStyle = .roundedRect<br>        textField.backgroundColor = UIColor.white.withAlphaComponent(0.8) // Add transparency<br>        textField.textColor = UIColor.black<br>        textField.font = UIFont.boldSystemFont(ofSize: 16.0)<br>        textField.layer.cornerRadius = 8.0<br>        textField.layer.masksToBounds = true<br>        textField.setLeftPaddingPoints(8.0)<br>        textField.translatesAutoresizingMaskIntoConstraints = false<br>        return textField<br>    }()</pre><h4>Properties Declaration</h4><p>Declare the properties required for your UI, such as boolean flags for edit mode and tracking changes</p><pre> var isEditMode = false<br> var changesMade = false</pre><h4>Override viewDidLoad()</h4><p>In the viewDidLoad() method, configure the initial state of your view controller, including setting the background color, title, navigation bar attributes, and adding subviews.</p><pre> override func viewDidLoad() {<br>        super.viewDidLoad()<br>        <br>        title = &quot;User Profile&quot;<br>        // Configure the navigation bar title text color<br>           if let navigationController = self.navigationController {<br>               let textAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]<br>               navigationController.navigationBar.titleTextAttributes = textAttributes<br>           }<br>        <br>        let gradientLayer = CAGradientLayer()<br>            gradientLayer.frame = view.bounds<br>            gradientLayer.colors = [UIColor.skyBlue.cgColor, UIColor.white.cgColor] // Customize the gradient colors as needed<br>            gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.0) // Adjust the start point if needed<br>            gradientLayer.endPoint = CGPoint(x: 0.0, y: 1.0)   // Adjust the end point if needed<br>            view.layer.insertSublayer(gradientLayer, at: 0)<br>        setupViews()<br>        setupGestureRecognizer()<br>        setupTextFieldDelegates()<br>        loadProfileData()<br>    }</pre><h4>Setup Views</h4><p>Create a setupViews() method to add and configure the UI components, including setting constraints and initializing the edit button. Here you can see that I have created an edit button, which I added as rightBarButtonItem in the navigation bar</p><pre> func setupViews() {<br>    <br>        view.addSubview(imageView)<br>        view.addSubview(nameTextField)<br>        view.addSubview(addressTextField)<br>        view.addSubview(ageTextField)<br>        view.addSubview(headerView)<br><br><br>        let editButton = UIBarButtonItem(title: &quot;Edit&quot;, style: .plain, target: self, action: #selector(toggleEditMode))<br>        navigationItem.rightBarButtonItem = editButton<br>        <br>        // Set the title color to white for light mode or dark for dark mode<br>        if traitCollection.userInterfaceStyle == .light {<br>            editButton.setTitleTextAttributes([.foregroundColor: UIColor.white], for: .normal)<br>        } else {<br>            editButton.setTitleTextAttributes([.foregroundColor: UIColor.black], for: .normal)<br>        }<br><br>        navigationItem.rightBarButtonItem = editButton<br><br>        let ageDatePicker = UIDatePicker()<br>        ageDatePicker.datePickerMode = .date<br>        ageDatePicker.addTarget(self, action: #selector(datePickerValueChanged(_:)), for: .valueChanged)<br>        ageTextField.inputView = ageDatePicker<br>        <br>        <br>        view.insertSubview(headerView, belowSubview: imageView)// This mainly makes the profile imageView come over the header view<br><br>        NSLayoutConstraint.activate([<br>            imageView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20),<br>            imageView.centerXAnchor.constraint(equalTo: view.centerXAnchor),<br>            imageView.widthAnchor.constraint(equalToConstant: 150),<br>            imageView.heightAnchor.constraint(equalToConstant: 150),<br>            <br>            headerView.topAnchor.constraint(equalTo: view.topAnchor),<br>            headerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),<br>            headerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),<br>            headerView.heightAnchor.constraint(equalToConstant: 180),<br>            <br>            nameTextField.topAnchor.constraint(equalTo: imageView.bottomAnchor, constant: 20),<br>            nameTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),<br>            nameTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),<br>            nameTextField.heightAnchor.constraint(equalToConstant: 40),<br>            <br>            addressTextField.topAnchor.constraint(equalTo: nameTextField.bottomAnchor, constant: 10),<br>            addressTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),<br>            addressTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),<br>            addressTextField.heightAnchor.constraint(equalToConstant: 40),<br>            <br>            ageTextField.topAnchor.constraint(equalTo: addressTextField.bottomAnchor, constant: 10),<br>            ageTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),<br>            ageTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),<br>            ageTextField.heightAnchor.constraint(equalToConstant: 40),<br>        ])<br>        <br>        updateUIForEditMode() // Set up initial UI state<br>    }</pre><h4>Configure Text Field Delegates</h4><p>Create a setupTextFieldDelegates() method to set the delegate for your text fields to the view controller.</p><pre>func setupTextFieldDelegates() {<br>        nameTextField.delegate = self<br>        addressTextField.delegate = self<br>        ageTextField.delegate = self<br>    }</pre><h4>Update UI for Edit Mode</h4><p>Implement the updateUIForEditMode() method to enable or disable text fields and change the edit button&#39;s title based on the current edit mode. The user can interact with the UI when the edit mode is enabled, but after saving, the UserInteraction is disabled, so the user needs to press the edit button for editing.</p><pre> func updateUIForEditMode() {<br>        if isEditMode {<br>            // Enable text fields for editing<br>            imageView.isUserInteractionEnabled = true<br>            nameTextField.isEnabled = true<br>            addressTextField.isEnabled = true<br>            ageTextField.isEnabled = true<br>            <br>            // Change button title to &quot;Save&quot;<br>            navigationItem.rightBarButtonItem?.title = &quot;Save&quot;<br>        } else {<br>            // Disable text fields<br>            imageView.isUserInteractionEnabled = false<br>            nameTextField.isEnabled = false<br>            addressTextField.isEnabled = false<br>            ageTextField.isEnabled = false<br>            <br>            // Change button title to &quot;Edit&quot;<br>            navigationItem.rightBarButtonItem?.title = &quot;Edit&quot;<br>        }<br>    }</pre><h4>Handle Edit Button Action</h4><p>Implement the toggleEditMode() method to handle the edit button&#39;s tap. It should toggle between edit and view mode, saving changes when needed.</p><pre>  @objc func toggleEditMode() {<br>        if changesMade {<br>            saveProfileData() // Save changes before toggling edit mode<br>        }<br>        isEditMode = !isEditMode<br>        updateUIForEditMode()<br>    }</pre><h4>Handle Image Tap Action</h4><p>Implement the handleImageTap() method to handle taps on the user&#39;s profile image. This method should present a UIImagePickerController to allow the user to choose or edit their profile picture.</p><pre>@objc func handleImageTap() {<br>    let imagePicker = UIImagePickerController()<br>    imagePicker.delegate = self<br>    imagePicker.sourceType = .photoLibrary<br>    imagePicker.allowsEditing = true<br>    present(imagePicker, animated: true, completion: nil)<br>}</pre><h4>Setup Gesture Recognizers</h4><p>Create a setupGestureRecognizer() method to configure tap gesture recognizers for the profile image and to dismiss the keyboard.</p><pre>func setupGestureRecognizer() {<br>        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleImageTap))<br>        imageView.addGestureRecognizer(tapGesture)<br>        <br>        let tapToDismissGesture = UITapGestureRecognizer(target: self, action: #selector(handleTapToDismiss))<br>        view.addGestureRecognizer(tapToDismissGesture)<br>        tapToDismissGesture.cancelsTouchesInView = false<br>    }<br> @objc func handleTapToDismiss() {<br>        view.endEditing(true)<br>    }</pre><h4>Handle Date Changes</h4><p>Implement the datePickerValueChanged(_:) method to update the age text field when the user selects their birthdate using a date picker.</p><pre>objc func datePickerValueChanged(_ sender: UIDatePicker) {<br>        let selectedDate = sender.date<br>        let currentDate = Date()<br>        <br>        let calendar = Calendar.current<br>        let ageComponents = calendar.dateComponents([.year], from: selectedDate, to: currentDate)<br>        <br>        if let age = ageComponents.year {<br>            ageTextField.text = &quot;\(age) years old&quot;<br>        } else {<br>            ageTextField.text = &quot;N/A&quot;<br>        }<br>    }</pre><h4>Implement UIImagePickerControllerDelegate</h4><p>Implement the necessary delegate methods to handle image selection and editing when using the UIImagePickerController.</p><pre> func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {<br>        if let editedImage = info[.editedImage] as? UIImage { // Use edited image if available<br>            imageView.image = editedImage<br>            UserDefaults.standard.set(editedImage.pngData(), forKey: &quot;profileImage&quot;)<br>        } else if let originalImage = info[.originalImage] as? UIImage {<br>            imageView.image = originalImage<br>            UserDefaults.standard.set(originalImage.pngData(), forKey: &quot;profileImage&quot;)<br>        }<br>        picker.dismiss(animated: true, completion: nil)<br>    }</pre><h4>Save &amp; Load Profile Data</h4><p>Finally, we will add persistence using UserDefaults. Implement the saveProfileData() and loadProfileData() methods to save and load user profile data using UserDefaults.this saveProfileData() is getting called inside the toggleEditMode().when the user is done with the editing.</p><pre>func loadProfileData() {<br>        if let imageData = UserDefaults.standard.data(forKey: &quot;profileImage&quot;),<br>           let image = UIImage(data: imageData) {<br>            imageView.image = image<br>        }<br>        <br>        if let storedName = UserDefaults.standard.string(forKey: &quot;profileName&quot;) {<br>            nameTextField.text = storedName<br>        }<br>        <br>        if let storedAddress = UserDefaults.standard.string(forKey: &quot;profileAddress&quot;) {<br>            addressTextField.text = storedAddress<br>        }<br>        if let storedAge = UserDefaults.standard.string(forKey: &quot;profileAge&quot;) {<br>            ageTextField.text = storedAge<br>        }<br>    }<br>@objc func saveProfileData() {<br>        if let name = nameTextField.text, let address = addressTextField.text, let age = ageTextField.text {<br>            UserDefaults.standard.set(name, forKey: &quot;profileName&quot;)<br>            UserDefaults.standard.set(address, forKey: &quot;profileAddress&quot;)<br>            UserDefaults.standard.set(age, forKey: &quot;profileAge&quot;)<br>        }<br>    }</pre><h4>Extensions and Helper Functions</h4><p>Define any necessary extensions and helper functions, such as customizing colors and setting left padding for text fields.</p><pre><br>extension UIColor {<br>    static var skyBlue: UIColor {<br>        return UIColor(red: 135.0/255.0, green: 206.0/255.0, blue: 235.0/255.0, alpha: 1.0)<br>    }<br>}<br><br>extension UITextField {<br>    func setLeftPaddingPoints(_ points: CGFloat) {<br>        let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: points, height: self.frame.size.height))<br>        self.leftView = paddingView<br>        self.leftViewMode = .always<br>    }<br>}</pre><p>It’s Done. If you get any issues then Thoroughly test and debug your UI, ensuring that it works as expected in both edit and view modes.</p><p>You are welcome to customize the appearance and behavior according to your specific requirements and design preferences.</p><p>I hope you like this article.</p><p>Thank you.</p><p><strong>Follow </strong><a href="https://medium.com/swiftable"><strong>Swiftable</strong></a><strong> for more updates</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8d8bb3564db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swiftable/learn-how-to-build-ui-programmatically-in-ios-e8d8bb3564db">Learn how to build UI programmatically in iOS</a> was originally published in <a href="https://medium.com/swiftable">Swiftable</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xcode 14 error -/FIRAnalyticsConnector’ for architecture arm64 issue- ✅Solved]]></title>
            <link>https://rohitdas19.medium.com/xcode-14-error-firanalyticsconnector-for-architecture-arm64-issue-solved-b539d672ec79?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b539d672ec79</guid>
            <category><![CDATA[issues]]></category>
            <category><![CDATA[xcode-14]]></category>
            <category><![CDATA[firebaseanalytics]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Sat, 02 Sep 2023 15:22:50 GMT</pubDate>
            <atom:updated>2023-09-02T17:47:56.874Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In /Users/Downloads/dev /project/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector, building for iOS Simulator, but linking in object file built for iOS, file ‘/Users/../Downloads//Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector’ for architecture arm64</blockquote><p>This was the error I got after I did the setup of one project in my Xcode 14 which has lots of package dependencies, So, if you get this similar type of error, then here are some steps by which you can solve it with ease.</p><h4>Steps :</h4><p>Open the workspace, and click on the <strong>project</strong> -&gt; <strong>Build Settings,</strong> You will see this page, go to Excluded Architectures</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MgagRFgPj3cn4jmxu73qxw.png" /><figcaption>After clicking at debug , you can choose the Any iOS Simulator SDK</figcaption></figure><p>Then, add <strong>arm64</strong>,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcV4ZiMtG2eIwHHONAxmpg.png" /></figure><p>Do this same step for Release too.</p><p>Now comes the main step, Go to <strong>Pods -&gt; Excluded Architectures -&gt; Debug, Release-&gt;add Any iOS Simulator SDK as arm64</strong>, like the given image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymFK3soCn_f7iQIQg-QoBA.png" /></figure><p>Done it? Wait, Now <strong>Clean build the project </strong>build it again, and then <strong>run</strong> the Project. Boom! It&#39;s <strong>Solved </strong>✅<strong>.</strong></p><p>If not solved, No worries, Drop a comment below mentioning the issue, will reply back as soon as possible.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b539d672ec79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Sign-in Integration in your iOS App(Swift, UIkit)2023: Step By Step]]></title>
            <link>https://rohitdas19.medium.com/google-sign-in-integration-in-your-ios-app-swift-uikit-2023-step-by-step-c9d55e8a7a58?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d55e8a7a58</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[google-sign-in]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 10:41:44 GMT</pubDate>
            <atom:updated>2023-09-02T17:49:57.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wXTfnNxJSduVjwTw2Q7lA.png" /></figure><p>Hello, I am Rohit, if you want to integrate Google Sign-in in your iOS app using Firebase, along with Facebook sign-in, This article is for you.</p><p>To add the user to Firebase after successful Google Sign-In, you need to integrate Firebase Authentication with your app and use the Google credentials to sign in or create a new user. Follow these steps to achieve that:</p><p>Set up Firebase in your project:</p><ol><li>Make sure you have added Firebase to your Xcode project by following the official Firebase setup guide.</li><li>Import the Firebase module in your<strong> AppDelegate.swift file</strong>.<br>Enable Google Sign-In in Firebase Console and also your <strong>AppDelegate.swift </strong>file must look like this:</li></ol><pre><br>import UIKit<br>import FirebaseCore<br>import Firebase<br>import GoogleSignIn<br><br>@UIApplicationMain<br>class AppDelegate: UIResponder, UIApplicationDelegate {<br><br>    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {<br>        // Override point for customization after application launch.<br>        FirebaseApp.configure()<br>          <br>        ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)<br>          <br>        return true<br>    }<br>    <br>    <br>    // for google signin<br>    func application(_ app: UIApplication,<br>      open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]<br>    ) -&gt; Bool {<br>      var handled: Bool<br><br>      handled = GIDSignIn.sharedInstance.handle(url)<br>      if handled {<br>        return true<br>      }<br><br>      // Handle other custom URL types.<br><br>      // If not handled by this app, return false.<br>      return false<br>    }<br><br><br>    // MARK: UISceneSession Lifecycle<br><br>    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -&gt; UISceneConfiguration {<br>        // Called when a new scene session is being created.<br>        // Use this method to select a configuration to create the new scene with.<br>        return UISceneConfiguration(name: &quot;Default Configuration&quot;, sessionRole: connectingSceneSession.role)<br>    }<br><br>    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set&lt;UISceneSession&gt;) {<br>        // Called when the user discards a scene session.<br>        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.<br>        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.<br>    }<br><br><br>}<br><br></pre><p>3. Go to the Firebase Console, select your project, and navigate to the “Authentication” section.</p><p>Under the “Sign-in method” tab, enable the “Google” sign-in provider.<br>Implement Firebase User Creation/Sign-In:</p><p>In your<strong> ViewController.swift</strong>, import FirebaseAuth if you haven’t already.<br>Modify the Google login function to sign in or create a user with Google credentials and add relevant data to Firebase:</p><pre>import UIKit<br>import GoogleSignIn<br>import ProgressHUD<br>import Firebase<br>import FirebaseAuth<br><br>class ViewController: UIViewController {<br>   <br><br>    @IBAction func googleLogin(_ sender: Any) {<br>         GIDSignIn.sharedInstance.signIn(withPresenting: self) { authentication, error in<br>                if let error = error {<br>                    print(&quot;There is an error signing the user in ==&gt; \(error)&quot;)<br>                    return<br>                }<br>                guard let user = authentication?.user, let idToken = user.idToken?.tokenString else { return }<br>                let credential = GoogleAuthProvider.credential(withIDToken: idToken, accessToken: user.accessToken.tokenString)<br>                <br>            Auth.auth().signIn(with: credential) { [self] authResult, error in<br>                    if error != nil {<br>                        print(error ?? &quot;0&quot;)<br>                    } else {<br>                        self.email = authResult?.user.email<br>                        let name = user.profile?.name<br>                        <br>             <br>                        ProgressHUD.show(&quot;Wait ,Loading...&quot;)<br>                        <br>                      //present tab bar<br>                        tabManager(homeScreenVC)<br>                        <br>                    }<br>                }<br>            }<br>    }<br>    <br>}</pre><p>This will work. Do let me know in the comments if you face any errors.</p><p>Note: If you want to integrate Facebook Sign-in in your iOS App , do read my article:</p><p><a href="https://das2001rohit.medium.com/facebook-login-authentication-in-your-ios-app-swift-uikit-2023-step-by-step-3751a034e50a">Facebook Login Integration in your iOS App(Swift, UIkit)2023: Step By Step</a></p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d55e8a7a58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook Login Integration in your iOS App(Swift, UIkit)2023: Step By Step]]></title>
            <link>https://rohitdas19.medium.com/facebook-login-authentication-in-your-ios-app-swift-uikit-2023-step-by-step-3751a034e50a?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3751a034e50a</guid>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Sat, 22 Jul 2023 11:34:23 GMT</pubDate>
            <atom:updated>2023-07-23T12:48:39.098Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LCUFMzr312xFM6Ui" /><figcaption>Photo by <a href="https://unsplash.com/@shutter_speed_?utm_source=medium&amp;utm_medium=referral">Bastian Riccardi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hi, I am writing this article after successfully implementing the Facebook login authentication in my iOS app, The point of writing this article is to help people who got stuck in some error after following the Facebook developer&#39;s documentation just like me. Some security policies have changed in Meta/Facebook, which they have not updated in their developer documentation, which I will share with you in this article.</p><p>So without any further delay, Let&#39;s start,</p><ol><li>So first, you have to sign in to your Facebook account, if you don&#39;t have any, make it, and then go and sign in to your Facebook developer Account, giving you the link:<a href="https://developers.facebook.com/">https://developers.facebook.com/</a>, where just go to my apps and sign in with your Facebook account.</li><li>Now after that click on the create app section and give the name of your app and register and configure your app by adding your Bundle Identifier which you get after creating the Xcode project.</li><li>Follow the same process stated in the documentation: <a href="http://Facebook login ios documentation">https://developers.facebook.com/docs/facebook-login/ios</a></li></ol><blockquote><strong><em>Some common errors you can get are as follows :</em></strong></blockquote><blockquote>Thread 1: “app id not found. add a string value with your app id for the key</blockquote><p>1&gt;In this line of the code given below,</p><pre>&lt;array&gt;<br>&lt;dict&gt;<br>&lt;key&gt;CFBundleURLSchemes&lt;/key&gt;<br>&lt;array&gt;<br>&lt;string&gt;fbyourappid&lt;/string&gt;<br>&lt;/array&gt;<br>&lt;/dict&gt;</pre><blockquote>Don&#39;t forget to add fb before giving your app id, for example, fb12347897897.</blockquote><p>To integrate the Facebook SDK in an iOS app, you would typically need to import the appropriate Facebook SDK framework and follow the configuration steps provided by Facebook.</p><p>So in place of</p><pre>import FacebookLogin<br>import FacebookCore<br><br>// it is deprecated and does not work now</pre><p>replace it with</p><pre>import FBSDKCoreKit<br>import FBSDKLoginKit<br><br>// this will work </pre><p>Otherwise, you will get this error given below,</p><blockquote>Cannot find Application delegate in scope</blockquote><p>Add this code in the sceneDelegate :</p><pre>// SceneDelegate.swift<br><br>import FBSDKCoreKit<br>import FBSDKLoginKit<br> <br>    func scene(_ scene: UIScene, openURLContexts URLContexts: Set&lt;UIOpenURLContext&gt;) {<br>        guard let url = URLContexts.first?.url else {<br>            return<br>        }<br><br>        ApplicationDelegate.shared.application(<br>            UIApplication.shared,<br>            open: url,<br>            sourceApplication: nil,<br>            annotation: [UIApplication.OpenURLOptionsKey.annotation]<br>        )<br>    }</pre><p>Add this code in the didFinishLaunchingWithOptions of the AppDelegate file :</p><pre>//  AppDelegate.swift<br><br>import UIKit<br>import FBSDKCoreKit<br><br><br>@UIApplicationMain<br>class AppDelegate: UIResponder, UIApplicationDelegate {<br><br><br>    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {<br>        // Override point for customization after application launch.<br>            <br>        ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)<br><br>        <br>        return true<br>    }<br>//// MARK: UISceneSession Lifecycle<br>// Rest remains same</pre><p>Lastly,</p><p>Carefully make changes to the info.plist file, as you have to replace the dummy app id and client token with your unique app id and client token. And only make these changes inside the &lt;string&gt;, which is inside the &lt;key&gt;not on the key.</p><p>And you will get the app id from settings -&gt; basic and the client token from settings -&gt; advanced in the Facebook developer account.</p><p>And now coming to the final view controller part,</p><pre>import UIKit<br>import FBSDKCoreKit<br>import FBSDKLoginKit<br><br>class ViewController: UIViewController {<br><br>    @IBOutlet weak var fbLoginButton: UIButton!<br>    override func viewDidLoad() {<br>        super.viewDidLoad()     <br>    }<br><br>    @IBAction func fbloginTap(_ sender: Any) {<br>       <br>        facebookLogin()<br>    }<br><br>    // Facebook login function<br>    <br>    func facebookLogin() {<br>            let loginManager = LoginManager()<br>            loginManager.logIn(permissions: [&quot;public_profile&quot;], from: self) { (result, error) in<br>                if let error = error {<br>                    // Handle login error here<br>                    print(&quot;Error: \(error.localizedDescription)&quot;)<br>                } else if let result = result, !result.isCancelled {<br>                    // Login successful, you can access the user&#39;s Facebook data here<br>                    self.fetchFacebookUserData()<br>                } else {<br>                    // Login was canceled by the user<br>                    print(&quot;Login was cancelled.&quot;)<br>                }<br>            }<br>        }<br>    // MARK: - Fetch Facebook User Data<br><br>      func fetchFacebookUserData() {<br>          if AccessToken.current != nil {<br>              // You can make a Graph API request here to fetch user data<br>              GraphRequest(graphPath: &quot;me&quot;, parameters: [&quot;fields&quot;: &quot;id, name, email&quot;]).start { (connection, result, error) in<br>                  if let error = error {<br>                      // Handle API request error here<br>                      print(&quot;Error: \(error.localizedDescription)&quot;)<br>                  } else if let userData = result as? [String: Any] {<br>                      // Access the user data here<br>                      let userID = userData[&quot;id&quot;] as? String<br>                      let name = userData[&quot;name&quot;] as? String<br><br>                      // Handle the user data as needed<br>                      print(&quot;User ID: \(userID ?? &quot;&quot;)&quot;)<br>                      print(&quot;Name: \(name ?? &quot;&quot;)&quot;)<br>                      <br>                  }<br>              }<br>          } else {<br>              print(&quot;No active Facebook access token.&quot;)<br>          }<br>      }<br>  }</pre><p>That&#39;s it. I hope you have successfully implemented the Facebook login authentication in your app. If you face any problem related to it, you can let me know in the comments.</p><p>Thank you :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3751a034e50a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pod install issue on M1 chip: 100 % SOLVED [Cocoapods]]]></title>
            <link>https://rohitdas19.medium.com/pod-install-issue-on-m1-chip-100-solved-cocoapods-355e04cef434?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/355e04cef434</guid>
            <category><![CDATA[macbook-m1]]></category>
            <category><![CDATA[issues]]></category>
            <category><![CDATA[pod-install]]></category>
            <category><![CDATA[m1-chip]]></category>
            <category><![CDATA[cocoapods]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 18:16:46 GMT</pubDate>
            <atom:updated>2022-07-16T08:00:26.025Z</atom:updated>
            <content:encoded><![CDATA[<h3>pod install issue on M1 chip: 100 % SOLVED [Cocoapods]</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*kRhTzTYsH5V1XVmDeWEpTQ.jpeg" /></figure><p>So let’s see how this problem can be solved.</p><p>So I have faced this pod install issue after installing cocoapods in my Mac (M1 chip ),</p><p>If you have installed cocoapods before , then follow this steps: (if not ,then directly go to through installation steps)</p><p>These are the steps I did :</p><ol><li>Uninstalling ruby<strong> </strong>: brew uninstall ruby--force</li><li>gem list —-local | grep cocoapods<em>, </em>Then uninstall them one by one by using sudo gem uninstall cocoapods , sudo gem uninstall cocoapods-core,sudo gem uninstall cocoapods-downloader etc .</li></ol><p>So uninstalling the cocoapods package through gem (sudo gem uninstall cocoapods),which i have done above and reinstalling it with homebrew (brew install cocoapods) will fix your problem.</p><p>So ,after the uninstallation process ,now we have to reinstall cocoapods, but now through homebrew :<strong>[INSTALLATION PROCESS]</strong></p><ol><li>Install Ruby : brew install ruby</li><li>echo &#39;export PATH=&quot;/opt/homebrew/opt/ruby/bin:$PATH&quot;&#39; &gt;&gt; ~/.zshrc</li><li>brew install cocoapods</li></ol><p>Then It will show:</p><p>cocoapods 1.11.3 is already installed, it’s just not linked.</p><p>To link this version, run:</p><ol><li>brew link cocoapods</li></ol><p>4. To force the link and overwrite all conflicting files:</p><p>brew link --overwrite cocoapods</p><p>Your problem is solved now ,you can create a pod file by using <em>pod init</em> in your file path and after that you can install any third part library using <em>pod install</em>.</p><p>Thank you …If you face any problem , comment down and I will definitely reply within few hours .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=355e04cef434" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PAGE REPLACEMENT ALGORITHMS]]></title>
            <link>https://rohitdas19.medium.com/page-replacement-algorithms-2a5941d7953a?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a5941d7953a</guid>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Sun, 23 Jan 2022 10:33:50 GMT</pubDate>
            <atom:updated>2022-01-23T10:38:56.870Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>PAGE REPLACEMENT ALGORITHM:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPnJTUlNSeIzuGte-g0Cxw.jpeg" /></figure><blockquote>FIFO (First in First out)</blockquote><blockquote>LRU (Least Recently Used)</blockquote><blockquote>OPT (Optimal )</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*lSIl9lUGaUnRgfGG2OYSrg.png" /></figure><p>This is the simplest page replacement algorithm. In this algorithm, the operating system keeps track of all pages in the memory in a queue, the oldest page is in the front of the queue. When a page needs to be replaced page in the front of the queue is selected for removal.</p><blockquote><strong>LRU ALGORITHM</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1qr7GJOPPtuN00P_CLDzQ.png" /></figure><p>Least Recently Used page replacement algorithm keeps track of page usage over a short period of time. It works on the idea that the pages that have been most heavily used in the past are most likely to be used heavily in the future too.</p><p>In LRU, whenever page replacement happens, the page which has not been used for the longest amount of time is replaced.</p><blockquote><strong>OPTIMAL PAGE REPLACEMENT ALGORITHM</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*Vkkos894q-QlUzOjX9ei4w.png" /></figure><p>An optimal algorithm is just an<strong> </strong>algorithm that results in the theoritically<strong> </strong>fewest cache misses. In other words, it’s impossible to know the optimum until after you have how the cache would have been used. That means you cannot code an algorithm ahead of time that is optimal; because, you don’t know how the cache will actually be used.</p><p>Thank you…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a5941d7953a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is PHP dying or it is statistically alive?]]></title>
            <link>https://rohitdas19.medium.com/is-php-dying-or-it-is-statistically-alive-1b881016e53?source=rss-b5a6be9fada3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b881016e53</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rohit Das]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 12:09:01 GMT</pubDate>
            <atom:updated>2021-11-13T06:19:04.045Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*0g8WdkP1okMkJmqlzpYzvA.jpeg" /></figure><p>So in the era of modern programming languages, where so many fast languages like go, python ,scala, node, etc are in boom, people have started exploring different fields. And when it comes to the field of web development, PHP is considered one of the old popular language.</p><p>So is PHP dead? What do you think?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*eqaNjjLg-FJM-WEa1_IpsA.jpeg" /><figcaption>YES, THE ANSWER IS STRAIGHT</figcaption></figure><p>Surprised??? Let&#39;s analyse it .</p><p>When anyone mentions PHP, it often conjures an air of derision towards the programming language. Though, it appears to be running 79% of the web. Despite the bad rep it garnered back in the 1990s and early 2000s for being insecure, PHP has managed to cling to the title of most used server-side language.</p><p>However, a majority of this success can be due to its affiliation with WordPress. The wildly popular CMS dates back to 2003, just as the internet and personal blogs started to push their way into mainstream popularity. It managed to beat out Google’s Blogger as the main non-technical market’s CMS of choice.</p><p>WordPress was designed for your regular Joe and did everything in its power to be groundbreakingly easy as a creation of its time.</p><p>During Matt Mullenweg’s talk in Auckland, New Zealand, in 2014, he mentioned that Squarespace’s Super Bowl ad gave WordPress a free advertising boost, as people used WordPress as the platform for comparison.</p><p>Since WordPress is built in PHP, supported by almost every shared hosting provider, and <a href="https://w3techs.com/technologies/overview/content_management/all">still holds 61.5%</a> of the internet under its wing, PHP as a language doesn’t seem to be going anywhere any time soon.</p><p>Even if WordPress decides to completely rebuild itself in a different language, there is still a large number of legacy sites that will need to migrate out and into the new setup.</p><h3>A Shifting Landscape</h3><p>PHP’s tightly coupled relationship with WordPress has contributed to how the programming language is viewed by developers. It is often related to theme and plugin development for WordPress’s ecosystem rather than anything else.</p><p>Job prospects outside of WordPress-related activities are often tied to legacy custom-made platforms that were originally built in PHP. It is not often a natural choice for startups or new business projects to put the language on the table as a potential candidate.</p><p>According to Darwin Recruitment, a UK-based recruitment agency that published their recruitment demands data, the experience with PHP recruitment shows a consistent downward trend:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*pZPsC2DDKSfJAPxB.jpeg" /></figure><h3>How’s the Theme Market?</h3><p>With PHP being tied up with WordPress, custom-made or stock theme and plugin creation appear to be the main commercial avenues — especially if you’re looking to go freelance.</p><p>ThemeForest is currently the biggest commercial marketplace for WordPress-related stock assets, with 114 authors currently <a href="https://elite.envato.com/wall-of-fame/">making more than $1 million</a> — a seemingly big but actually small number in a marketplace of 47,000 active WordPress themes on sale. There is no easy way to ascertain what the average number of items is per author, but it is unlikely that their combined output is more than 10%.</p><p>While it may be a good source of passive income, it may take a bit more work to run it as a business. However, anything that requires work often pays its own dividends.</p><p>In 2013, hosting giant Bluehost acquired Mojo Themes and rebranded it as Mojo Marketplace in an attempt to cash in on the WordPress theme market. However, it hasn’t seen as much success as Envato’s ThemeForest, with a majority of its top themes failing to reach 1,000 sales.</p><h3>Conclusion</h3><p>PHP isn’t quite dead, and with its latest update, PHP 8 is 18.47% faster compared to PHP 7.4. The server-side language’s relationship with WordPress is an intimate one and rests on the platform’s long-term uptake by general users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b881016e53" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>