<?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 Reena Prajapati on Medium]]></title>
        <description><![CDATA[Stories by Reena Prajapati on Medium]]></description>
        <link>https://medium.com/@reena.prajapati46?source=rss-61722c5a04f1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aT7FX_zFxflKwsHrhSrAdA.jpeg</url>
            <title>Stories by Reena Prajapati on Medium</title>
            <link>https://medium.com/@reena.prajapati46?source=rss-61722c5a04f1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:33:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@reena.prajapati46/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[SwiftData: The Modern Way to Build Offline iOS Apps]]></title>
            <link>https://medium.com/@reena.prajapati46/swiftdata-the-modern-way-to-build-offline-ios-apps-5dfacd7897ed?source=rss-61722c5a04f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dfacd7897ed</guid>
            <category><![CDATA[core-data]]></category>
            <category><![CDATA[swiftdata]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Reena Prajapati]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 08:38:46 GMT</pubDate>
            <atom:updated>2025-06-16T08:38:46.781Z</atom:updated>
            <content:encoded><![CDATA[<p>Apple introduced <strong>SwiftData</strong> at WWDC23 as a modern, Swift native replacement for Core Data. If you’ve ever struggled with Core Data’s verbose APIS, model files, or context juggling, you’re going to love SwiftData.</p><p>In this article, you’ll learn:</p><ul><li>What SwiftData is</li><li>How it’s different from Core Data</li><li>How to use it to build a local offline first iOS app</li><li>How to query, filter, and sort your data</li></ul><p>This guide focuses on local persistence — <strong>no background sync</strong>, no cloud — just offline data done right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEMA2puuNtdEGT7fv_Bidg.png" /></figure><h3><strong>What is SwiftData?</strong></h3><p><strong>SwiftData</strong> is Apple’s new persistence framework built entirely in swift. It’s the spiritual successor to CoreData but redesigned for modern SwiftUI apps.</p><p>Here’s what make it different:<br><br> - No more .<strong>xcdatamodeld</strong> files<br> - No more <strong>NSManagedObject </strong>subclasses<br> - Full integration with SwiftUI<br> - Compile-time safe filtering, sorting, and relationships</p><h3>SwiftData vs Core Data: A Real World Comparison</h3><p>Let’s walk through the exact steps you’d take in Core Data and how SwiftData does it better line by line.</p><h4>1. Defining a Model</h4><p><strong>Core Data:<br></strong>You’d define your model in a .<strong>xcdatamodeld</strong> file using a visual editor, then generate <strong>NSManagedObject</strong> subclasses.</p><p><strong>SwiftData:<br></strong>Just create a regular swift class and annotate it with <strong>@model</strong> attribute.</p><pre>@Model<br>class Note {<br>    var id: UUID = UUID()<br>    var title: String<br>    var content: String<br>    var lastUpdated: Date<br>    var isSynced: Bool = false<br>}</pre><p>✅ No file generation, no extra tooling — it’s all just Swift.</p><h4>2. Setting Up the Data Stack</h4><p><strong>Core Data:<br></strong>You’d initialize an <strong>NSPersistentContainer</strong>, load it, and inject the context manually into your views.</p><p><strong>SwiftData:<br></strong>You just use <strong>.modelContainer(for:)</strong> in your <strong>App</strong> struct.</p><pre>@main<br>struct SwiftNotesApp: App {<br>    var body: some Scene {<br>        WindowGroup {<br>            ContentView()<br>        }<br>        .modelContainer(for: Note.self)<br>    }<br>}</pre><p>✅ Zero setup code. It just works.</p><h4>3. Inserting Data</h4><p><strong>Core Data:<br></strong>You’d create a new entity with <strong>NSEntityDescription</strong>, insert it into the context, and cast it properly.</p><p><strong>SwiftData:<br></strong>Just create a swift object and insert it into the context.</p><pre> let note = Note(title: title, content: content)<br> context.insert(note)<br> try? context.save()</pre><p>✅ You’re working with plain swift types, not fragile object graphs.</p><h4>4. Fetching Data</h4><p><strong>Core Data:<br></strong>You’d write a <strong>NSFetchRequest</strong>, execute it, and deal with casting.</p><p><strong>SwiftData:<br></strong>Use <strong>@Query</strong> to fetch data directly into your SwiftUI views.</p><pre>@Query private var notes: [Note]</pre><p>✅ Less code. Automatically keeps UI in sync.</p><h4>5. Filtering and Sorting</h4><p><strong>Core Data:<br></strong>You build <strong>NSPredicate</strong> strings manually like <strong>“title CONTAINS[c] ‘Meeting’</strong> <strong>”</strong>.</p><p><strong>SwiftData:<br></strong>Use type safe Swift predicates and descriptors.</p><pre> @Query(filter: #Predicate&lt;Note&gt; {$0.title.contains(&quot;Meeting&quot;)})<br> var meetingNotes: [Note]<br><br> @Query(sort: \.lastUpdated, order: .reverse)<br> var recentNotes: [Note]</pre><p>✅ No stringly-typed code. Compile-time safety.</p><h4>6. Updating and Deleting</h4><p><strong>Core Data:<br></strong>You manually update properties and call save() — but you need to be cautions with thread context.</p><p><strong>SwiftData:<br></strong>Same logic but easier with no need to cast types.</p><pre> note.title = &quot;Updated&quot;<br> try? context.save()<br>  <br> context.delete(note)<br> try? context.save()</pre><p>✅ Simple and straightforward.</p><h4>7. Relationship</h4><p><strong>Core Data:<br></strong>You define relationships in the model editor and manage inverse relationships.</p><p><strong>SwiftData:<br></strong>Just use arrays and optionals. It’s just Swift.</p><pre>@Model<br>class Project {<br>    var name: String<br>    var task: [Task] = []<br>}</pre><p>✅ Type safe, readable, and intuitive.</p><h3>Building a Simple SwiftData Notes App</h3><p>Now let’s put SwiftData to work by building a simple local first Notes app.</p><h4>Step 1: Define the Model</h4><pre>@Model<br>class Note {<br>    var id: UUID = UUID()<br>    var title: String<br>    var content: String<br>    var lastUpdated: Date<br>    var isSynced: Bool = false<br><br>    init(title: String, content: String) {<br>        self.title = title<br>        self.content = content<br>        self.lastUpdated = Date()<br>    }<br>}</pre><h4>Step 2: Main SwiftUI View</h4><pre>struct ContentView: View {<br><br>    @Environment(\.modelContext) private var context<br>    @Query private var notes: [Note]<br>    @State private var title: String = &quot;&quot;<br>    @State private var content: String = &quot;&quot;<br>    @State private var isEditing = false<br>    @State private var selectedNote: Note = Note(title: &quot;&quot;, content: &quot;&quot;)<br><br>    var body: some View {<br><br>        NavigationView {<br>            VStack {<br>                TextField(&quot;Title&quot;, text: $title)<br>                    .textFieldStyle(.roundedBorder)<br><br>                TextField(&quot;Content&quot;, text: $content)<br>                    .textFieldStyle(.roundedBorder)<br><br>                Button(&quot;Add Note&quot;) {<br>                    let note = Note(title: title, content: content)<br>                    context.insert(note)<br>                    try? context.save()<br>                    title = &quot;&quot;<br>                    content = &quot;&quot;<br>                }<br>                .frame(width: 100, height: 40)<br>                .foregroundStyle(.black)<br>                .background(.gray)<br>                .background(in: .capsule)<br>                .padding(.vertical)<br><br><br>                List(notes) { note in<br>                    VStack(alignment: .leading) {<br>                        Text(note.title).bold()<br>                        Text(note.content)<br>                    }<br>                    .swipeActions(edge: .trailing) {<br>                        Button(&quot;Edit&quot;) {<br>                            selectedNote = note<br>                            isEditing = true<br>                        }<br>                        .foregroundColor(.black)<br><br>                        Button(&quot;Delete&quot;) {<br>                            context.delete(note)<br>                            try? context.save()<br>                        }<br>                        .foregroundColor(.black)<br>                    }<br>                }<br><br>                .background(.white)<br>            }<br>            .padding()<br><br>            .sheet(isPresented: $isEditing) {<br>                EditNoteView(note: $selectedNote, isEditing: $isEditing)<br>            }<br>        }<br>    }<br>}</pre><h4>Step 3: Update Note SwiftUI View</h4><pre>struct EditNoteView: View {<br>    <br>    @Environment(\.modelContext) private var context<br>    @Binding var note: Note<br>    @Binding var isEditing: Bool<br><br>    var body: some View {<br>        VStack {<br>            TextField(&quot;Title&quot;, text: $note.title)<br>                .textFieldStyle(.roundedBorder)<br><br>            TextField(&quot;Content&quot;, text: $note.content)<br>                .textFieldStyle(.roundedBorder)<br><br>            Button(&quot;Edit&quot;) {<br>                try? context.save()<br>                isEditing = false<br><br>            }<br>            .frame(width: 100, height: 40)<br>            .foregroundStyle(.black)<br>            .background(.gray)<br>            .background(in: .capsule)<br>            .padding(.vertical)<br>        }<br>    }<br>}</pre><h4>Step 4: Add the Model Container</h4><pre>@main<br>struct SwiftNotesApp: App {<br>    var body: some Scene {<br>        WindowGroup {<br>            ContentView()<br>        }<br>        .modelContainer(for: Note.self)<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*LuSADOFImMUHgz9lgKSYAg.gif" /><figcaption>OutPut</figcaption></figure><h3>Conclusion</h3><p>SwiftData is a massive step forward in building local first iOS apps. It brings everything developers love about Swift — strong typing, clean syntax, live updates — to the world of data persistence.</p><p>If you’re building a new app that stores user data offline, SwiftData should be your default choice.</p><p>Enjoyed this post? Follow for more updates on iOS development and Swift!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dfacd7897ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Concurrency: Old vs New — What’s the real Difference?]]></title>
            <link>https://medium.com/@reena.prajapati46/swift-concurrency-old-vs-new-whats-the-real-difference-72cbdc961d57?source=rss-61722c5a04f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/72cbdc961d57</guid>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swift-concurrency]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[gcd]]></category>
            <category><![CDATA[async]]></category>
            <dc:creator><![CDATA[Reena Prajapati]]></dc:creator>
            <pubDate>Tue, 03 Jun 2025 05:27:46 GMT</pubDate>
            <atom:updated>2025-06-30T06:48:16.004Z</atom:updated>
            <content:encoded><![CDATA[<h3>Swift Concurrency: Old vs New — What’s the real Difference?</h3><blockquote>You’ve heard about swift’s new concurrency model. You may have even used async/await. But what exactly has it replaced and why? In this article, we’ll compare the old and new concurrency approaches in swift, look at real code examples, highlight pros and cons, and figure out which is better for modern iOS development.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ojszQ_vp2ikuf2kVL2X24A.png" /></figure><h3><strong>The Old Way: GCD, Completion Handlers &amp; OperationQueue</strong></h3><p>For years, Apple developers relied on Grand Central Dispatch (GCD) and OperationQueue for asynchronous programming. You’d dispatch tasks to background queues, then bounce back to the main thread to update the UI.<br> This worked well for basic use cases, but as apps grew more complex, problems emerged — deeply nested callbacks, tricky thread safety, and confusing error handling.</p><p><strong>Example — GCD with Completion Handler</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9d9adc477453d155fb61c5d3b8aa929/href">https://medium.com/media/d9d9adc477453d155fb61c5d3b8aa929/href</a></iframe><p>At first glance, this looks okay. But chaining multiple async steps (like fetching a profile, then avatar, then friends) can quickly turn into unreadable “callback hell.”</p><h3>The New Way: async/await, Actor, Task</h3><p>Swift 5.5 introduced structured concurrency — built into the language. Instead of juggling dispatch queues and closures, you write code that’s easier to follow and safer by default. async/await lets you pause execution until a task completes, just like writing synchronous code — but without blocking.</p><p>Actors ensure thread-safe shared state without locks. TaskGroup handles parallelism without needing DispatchGroup.</p><p><strong>Example — async/await</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31b2e6192d4d3f2be137b132b3ae861c/href">https://medium.com/media/31b2e6192d4d3f2be137b132b3ae861c/href</a></iframe><p>Clean, simple, and easy to maintain — no closures, no thread juggling, no nested pyramids.</p><h3><strong>Key Differences Between Old and New Swift Concurrency</strong></h3><ol><li><strong>Syntax and Readability</strong><br>Old: Complex, nested closures.<br>New: Looks like sequential code using async/await.</li><li><strong>Error Handling</strong><br>Old: Manual error propagation via optional closures or custom result types.<br>New: Use try/catch — errors bubble naturally through the call stack.</li><li><strong>Thread Safety</strong><br>Old: Requires locks, serial queues, or careful coordination.<br>New: actor ensures exclusive access to mutable state.</li><li><strong>Task Management</strong><br>Old: Use DispatchGroup, DispatchQueue, or OperationQueue.<br>New: Use Task, TaskGroup, and structured concurrency.</li><li><strong>Debugging</strong><br>Old: Stack traces often unclear due to detached async chains.<br>New: Better stack trace visibility and lifecycle tracking.</li></ol><h3><strong>Pros &amp; Cons: Old Concurrency Model</strong></h3><p>✅ <strong>Pros :-<br>- </strong>Works on all Apple platforms, even older versions.<br>- Low-level control over execution and priority.<br>- GCD is extremely performant and reliable when used correctly.</p><p>❌ Cons<strong>:-<br>- </strong>Harder to read and maintain, especially with deeply nested async calls.<br>- No built-in error handling — everything is manual.<br>- Easy to introduce race conditions and bugs.<br>- Difficult to test and debug.<br>- Memory leaks if DispatchGroup.enter() / leave() aren’t balanced.</p><h3>Pros &amp; Cons: New Concurrency Model</h3><p>✅ <strong>Pros :-<br>- </strong>Cleaner syntax with async/await and structured logic.<br>- Built-in error handling with try, throws, catch.<br>- Safer by default — actors manage shared state access.<br>- Easier to compose and cancel tasks using Task or TaskGroup.<br>- Better stack trace and crash reporting.</p><p>❌ Cons<strong>:-<br>- </strong>Requires iOS 13+/macOS 10.15+.<br>- Slight learning curve if you’re used to GCD or OperationQueue.<br>- Some advanced behaviors (like queue prioritization) are less explicit.</p><h3>Which One Should You Use?</h3><ul><li><strong>Use New Swift Concurrency if:</strong><br>- You’re building a modern iOS/macOS app (iOS 13+).<br>- You want safer, more readable code.<br>- You value structured concurrency and better testability.</li><li><strong>Use Old Swift Concurrency if:<br>- </strong>You need to support older OS versions (iOS 12 or earlier).<br>- You need low-level control or complex queue customization.<br>- You’re maintaining legacy code and can’t migrate yet.</li></ul><blockquote>You can also mix both — Swift allows bridging between GCD-based an async/await-based code using <strong>withCheckedContinuation</strong>.</blockquote><p><strong>Migration Tip: From Callback to async/await</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f87239374d9ec64c72bdc4318c5fe08a/href">https://medium.com/media/f87239374d9ec64c72bdc4318c5fe08a/href</a></iframe><h3>Conclusion:</h3><p>Swift’s new concurrency model isn’t just about modern syntax — it’s about writing safer, more reliable, and scalable asynchronous code. While GCD and OperationQueue still have their place, async/await, actor, and TaskGroup are the future of Swift development.</p><p>If you’re starting fresh — or maintaining code on supported OS versions — there’s no question: the new model is better. Cleaner code. Fewer bugs. Better performance management.</p><p>Enjoyed this post? Follow for more updates on iOS development and Swift!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72cbdc961d57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Concurrency: async/await, actor, Task, and TaskGroup]]></title>
            <link>https://medium.com/@reena.prajapati46/swift-concurrency-async-await-actor-task-and-taskgroup-b82b20d11010?source=rss-61722c5a04f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b82b20d11010</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swiftupdates]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[swift-programming]]></category>
            <dc:creator><![CDATA[Reena Prajapati]]></dc:creator>
            <pubDate>Thu, 29 May 2025 13:11:23 GMT</pubDate>
            <atom:updated>2025-05-29T13:11:23.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Swift ‘s concurrency model helps you write safe, efficient, and readable asynchronous code using keywords like async, await, actor, Task, and TaskGroup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gzslRBQnTn0vSqjF" /><figcaption>Photo by <a href="https://unsplash.com/@thepaintedsquarejessica?utm_source=medium&amp;utm_medium=referral">Jessica Lewis 🦋 thepaintedsquare</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s break them down with simple examples.</p><h3><strong>async and await: </strong>Writing Asynchronous Code</h3><p>In Swift, <strong>async</strong> means the function does work in the background. <strong>await</strong> tells your code to pause and wait for the result.</p><ul><li><strong>Why use it?<br></strong>So your app doesn’t freeze while doing time-consuming tasks like downloading data.</li></ul><p><strong>Example:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08b046ce556997aa116859f82df6a080/href">https://medium.com/media/08b046ce556997aa116859f82df6a080/href</a></iframe><blockquote>“Pause here for a second, get the username, then continue.”</blockquote><h3>actor: Safe Access to Shared Data</h3><p>When multiple tasks access the same data at the same time, you can get bugs. <strong>actor</strong> helps prevent that.</p><ul><li><strong>Why use it?<br></strong>To avoid race conditions when multiple parts of your app try to read/write shared data.</li></ul><p><strong>Example:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9800547aaec5497448cae10f8c9be5c/href">https://medium.com/media/e9800547aaec5497448cae10f8c9be5c/href</a></iframe><blockquote>Safely update a shared shopping cart from multiple threads (e.g., when syncing with server and user interactions).</blockquote><h3>Task: Launching Asynchronous Work</h3><p>A <strong>Task</strong> lets you start an async function without blocking anything.</p><ul><li><strong>Why use it?<br></strong>To run background work, like loading data or processing files.</li></ul><p><strong>Example:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/084b12938b7d2d960d7d19fca92da000/href">https://medium.com/media/084b12938b7d2d960d7d19fca92da000/href</a></iframe><blockquote>“Start a lightweight background job and do something when it’s done.”</blockquote><p>You can also capture the result:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e189c74e24317fd152c777b26525bfa2/href">https://medium.com/media/e189c74e24317fd152c777b26525bfa2/href</a></iframe><h3>TaskGroup: Run Many Tasks in Parallel</h3><p><strong>TaskGroup</strong> lets you launch multiple async tasks at the same time and wait for all of them to complete.</p><ul><li><strong>Why use it?<br></strong>To improve performance when you can do many things at once (e.g., fetch data from multiple sources).</li></ul><p><strong>Example:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db696fddfee8fe2b4faa14484e7200d5/href">https://medium.com/media/db696fddfee8fe2b4faa14484e7200d5/href</a></iframe><blockquote>Download multiple images at once instead of one-by-one for better performance in a photo gallery or social app.</blockquote><h3>Wrapping Up</h3><p>Swift’s concurrency model feels natural once you get used to it. Start simple, and you’ll be writing clean, safe async code in no time!</p><p>Happy Coding!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b82b20d11010" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clipboard Monitoring with Combine Framework Using SwiftUI]]></title>
            <link>https://medium.com/@reena.prajapati46/clipboard-monitoring-with-combine-framework-using-swiftui-91d142eec8c3?source=rss-61722c5a04f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/91d142eec8c3</guid>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[clipboard]]></category>
            <category><![CDATA[combine-framework]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Reena Prajapati]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 12:00:58 GMT</pubDate>
            <atom:updated>2025-03-24T15:27:48.964Z</atom:updated>
            <content:encoded><![CDATA[<p>Apple introduced the <strong>Combine framework</strong> in <strong>WWDC 2019</strong>, alongside <strong>iOS 13. </strong>It was introduced as part of Apple’s effort to simplify asynchronous and event-driven programming using a declarative, reactive approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGNmSzADoMgM6f4fYo79Rw.png" /><figcaption>Combine Framework Introduced by Apple</figcaption></figure><p>The Combine framework provides a declarative Swift API for processing values over time. These values can represent many kinds of asynchronous events. Combine declares publishers to expose values that can change over time, and subscribers to receive those values from the publishers.</p><h3><strong>Key Concepts:</strong></h3><ul><li><strong>Publishers</strong>: Send out a sequence of values over time.</li><li><strong>Subscribers</strong>: Receive and respond to values sent by publishers.</li><li><strong>Operators</strong>: Modify or filter values sent by publishers.</li><li><strong>Subjects</strong>: Act as both senders and receivers of values.</li><li><strong>Cancellables</strong>: Keep track of subscriptions to avoid memory leaks.</li></ul><p>Theory is great, but learning by doing is even better! Let’s explore Combine with a practical example: a Clipboard Monitoring app that updates instantly when you copy something. Ready? Let’s dive in!</p><h4><strong>Clipboard Monitoring with Combine</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/838dd18790f402315199e19e5d32378b/href">https://medium.com/media/838dd18790f402315199e19e5d32378b/href</a></iframe><p>1) <strong>Timer based publisher</strong>: - Runs every second to check the clipboard for new content.</p><p>2) <strong>Clipboard Fetching (UIPasteboard.general.string)</strong>:- Retrieves the latest copied text and updates clipboardText.</p><p>3) <strong>removeDuplicates() to Reduce Unnecessary Updates</strong>:- Publishes only elements that don’t match the previous element.</p><h4><strong>SwiftUI View to Display Clipboard Content</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a9021b3734622d84837b80e7eb1abab/href">https://medium.com/media/4a9021b3734622d84837b80e7eb1abab/href</a></iframe><p>It’s time to test our implementation! Copy any text, and the app will update automatically. Let’s see it in action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*QrQyXvBxEQcJw9xXgaHy4A.gif" /></figure><h3>Conclusion:</h3><p>Combine simplifies handling asynchronous tasks in Swift, making your code more readable and efficient. In this post, we explored a real-world example — Clipboard Monitoring — to demonstrate its power. With Combine, you can build reactive, real-time experiences in iOS apps effortlessly. Start experimenting with Combine today and take your Swift development to the next level!</p><p>Enjoyed this post? Follow for more updates on iOS development and Swift!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91d142eec8c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in iOS 18?]]></title>
            <link>https://medium.com/@reena.prajapati46/whats-new-in-ios-18-30d9c6aab2c7?source=rss-61722c5a04f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/30d9c6aab2c7</guid>
            <category><![CDATA[ios18]]></category>
            <category><![CDATA[appleupdate]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[latest-updates]]></category>
            <category><![CDATA[iphone]]></category>
            <dc:creator><![CDATA[Reena Prajapati]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 12:41:23 GMT</pubDate>
            <atom:updated>2024-11-21T04:23:53.987Z</atom:updated>
            <content:encoded><![CDATA[<p>iOS 18 brings big customization changes to the home, and Lock Screen and has an all new Control Center. There are many new changes including updates to Accessibility, CarPlay, Camera, Photos, Music, Phone with T9 dialing, and just about every iPhone app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G22CvphsHPxS2P3C" /><figcaption>Photo by <a href="https://unsplash.com/@jakobowens1?utm_source=medium&amp;utm_medium=referral">Jakob Owens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong><em>Customization Home Screen:</em></strong></h3><ul><li>Arrange apps and widgets on your Home Screen and change their size.</li><li>Tint apps your favorite color, or have iPhone suggest a color that complements your wallpaper.</li></ul><h3><strong>Lock and Hide Apps:</strong></h3><ul><li>Protect sensitive apps and the information inside them by locking or hiding them.</li><li>When you lock an app on your Home Screen, you need to use Face ID, Touch ID, or your passcode to open it.</li><li>Hide an app from your Home Screen in a hidden apps folder that’s locked.</li><li>Information stored in locked or hidden apps won’t appear in other places on your iPhone, such as notifications and search.</li></ul><h3><strong>Control Center:</strong></h3><ul><li>The redesigned Control Center features new groups of controls so you can quickly take actions on more features.</li><li>The controls gallery displays all your options in one place, including controls from your favorite apps.</li></ul><h3><strong>Photos:</strong></h3><ul><li>The redesigned Photos app puts your photo library at your fingertips, so you spend less time searching and more time enjoying your memories.</li><li>Your photos are organized by topics such as Recent Days, Trips, People &amp; Pets, and more.</li><li>Use Pinned Collections to quickly access the collections or albums most important to you.</li></ul><h3><strong>Messages:</strong></h3><ul><li>Add text effects such as bold, italics, underline, and strikethrough to emphasize your messages, or apply animated effects to any letter, word, phrase, or emoji — many of which are automatically suggested as you type.</li><li>React to messages in new ways by using any emoji or sticker as a Tapback.</li><li>Schedule a message to send at a specified time.</li><li>Use satellite capabilities to stay connected when you’re without Wi-Fi or cellular coverage.</li></ul><h3><strong>Passwords:</strong></h3><ul><li>A new app that safely stores all of your passwords, account credentials, and verification codes in one place. If you use AutoFill, the passwords you generate are automatically added to the Passwords app.</li></ul><h3><strong>Maps:</strong></h3><ul><li>View topographic maps with detailed trail networks and hikes, including all 63 U.S. national parks. Save hiking maps to your iPhone to access them offline with turn-by-turn voice guidance.</li><li>You can create custom walking and hiking routes with different route options, such as one way, out and back, or loop.</li></ul><h3><strong>Wallets:</strong></h3><ul><li>Use Tap to Cash to send and receive Apple Cash by holding your iPhone or Apple Watch near the other person’s iPhone or Apple Watch, without having to share phone numbers. Event tickets include an event guide about the venue with recommendations from Apple apps. View your rewards or points balances in Wallet and use Apple Pay to pay with rewards or installments.</li></ul><h3><strong>Notes:</strong></h3><ul><li>You can record live audio in a note and have the speech transcribed to text.</li><li>Make text stand out with color, use collapsible headers in text-heavy sections.</li><li>Solve mathematical equations instantly with Math Notes.</li></ul><h3><strong>Privacy and Security:</strong></h3><ul><li>Redesigned Privacy and Security settings help you manage how much information you share with apps.</li><li>You can decide specific contacts you want to share with an app instead of your entire contact list.</li></ul><h3><strong>Calculator</strong>:</h3><ul><li>Use new tools like history and unit conversions. Type or write out math with Math Notes to evaluate expressions, assign variables, plot graphs, and more.</li></ul><blockquote>Happy Coding!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30d9c6aab2c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>