<?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 Yashvardhan Arora on Medium]]></title>
        <description><![CDATA[Stories by Yashvardhan Arora on Medium]]></description>
        <link>https://medium.com/@yashvardhanarora?source=rss-a62a581c351b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZA6tcphuJ4Dx-oda94E-oQ.jpeg</url>
            <title>Stories by Yashvardhan Arora on Medium</title>
            <link>https://medium.com/@yashvardhanarora?source=rss-a62a581c351b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:18:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yashvardhanarora/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[Your App Has a Second User Now. And it doesn’t have hands - Siri AI, App Intents, App Entities ...]]></title>
            <link>https://yashvardhanarora.medium.com/your-app-has-a-second-user-now-and-it-doesnt-have-hands-siri-ai-app-intents-app-entities-632ecfe72c85?source=rss-a62a581c351b------2</link>
            <guid isPermaLink="false">https://medium.com/p/632ecfe72c85</guid>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[ai-siri]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Yashvardhan Arora]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 20:45:26 GMT</pubDate>
            <atom:updated>2026-06-28T20:45:26.280Z</atom:updated>
            <content:encoded><![CDATA[<h3>Your App Has a Second User Now. And it doesn’t have hands.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fb3MdKemjlwWmRnSsZI38Q.png" /></figure><p>For years, we built apps for exactly one kind of user: a person holding a phone, tapping glass. That assumption is quietly becoming outdated. There’s a second user showing up now — an agent. On iOS, that agent is Siri AI. And if your app can’t talk to it, you’re slowly becoming invisible, no matter how polished your UI is.</p><p>I don’t think “compatible” is the right word for this. Compatible sounds like a checkbox you tick at the end. What’s actually happening is a shift in what an app <em>is</em>:</p><blockquote><strong><em>Frontend isn’t just about building UIs. You’re no longer building screens. You’re exposing capabilities. The screen is one way to trigger a capability. Siri is another.</em></strong></blockquote><p>Once that clicks, everything else follows. The UI becomes one client of your app’s logic, and the agent becomes another. So let me walk through a concrete example — something with real surface area — and show how far this goes.</p><h3>The example: a personal finance app</h3><p>Imagine a budgeting app. You know the type: <strong>accounts</strong>, <strong>transactions</strong>, <strong>categories</strong>, <strong>budgets</strong>, a spending breakdown, maybe transfers between accounts. Plenty of screens, a real data model, a SwiftUI hierarchy you’ve tuned over months:</p><pre>@Observable<br>final class LedgerStore {<br>    var accounts: [Account] = []<br>    var transactions: [Transaction] = []<br>    func logExpense(_ amount: Decimal, category: Category) { /* ... */ }<br>    func transfer(_ amount: Decimal, from: Account, to: Account) { /* ... */ }<br>}</pre><p>Useful — but everything it knows is trapped behind taps. If someone wants to log a ₹400 lunch, they</p><ol><li>unlock the phone,</li><li>find the app,</li><li>hit +,</li><li>pick a category,</li><li>type the amount,</li><li>save.</li></ol><p>Five steps for one fact. The friction <em>is</em> the problem, and it’s exactly the kind of friction an <em>agent</em> erases.</p><h3>Step 1: Expose one capability as an App Intent</h3><p>An <strong>App Intent</strong> is a single unit of <em>“something the app can do”</em> described so the system understands it. Logging an expense:</p><pre>import AppIntents<br><br>struct LogExpenseIntent: AppIntent {<br>    static let title: LocalizedStringResource = &quot;Log an Expense&quot;<br><br>    @Parameter(title: &quot;Amount&quot;) var amount: Double<br>    @Parameter(title: &quot;Category&quot;) var category: CategoryEntity<br><br>    func perform() async throws -&gt; some IntentResult &amp; ProvidesDialog {<br>        LedgerStore.shared.logExpense(Decimal(amount), category: category.id)<br>        return .result(dialog: &quot;Logged ₹\(amount) under \(category.name).&quot;)<br>    }<br>}</pre><p><em>“Hey Siri, log a 400 rupee lunch”</em> now works. The same intent shows up in <strong>Shortcuts</strong>, <strong>Spotlight</strong>, on the <strong>Lock Screen</strong>, and as a <strong>widget action</strong>. Write the logic once, the system hands you five surfaces for free.</p><h3>Step 2: Teach Siri AI your nouns with App Entities</h3><p>Notice CategoryEntity. An <strong>App Entity</strong> is how you describe your app&#39;s <strong>nouns </strong>— categories, accounts, transactions — so Siri treats them as real things, not strings.</p><pre>struct AccountEntity: AppEntity {<br>    let id: UUID<br>    let name: String<br>    let balance: Decimal<br><br>    static let typeDisplayRepresentation: TypeDisplayRepresentation = &quot;Account&quot;<br>    var displayRepresentation: DisplayRepresentation {<br>        .init(title: &quot;\(name)&quot;, subtitle: &quot;₹\(balance)&quot;)<br>    }<br>    static let defaultQuery = AccountQuery()<br>}</pre><p>Now Siri can disambiguate (“from checking or savings?”), pass accounts between intents, and reason over your actual model. <em>“Transfer 5,000 from savings to checking”</em> has real things to resolve against — the agent isn’t guessing, it’s operating on your domain.</p><h3>Wait — do App Entities replace my data model?</h3><p>This tripped me up the first time too, so let me clear it up before we go further. No, you don’t rewrite your models, and you usually don’t just slap an annotation on them either. Think of an AppEntity as the <strong>public passport</strong> your model hands to Siri — a small, stable identity the system can read — while your real model keeps all its private internals to itself.</p><p>Say your app already has a SwiftData model:</p><pre>@Model<br>final class Transaction {<br>    var id: UUID<br>    var amount: Decimal<br>    var note: String<br>    var category: Category<br>    var date: Date<br>    var rawBankPayload: Data   // internal stuff Siri has no business seeing<br>}</pre><p>You don’t hand this to Siri. You expose a lightweight projection of it:</p><pre>struct TransactionEntity: AppEntity {<br>    let id: UUID<br>    let amount: Decimal<br>    let note: String<br><br>    static let typeDisplayRepresentation: TypeDisplayRepresentation = &quot;Transaction&quot;<br>    var displayRepresentation: DisplayRepresentation {<br>        .init(title: &quot;\(note)&quot;, subtitle: &quot;₹\(amount)&quot;)<br>    }<br>    static let defaultQuery = TransactionQuery()<br>}<br><br>extension TransactionEntity {            // one-line mapping<br>    init(_ model: Transaction) {<br>        self.init(id: model.id, amount: model.amount, note: model.note)<br>    }<br>}</pre><p>The bridge between the two is the <strong>query</strong> — it’s how Siri turns an id back into a real thing, or fetches matches:</p><pre>struct TransactionQuery: EntityQuery {<br>    func entities(for ids: [UUID]) async throws -&gt; [TransactionEntity] {<br>        LedgerStore.shared.transactions(with: ids).map(TransactionEntity.init)<br>    }<br>    func suggestedEntities() async throws -&gt; [TransactionEntity] {<br>        LedgerStore.shared.recent(5).map(TransactionEntity.init)<br>    }<br>}</pre><p>So the mental model is three layers: <br><strong>your data model is the source of truth, the entity is its public face, and the query is the bridge between them.</strong></p><p>The flow is always:<strong> Siri asks → query fetches your model → you return an entity.</strong> Your internal data model never leaves the app directly.</p><p>For a tiny value type, you <em>can</em> conform your model directly to AppEntity and skip the projection — but for anything real, keep them separate.</p><blockquote><em>Your model changes for product reasons; your entity should change only when you want Siri to see something new. Decoupling them now saves you genuine pain later.</em></blockquote><h3>Step 3: The real leverage — App schemas</h3><p>The schema: parameter on both @AppEntity and @AppIntent is what wires you into Siri&#39;s existing world model.</p><p>A plain AppIntent tells Siri your app can <em>do</em> something. An App Schema tells Siri what <em>kind of thing</em> it is — in a vocabulary the language model already understands deeply. App Schema Domains are predefined category contracts: .messages, .calendar, .audio, .photos, and more. When you conform your entities and intents to a domain schema, you&#39;re not writing a custom Siri integration. You&#39;re saying &quot;my WorkoutEntity is an exercise.workout&quot; — and Siri immediately knows how to reason about it, search it, and chain it with other apps. No training phrases. No NLP work on your end. And when Apple improves Siri&#39;s language understanding, your app inherits those improvements automatically.</p><pre>@AppEntity(schema: .calendar.event)<br>struct MeetingEntity { /* required properties scaffolded for you */ }</pre><p>More on App Schema Domains <a href="https://developer.apple.com/documentation/appintents/app-schema-domains">here</a>.</p><p>In <strong>Xcode 27</strong>, this is surfaced through autocomplete. Type calendar_ in a new entity file and you get every schema snippet in the calendar domain. Pick calendar_event and it scaffolds the @AppEntity macro, required properties, a DisplayRepresentation, and query stubs — all in one shot.</p><p>One honest caveat for our finance app: not every domain exists yet. There’s no .finance domain today, so you conform to schemas where your features overlap with existing ones, and fall back to custom intents for the genuinely domain-specific stuff like transfers. The rule of thumb: <strong>adopt a schema whenever one fits, and only write custom when nothing does.</strong> Schemas are where Siri&#39;s intelligence compounds in your favor for free.</p><h3>The WWDC26 jump</h3><p>This is where it stopped being incremental. At <strong>WWDC26</strong>, Apple made <strong>App Intents</strong> the primary integration surface for the new Gemini-powered Siri AI, and put SiriKit on a formal deprecation clock. A few changes reshape what a finance app can do:</p><ul><li><strong>Spotlight’s semantic index:</strong> new entity/intent schemas let your transactions become indexed, actionable content. “How much did I spend on food this month?” gets answered from the index — no app launch.</li><li><strong>View Annotations:</strong> Siri can act on what’s on screen. Looking at a transaction, “split this with Aman” just works.</li><li><strong>Multi-turn + streaming:</strong> “Show me this week’s spending” → “Move the dining ones to a new budget” → done, in one conversation.</li><li><strong>Per-intent privacy manifests:</strong> you declare, per intent, whether an interaction may go to the cloud or must stay on-device. For finance, that’s not a nice-to-have — it’s the whole trust model.</li><li><strong>App Intents Testing framework:</strong> finally, you can unit-test these pathways instead of demoing into the void.</li></ul><p>Step back and compare. The app went from a tappable ledger to something you talk to mid-task, that answers questions from an index, acts on what you’re looking at, holds a short conversation, and respects a privacy boundary you declared in code — mostly from intents and entities you’d half-written already. That’s not a 10% polish. That’s a 5–10x jump in how present the app is in someone’s day, with barely a change to the SwiftUI views.</p><h3>And this is one example</h3><p>A budgeting app is just one shape. Run the same lens over a fitness app, a CRM, a notes app, a food-delivery app — every one of them has <strong>nouns</strong> and <strong>verbs</strong> trapped behind taps right now. App Intents is just the act of setting them free. The use cases are genuinely endless.</p><p>So, my honest take: stop treating Siri support as a feature for later. Design your app as a set of capabilities, with the UI as one client and the agent as another. Build the entities, adopt the schemas. The teams who internalize this early will feel a generation ahead, and the gap only widens from here.</p><p><strong>Next up:</strong> exposing capabilities is only half the story. The other half is making Siri <em>predict</em> them — surfacing the right action before the user even asks. That comes down to <strong>intent donations</strong> and indexing: every time someone logs an expense in-app, you can <strong><em>donate</em></strong> that interaction so the system learns the pattern and starts offering it proactively. I’ll dig into <strong>donations</strong> and <strong>indexing</strong> in my <strong>next article</strong>. That’s where “an app Siri can use” becomes “an app Siri anticipates.”</p><blockquote>Your screens were always for humans. Your intents are for everyone — and everything — else.</blockquote><p>Sources / Further reading:</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2026/240/">Build intelligent Siri experiences with App Schemas — WWDC26</a></li><li><a href="https://developer.apple.com/videos/play/wwdc2026/343/">Explore advanced App Intents features for Siri and Apple Intelligence — WWDC26</a></li><li><a href="https://blakecrosley.com/blog/app-schemas-siri-ios-27">App Schemas: Make Your App Available to Siri — Blake Crosley</a></li><li><a href="https://www.techtimes.com/articles/318005/20260608/wwdc-2026-app-intents-replaces-sirikit-gemini-siri-migration-clock-starts.htm">WWDC 2026: App Intents Replaces SiriKit — TechTimes</a></li><li><a href="https://www.apple.com/newsroom/2026/06/apple-unveils-next-generation-of-apple-intelligence-siri-ai-and-more/">Apple unveils next generation of Apple Intelligence, Siri AI — Apple Newsroom</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=632ecfe72c85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SwiftUI’s List Had a Monopoly. WWDC26 Just Broke It.]]></title>
            <link>https://yashvardhanarora.medium.com/swiftuis-list-had-a-monopoly-wwdc26-just-broke-it-6a8c0c2c64e6?source=rss-a62a581c351b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a8c0c2c64e6</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[wwdc]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Yashvardhan Arora]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 04:27:54 GMT</pubDate>
            <atom:updated>2026-06-12T04:30:21.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uFWy8dSrWR5wo4BEiRVVCQ.png" /></figure><p><em>If you’ve ever reached for </em><em>List not because you wanted it, but because it was the only way to get swipe actions or drag-to-reorder — this one&#39;s for you.</em></p><p>For years, List in SwiftUI has been a bit of a gatekeeper. Want users to swipe to delete? Use List. Need drag-to-reorder? Use List. It didn&#39;t matter that your design called for a card-based layout, a horizontal carousel, or a custom grid. The moment you needed those two interactions, you were locked into List&#39;s opinionated look — its system separators, its insets, its background styling that you&#39;d spend half an afternoon trying to override.</p><p>WWDC26 quietly fixed this. And I think it’s one of the most practically useful SwiftUI improvements in years.</p><h3>What Was the Actual Problem?</h3><p>Let me paint a picture. You’re building a task manager. Your designer sends over a mock with beautifully rounded cards, custom spacing, and a subtle shadow on each item. You build it with LazyVStack — it looks perfect. Then your PM says, &quot;can users swipe to delete?&quot; You know what happens next. You either bolt on a custom gesture recognizer, reach for a third-party library, or — the most common sin — quietly swap your LazyVStack for a List and spend the next two hours re-styling it to <em>look</em> like what you originally had.</p><p>That’s the problem. List wasn&#39;t always the right container. It was just the only container with the right superpowers.</p><h3>What WWDC26 Actually Changed</h3><p>iOS 27 introduces two new modifiers that decouple these interactions from List entirely.</p><h4><strong>Swipe Actions — anywhere:</strong></h4><pre>ScrollView {<br>    LazyVStack {<br>        ForEach(items) { item in<br>            TaskCard(item)<br>                .swipeActions {<br>                    Button(&quot;Delete&quot;, role: .destructive) {<br>                        delete(item)<br>                    }<br>                }<br>        }<br>    }<br>}<br>.swipeActionsContainer()</pre><p>The .swipeActions modifier you already know — but now it needs a .swipeActionsContainer() on the parent scroll container to activate. That one line is all it takes. Your cards, your layout, your styling. No List required.</p><blockquote><em>Can’t feel the real difference as to why is this update helpful? Let me pull up a </em>REAL<em> code snippet I wrote for my app </em><strong><em>Lift</em></strong><em> — a workout tracker.</em></blockquote><p><strong>Before — iOS 26 and below (forced into </strong><strong>List just for swipe actions)</strong></p><p>The tell here is all the boilerplate <em>fighting</em> the List to make it <strong>not</strong> look like one:</p><pre>// Every .listRow* modifier exists just to undo List&#39;s default styling.<br><br>var body: some View {<br>    List {<br>        <br>        // Padding buffer - workaround since List ignores .padding on its container<br>        Color.clear<br>            .frame(height: Spacing.xs)<br>            .listRowBackground(Color.clear)<br>            .listRowSeparator(.hidden)<br>            .listRowInsets(EdgeInsets())<br><br><br>        ForEach(workouts) { workout in<br>            NavigationLink(destination: WorkoutDetailView(workout: workout)) {<br>                PastWorkoutCard(workout: workout)<br>            }<br>            .buttonStyle(.plain)<br>            .listRowInsets(EdgeInsets(<br>                top: Spacing.xs,<br>                leading: Spacing.md,<br>                bottom: Spacing.xs,<br>                trailing: Spacing.md<br>            ))<br>            .listRowBackground(Color.clear)   // undo List&#39;s row bg<br>            .listRowSeparator(.hidden)        // undo List&#39;s separators<br>            .swipeActions(edge: .trailing, allowsFullSwipe: true) {<br>                Button(role: .destructive) { deleteWorkout(workout) } label: {<br>                    Label(&quot;Delete&quot;, systemImage: &quot;trash&quot;)<br>                }<br>                .tint(Color.liftAccent)<br>            }<br>        }<br><br>        // Bottom padding buffer - same hack as above<br>        Color.clear<br>            .frame(height: Spacing.sm)<br>            .listRowBackground(Color.clear)<br>            .listRowSeparator(.hidden)<br>            .listRowInsets(EdgeInsets())<br>    }<br>    .listStyle(.plain)<br>    .scrollContentBackground(.hidden)  // undo List&#39;s system background<br>}</pre><p><strong>After — iOS 27+ (</strong><strong>LazyVStack + </strong><strong>.swipeActionsContainer())</strong></p><p>All the List boilerplate disappears. The layout says exactly what it means:</p><pre>@available(iOS 27, *)<br>var body: some View {<br>    ScrollView {<br>        // Top and Bottom list item insets replaced by spacing<br>        LazyVStack(spacing: Spacing.xs) {<br>            ForEach(workouts) { workout in<br>                NavigationLink(destination: WorkoutDetailView(workout: workout)) {<br>                    PastWorkoutCard(workout: workout)<br>                }<br>                .buttonStyle(.plain)<br>                .padding(.horizontal, Spacing.md). // Horizontal list item insets replaced by padding<br>                .swipeActions(edge: .trailing, allowsFullSwipe: true) {<br>                    Button(role: .destructive) { deleteWorkout(workout) } label: {<br>                        Label(&quot;Delete&quot;, systemImage: &quot;trash&quot;)<br>                    }<br>                    .tint(Color.liftAccent)<br>                }<br>            }<br>        }<br>        .padding(.vertical, Spacing.xs)  // No more Color.clear hack needed<br>    }<br>    .swipeActionsContainer()  // ← the one new line that makes it all work<br>}</pre><p><strong>If you need to support both iOS 26 and iOS 27 in the same codebase</strong>, gate it with if #available:</p><pre>var body: some View {<br>    if #available(iOS 27, *) {<br>        newScrollView<br>    } else {<br>        legacyList<br>    }<br>}</pre><p><strong>The delta is stark</strong>: 6 List-specific modifiers and two padding-buffer hacks reduced to a single .swipeActionsContainer().</p><p>That&#39;s the real story for the article.</p><h4>One Thing to Keep in Mind</h4><p>The .swipeActionsContainer() is <strong><em>required</em></strong> on the scroll parent — you can&#39;t just drop .swipeActions on a view inside a plain VStack and expect it to work. Think of it as an opt-in signal to the framework: &quot;this scroll region supports swipe interactions.&quot; It&#39;s a small API tax, but it&#39;s an intentional one — it lets SwiftUI coordinate gesture conflicts properly across nested scrollable content.</p><h4><strong>Drag-to-Reorder — anywhere:</strong></h4><pre>struct ContentView: View {<br>    @State private var tasks: [Task] = []<br><br>    var body: some View {<br>        VStack {<br>            ForEach(tasks) { task in<br>                TaskCard(task)<br>            }<br>            .reorderable()<br>        }<br>        .reorderContainer(for: Task.self) { difference in<br>            difference.apply(to: &amp;tasks)<br>        }<br>    }<br>}</pre><p>.reorderable() marks the items as draggable. .reorderContainer(for:) on the parent handles the collection diff and gives you back a clean CollectionDifference to apply. It even works with LazyVGrid and, for the first time, on watchOS.</p><h3>Real-Life: When to Use What</h3><p>Here’s my honest take on where each container now belongs:</p><p><strong>Stick with </strong><strong>List when:</strong></p><ul><li>You’re building settings screens, contact lists, or any UI where the system aesthetic is a feature, not a bug.</li><li>You want automatic section headers, edit mode, or multi-select — List still owns these.</li><li>You’re iterating fast and want free platform-idiomatic styling.</li></ul><p><strong>Reach for </strong><strong>LazyVStack + the new modifiers when:</strong></p><ul><li>Your design is custom — cards, tiles, anything with non-standard spacing or backgrounds.</li><li>You need full control over separators, padding, and backgrounds without <em>fighting</em> the system.</li><li>You’re building a feed, a Kanban-style column, or a social timeline where items have variable heights and rich media.</li></ul><p><strong>LazyHStack + swipe actions:</strong></p><p>Think horizontal media shelves — like a “Recently Played” row in a music app. Now you can swipe items in a horizontal scroll to remove them from a queue without any custom gesture hackery. That’s genuinely new territory.</p><p><strong>Custom layouts:</strong></p><p>If you’ve gone deep with the Layout protocol to build something like a tag cloud or a masonry grid, these modifiers work there too. I haven&#39;t tested myself yet, but the promise alone is significant.</p><h3>Is This Actually a Big Deal?</h3><p>Yes — but not in a flashy way. This is a <strong><em>maturity</em></strong> improvement.</p><p>Before this, SwiftUI forced an implicit contract: <em>want native interactions, accept native styling</em>. That trade-off held back a lot of production apps. Teams used to avoid SwiftUI entirely for custom-designed screens because reimplementing swipe-to-delete with gestures is a rabbit hole. Now that excuse evaporates.</p><p>There’s also an architectural win here. Previously, if you started with a LazyVStack and added swipe actions later, you had to refactor your container. Now the container is a separate concern from the interaction — you can add .swipeActionsContainer() at any time without restructuring your view hierarchy.</p><p>For junior developers, this removes a genuinely confusing gotcha: “<em>why doesn’t </em><em>.swipeActions work on my </em><em>VStack? </em>&quot; For senior developers, it unblocks a class of UI patterns that previously required compromises.</p><h3>The Bigger Picture</h3><p>SwiftUI has been on a slow but steady march toward flexibility without sacrificing safety. The Layout protocol, scrollTargetBehavior, and now container-agnostic swipe and reorder — each of these chips away at the walls that used to force you into UIKit the moment your design got opinionated.</p><p>WWDC26 didn’t reinvent SwiftUI. It just quietly removed a friction point that’s been annoying every iOS developer since SwiftUI launched. Sometimes that’s exactly what a maturing framework needs.</p><p>Now if you’ll excuse me, I have a LazyVStack that&#39;s long overdue for a swipe action.</p><p><em>Found this useful? Follow for more SwiftUI deep dives. And if you’ve been burned by the List-lock-in before, I’d love to hear your war stories in the comments.</em></p><p>Sources:</p><ul><li><a href="https://swiftwithmajid.com/2026/06/08/what-is-new-in-swiftui-after-wwdc26/">What is new in SwiftUI after WWDC26 — Swift with Majid</a></li><li><a href="https://developer.apple.com/videos/play/wwdc2026/269/">What’s new in SwiftUI — WWDC26 — Apple Developer</a></li><li><a href="https://blakecrosley.com/blog/whats-new-swiftui-ios-27">What’s New in SwiftUI for iOS 27 — Blake Crosley</a></li><li><a href="https://developer.apple.com/videos/play/wwdc2026/321/">Dive into lazy stacks and scrolling with SwiftUI — WWDC26</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a8c0c2c64e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Shell Command for formatting files in newly created create-react-app]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/creating-shell-command-for-formatting-files-in-newly-created-create-react-app-c2e74ad488c0?source=rss-a62a581c351b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2e74ad488c0</guid>
            <category><![CDATA[zsh]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[create-react-app]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[shell-script]]></category>
            <dc:creator><![CDATA[Yashvardhan Arora]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 21:51:41 GMT</pubDate>
            <atom:updated>2022-07-15T13:32:17.891Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Problem:</strong> Unnecessary files are found in every new project created using create-react-app.</p><p><strong>Solution:</strong> We delete the unwanted files and create the mandatory files and folders using a single shell command!</p><h3>Introduction</h3><p>Hello everyone! This is the very first time that I am writing a technical blog. But the problem and its solution that we are going to talk about today forced me to make this tool and publish it for people like me, who sigh, every time they create a new React project using create-react-app (CRA).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIkT_bGnP-esgNJGrC9pyQ.png" /></figure><p>For a basic project not involving much unit testing, the current template of CRA has some unnecessary files, to begin with, like the App.test.js , setupTests.js , logo.svg, reportWebVitals.js and many more. Also, almost every React project has the famous components and assets folders that are not included in the CRA template.</p><p>So, we see that every time before beginning with our actual project, we need to delete some repeated files and create some mandatory folders.</p><p>What’s better than typing a single word in the terminal and letting it do the magic for us? Well, we are just gonna create magic ahead.</p><h3>Writing the Script</h3><p>So, this process will require a little bit of Shell Scripting. But no worries if you have never done it before. <a href="https://medium.com/devnetwork/how-to-create-your-own-custom-terminal-commands-c5008782a78e">This article</a> helped me a lot in creating a shell command of my own. But for those who got less time, the necessary abstracts from the above article are included.</p><p>Let’s create a sample shell function. A simple shell function can be created as follows.</p><pre>function print_my_input() {<br> echo &#39;Your input: &#39; $1<br>}</pre><p>Try to paste this on your terminal and then call it along with an argument like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*8tY97RTmmTg6GuGnKH2kZw.png" /></figure><blockquote>Now, why do we need to make our script as a function? Because we want to call it as a shell command and not execute the file itself. We cant execute the shell file every time as we would need to provide its absolute/ relative path every time which is not desired.</blockquote><p>Now coming to the useful piece of code:</p><pre>#!/bin/bash</pre><pre>function formatcra() {</pre><pre>    cd src<br>    rm setupTests.js reportWebVitals.js App.test.js App.css logo.svg</pre><pre>    echo &quot;function App() {<br>    return (<br>        &lt;div&gt;<br>        &lt;/div&gt;<br>    );<br>    }</pre><pre>    export default App;<br>    &quot; &gt; App.js</pre><pre>    echo &quot;import React from &#39;react&#39;;<br>    import ReactDOM from &#39;react-dom&#39;;<br>    import &#39;./index.css&#39;;<br>    import App from &#39;./App&#39;;</pre><pre>    ReactDOM.render(<br>    &lt;React.StrictMode&gt;<br>        &lt;App /&gt;<br>    &lt;/React.StrictMode&gt;,<br>    document.getElementById(&#39;root&#39;)<br>    );<br>    &quot; &gt; index.js</pre><pre>    mkdir components<br>    mkdir assets<br>    cd ..</pre><pre>    echo &quot;Deleted unnecessary files, created useful folders!&quot;<br>}</pre><p>Keep this code handy, we are going to paste it into a shell file in the next step.</p><h3>Storing the file in the root directory</h3><p>We’ll create the shell file in the root directory of our computer. We can store it in any other folder too, but we would need to provide a path for this file later in the ~/.bashrc or ~/.zshrc file to load it in the terminal whenever a new session starts, so to minimize path length, the root directory is used here.</p><blockquote>Create it as a hidden file as it only needs to be used by the shell and it will prevent accidental deletion of the file too.</blockquote><p>A hidden file can be created by prefixing a . to the file name.</p><pre>cd ~<br>touch .formatCRA.sh</pre><p>Now open this newly created file in any text editor and paste the above shell script into it and save the file.</p><h3>Making the command available in the Terminal</h3><p>Now, if you don’t know already, the print_my_input function worked in only that terminal session where the function code was pasted. If you restart the terminal or open another window or tab, and try to call it again, it will throw an error. So, we need a way to load our function every time a new terminal session starts.</p><p>A file can be loaded into the terminal using the command <br>source ~/{{file_path}} .</p><p>But we need the file to load automatically whenever a new session begins. For this, we edit the rc (Run Control) file of the shell. The shell loads/executes all the commands inside the <strong>Run Control </strong>file during each interactive shell launch.</p><p>BASH is the default shell of most of the <strong>UNIX-based</strong> systems but <strong>macOS</strong> systems also use <strong>ZSH</strong> as the default shell. Depending on the shell in use, we edit the ~/.bashrc or ~/.zshrc file present in the root directory.</p><blockquote>To know about your Shell, you can use the command echo $SHELL</blockquote><ol><li>Open ~/.zshrc or ~/.bashrc in a text editor</li><li>Paste source ~/.formatCRA.sh at the end of the file.</li><li>Restart terminal</li></ol><h3><strong>We are good to go!</strong></h3><h3>Testing the command</h3><p>Create a new react app using create-react-app:<br>npx create-react-app test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*GZj6JIQFmbIJa-g-Z56Nqw.gif" /></figure><p>Move inside the app folder:<br>cd test</p><p>Run the command formatcra in your client (test) folder and let it do the magic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*glhU-wiZ3sSOSMkBAfDQrQ.gif" /></figure><h3>Customization</h3><p>Every reader is encouraged to customize the shell function according to their style of making react projects. If you think there are some other files/ folders that are a must in most of your react projects and can be created at the time of project setup, you can add those in the script.</p><ul><li>New files can be created using touch &lt;file_name.js&gt; .</li><li>More folders can be added to the template using mkdir &lt;folder_name&gt; commands in the shell script.</li><li>Subfolders can be created by combining cd and mkdir commands.</li></ul><p><strong>Reference:</strong> <a href="https://medium.com/devnetwork/how-to-create-your-own-custom-terminal-commands-c5008782a78e">https://medium.com/devnetwork/how-to-create-your-own-custom-terminal-commands-c5008782a78e</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2e74ad488c0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/creating-shell-command-for-formatting-files-in-newly-created-create-react-app-c2e74ad488c0">Creating Shell Command for formatting files in newly created create-react-app</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>