<?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 Swapnil Nighot on Medium]]></title>
        <description><![CDATA[Stories by Swapnil Nighot on Medium]]></description>
        <link>https://medium.com/@swapNighot?source=rss-8a3c8ff3bf2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Uo6FcoNJMu7aKtbyL-RGmA.png</url>
            <title>Stories by Swapnil Nighot on Medium</title>
            <link>https://medium.com/@swapNighot?source=rss-8a3c8ff3bf2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:28:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@swapNighot/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[Agent Skills: The Open Format Every Mobile Developer Should Know About]]></title>
            <link>https://medium.com/@swapNighot/agent-skills-the-open-format-every-mobile-developer-should-know-about-956c2cf4a3ab?source=rss-8a3c8ff3bf2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/956c2cf4a3ab</guid>
            <category><![CDATA[mobile-agent]]></category>
            <category><![CDATA[ai-assisted-coding]]></category>
            <category><![CDATA[mobile-agent-skills]]></category>
            <dc:creator><![CDATA[Swapnil Nighot]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 12:05:03 GMT</pubDate>
            <atom:updated>2026-07-18T12:05:03.740Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Stop re-typing the same prompts into your AI assistant. Package your team’s knowledge once and let any AI agent use it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBQ9MJ3m3rcw-QyNhHCcCw.png" /></figure><p>In December 2025, Anthropic published <strong>Agent Skills</strong> as an open standard (<a href="https://agentskills.io/home">agentskills.io</a>), and it has since been adopted by Claude Code, OpenAI’s Codex CLI, GitHub Copilot, Cursor, Gemini CLI, VS Code, and dozens of other agent platforms. The pitch is simple: instead of re-explaining your team’s conventions to an AI agent in every conversation, you package that knowledge once as a folder and any compatible agent can discover it, load it, and follow it.</p><p><strong><em>Think of it as an onboarding guide, except the new hire is an AI agent that reads it in milliseconds.</em></strong></p><p>The examples in this article are iOS-specific — SwiftUI, fastlane, App Store Connect — but every concept maps one-to-one to Android and Flutter. If you’re an Android developer, simply swap Theme.swift for your Compose theme and TestFlight for Play Console internal testing; the format, the workflow, and the publishing steps all remain exactly the same.</p><h3>What exactly is a skill?</h3><p>A skill is just a directory with one required file:</p><pre>swiftui-components/<br>├── SKILL.md          # Required: metadata + instructions<br>├── scripts/          # Optional: executable code (Python, Bash, JS)<br>├── references/       # Optional: extra docs loaded on demand<br>└── assets/           # Optional: templates, icons, snippets</pre><p>The `SKILL.md` file has two parts: YAML frontmatter (machine-readable metadata) and a Markdown body (the actual instructions). Only two frontmatter fields are required — `name` and `description`:</p><pre>---<br>name: swiftui-components<br>description: &gt;-<br>  Generate SwiftUI views following our design system. Use whenever the<br>  user asks to build screens, views, or UI elements for the iOS app,<br>  even if they don&#39;t mention the design system explicitly.<br>---<br><br># SwiftUI Components<br><br>## Rules<br>- Always use tokens from `DesignSystem/Theme.swift` - never hardcoded<br>  colors or `.padding(17)` magic numbers.<br>- Every view gets `#Preview` variants for light mode, dark mode, and<br>  Dynamic Type at `.accessibility3`.<br>- State lives in `@Observable` view models; views stay dumb. no<br>  networking or persistence inside a `View`.<br>- Use our wrappers — `AppButton`, `AppTextField`, `AppCard` — instead<br>  of raw SwiftUI controls. Full catalog: references/components.md.<br>- Minimum deployment target is iOS 17; don&#39;t suggest<br>  `ObservableObject`/`@Published` patterns.</pre><p>That’s a complete, working skill.</p><p><strong>Why this matters: progressive disclosure</strong></p><p>The clever bit is <em>how</em> skills load. Agents don’t stuff every skill into every request. Instead they use a three-tier system:</p><p>1. <strong>Metadata </strong>(name + description, ~100 tokens) always in context for every installed skill.</p><p>2. <strong>SKILL.md body </strong>loaded only when your request matches the description.</p><p>3. <strong>Bundled files </strong>loaded (or executed) only when the instructions point to them.</p><p>So you can install twenty different skills e.g: release process, design system, crash triage, localization and pay almost zero context cost until one is actually needed. For mobile teams with long, fussy processes (looking at you, app store review guidelines), this is the difference between an agent that “kind of knows” your workflow and one that follows it exactly.</p><p><strong>Mobile skill ideas</strong></p><p>Where does this pay off in a mobile codebase? A few examples that map to real pain:</p><p><strong>TestFlight &amp; App Store release skils:</strong> Version and build number bumps across targets (`MARKETING_VERSION`, `CURRENT_PROJECT_VERSION`), changelog and What’s New format, screenshot sizes per device class, which `fastlane` lanes to run in what order, phased-release percentages, and when to submit for expedited review. Bundle your lanes as scripts the agent can execute instead of describe:</p><pre>---<br>name: appstore-release<br>description: &gt;-<br>  Run and verify our iOS release process. Use whenever the user<br>  mentions releasing, shipping, TestFlight, App Store submission,<br>  version bumps, or archiving the app.<br>---<br><br># App Store Release<br><br>1. Run `scripts/preflight.sh` — verifies clean git state, passing<br>   tests, and no `TODO: REMOVE` markers.<br>2. Bump versions: `fastlane bump_version` (never edit pbxproj by hand).<br>3. Update `CHANGELOG.md` using the template in assets/changelog.md.<br>4. Archive &amp; upload: `fastlane beta` for TestFlight,<br>   `fastlane release` for App Store.<br>5. Checklist before submission: references/submission-checklist.md<br>   (privacy nutrition labels, export compliance, required screenshots).</pre><p><strong>Design system skill:</strong> As shown above encode your theme tokens, spacing scale, and component wrappers so generated SwiftUI compiles against your design system instead of generic defaults. Put the full component catalog in `references/` so it loads only when needed.</p><pre>---<br>name: design-system<br>description: &gt;-<br>  Use whenever working on UI, SwiftUI components, themes, colors,<br>  typography, spacing, or implementing screens that should follow<br>  the Design System.<br>---<br><br># Design System<br><br>1. Always reuse existing Design System components before creating new ones.<br>2. Use semantic colors, typography, spacing, and radius tokens—never hardcoded values.<br>3. Support Light/Dark Mode and Dynamic Type by default.<br>4. Ensure accessibility (VoiceOver, contrast, touch targets).<br>5. Refer to references/components.md for APIs and references/design-tokens.md for available tokens.<br>6. If no suitable component exists, propose a reusable component instead of duplicating UI.</pre><p><strong>Localization skill:</strong> Rules for String Catalog (`.xcstrings`) keys, pluralization via `String(localized:)`, RTL layout gotchas with `HStack` vs `.leading` alignment, and which strings must never be machine-translated (legal copy, brand names).</p><p><strong>Creating your own skill</strong></p><p>The workflow is refreshingly low-ceremony:</p><p>1. <strong>Create the folder and SKILL.md </strong>The name must be lowercase with hyphens, max 64 characters, and must match the folder name exactly, mismatches cause skills to silently fail to load on some platforms.</p><p>2. <strong>Sweat the description</strong> This is the highest-leverage text in the whole skill, because it’s the only part the agent sees when deciding whether to activate it. Describe <strong><em>what</em></strong> the skill does <strong><em>and when</em></strong> to use it, and be a little pushy — For example: “Use whenever the user mentions releases, version bumps, TestFlight, or App Store Connect” triggers far more reliably than “Helps with releases.”</p><p>3. <strong>Keep the body lean</strong> Under 500 lines / ~5,000 tokens is the recommended ceiling. Move the long stuff (full API references, component catalogs) into `references/` and link to it with relative paths.</p><p>4. <strong>Add scripts for deterministic work</strong> Anything repeatable and mechanical bumping build numbers, generating app icons at every size, symbolicating crashes, running SwiftLint is better as an executable script than as prose instructions.</p><p>5. <strong>Validate and test</strong> The spec ships a reference library (`skills-ref`) to validate frontmatter. Then test triggering: run realistic prompts and check the skill activates when it should and stays quiet when it shouldn’t.</p><p><strong>Publishing internally</strong></p><p>For our own team, distribution is very straight forward</p><p>- <strong>In-repo:</strong> commit skills to your app repository (e.g. `.claude/skills/` for Claude Code, or the equivalent directory your agent scans). Everyone who clones the repo gets them — versioned, code-reviewed, and evolving alongside the codebase. This is the sweet spot for repo-specific skills like your design system.</p><p>- <strong>Shared skills repo:</strong> for org-wide skills (release process, security review, ticket conventions), keep a dedicated `mobile-skills` repository and have developers install or symlink from it. Teams on Claude for Work / managed platforms can also push skills organization-wide through admin settings.</p><p>Treat skills like code: PR reviews for changes, semantic versioning in the `metadata` field, and a changelog. Your release skill <strong><em>is</em></strong> process documentation now — with the bonus that it’s executable.</p><p><strong>Publishing externally</strong></p><p>If you maintain a mobile SDK, library, or framework, this is where it gets interesting. Take an iOS SDK shipped as a Swift package: Publishing a skill alongside your SDK means every AI-assisted developer integrating your product gets your best-practice integration guide automatically</p><p>Options for external distribution:</p><p>- <strong>Ship it in your package repo</strong> (a `skills/` directory next to `Package.swift`) so it travels with the source.</p><p>- <strong>Publish to GitHub </strong>as a standalone repo — the emerging convention, and how Anthropic ships its own reference skills (github.com/anthropics/skills).</p><p>- <strong>Skill marketplaces and directories</strong> are appearing across the ecosystem, and platform-specific plugin systems (Claude Code plugins, VS Code extensions) can bundle skills too.</p><p>License it explicitly (the spec supports a `license` frontmatter field — Apache-2.0 and MIT are common), and because a skill is plain Markdown plus optional scripts, remind users to review third-party skills before installing. Skills are instructions your agent will follow; treat them with the same skepticism as a shell script from the internet.</p><p><strong>The takeaway</strong></p><p>Agent Skills do for AI-assisted development what `fastlane` did for mobile releases: they turn tribal knowledge into portable, versioned automation. The format is trivially simple — a folder, a Markdown file, two required fields — but the standardization is the real story. Write a skill once and it works in Claude Code today, Codex tomorrow, and whatever agent your team adopts next year.</p><p>Start small: take the one prompt you keep re-typing — probably your TestFlight release checklist — and turn it into a `SKILL.md` this week. Your future self, and every agent you work with, will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=956c2cf4a3ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Type Systems in Kotlin and Swift]]></title>
            <link>https://medium.com/@swapNighot/understanding-the-type-systems-in-kotlin-and-swift-3321170313f3?source=rss-8a3c8ff3bf2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3321170313f3</guid>
            <dc:creator><![CDATA[Swapnil Nighot]]></dc:creator>
            <pubDate>Sat, 10 Feb 2024 11:29:38 GMT</pubDate>
            <atom:updated>2024-02-10T11:29:38.911Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>Introduction: In the second instalment of our series, <em>“</em><a href="https://medium.com/@swapNighot/bridging-worlds-exploring-kotlin-for-swift-developers-2a61132549e6"><em>Bridging Worlds: Exploring Kotlin for Swift Developers,</em></a><em>”</em> we dig into one of the fundamental pillars of programming languages — the type system. Understanding how types work in both Kotlin and Swift is crucial for Swift developers venturing into the Kotlin world. By drawing analogies and highlighting parallels, we aim to make this transition smoother and more intuitive.</p><p><strong>1. Static vs. Dynamic Typing:</strong></p><p><strong><em>Swift</em></strong>: Swift employs a static type system, where every variable and expression is assigned a type at compile-time. This approach catches type-related errors early in the development process, offering robust type safety.</p><p><strong><em>Kotlin</em></strong>: Kotlin, like Swift, also uses static typing. This means that variable types are determined at compile-time, ensuring strong type checking and preventing type-related runtime errors.</p><p><strong>2. Type Inference:</strong></p><p><strong><em>Swift</em></strong>: Swift is known for its powerful type inference. Developers often don’t need to explicitly specify types because the compiler can deduce them from the context. This feature keeps code concise and readable.</p><pre>let name = &quot;John&quot; // Swift infers that &#39;name&#39; is of type String<br>let age = 30 // Swift infers that &#39;age&#39; is of type Int</pre><p><strong><em>Kotlin</em></strong>: Kotlin shares this type inference capability with Swift, making code more concise and less verbose while maintaining strong type safety.</p><pre>val name = &quot;John&quot; // Kotlin infers that &#39;name&#39; is of type String<br>val age = 30 // Kotlin infers that &#39;age&#39; is of type Int</pre><p><strong>Nullable Types:</strong></p><p>Nullable types are used to represent variables that can hold either a value or a null reference. In Swift, this is achieved using optionals, and in Kotlin, it’s done using nullable types.</p><p>In Swift, you use a question mark (?) to indicate that a variable can be nil.</p><pre>var maybeName: String? // &#39;maybeName&#39; can hold a String or be nil<br>maybeName = &quot;Alice&quot; // Assigning a value<br>maybeName = nil // Assigning nil</pre><p>Kotlin introduces the concept of nullable types using the “?” symbol. This aligns with Swift’s optionals, providing a familiar approach to managing nullability.</p><pre>var maybeName: String? // &#39;maybeName&#39; can hold a String or be null<br>maybeName = &quot;Alice&quot; // Assigning a value<br>maybeName = null // Assigning null<br><br>var a: String = &quot;abc&quot; // Regular initialization means non-null by default<br>a = null // compilation error</pre><p><strong>3. Safe Calls</strong></p><p><strong><em>Swift</em></strong>: In Swift, you use optional chaining (`?.`)to safely work with optional values. Here’s an example using optional chaining:</p><pre>let user: User? = getUser()<br>let username = user?.name // Safely accesses &#39;name&#39; property, no force unwrapping</pre><p><strong><em>Kotlin</em></strong>: In Kotlin, safe calls are achieved using the safe call ?. operator, which allows you to safely access properties or call methods on nullable types:</p><pre>val user: User? = getUser()<br>val username = user?.name // Safely accesses &#39;name&#39; property, no NPE</pre><p><strong>4. Chaining with Safe Calls</strong></p><p><strong><em>Swift</em></strong>: In Swift, you can chain multiple optional values using optional chaining. For example:</p><pre>let user: User? = getUser()<br>let addressStreet = user?.address?.street // Safely accesses &#39;street&#39; property</pre><p>In this example, if either user or address is nil, the result will be nil, preventing any crashes.</p><p><strong><em>Kotlin</em></strong>: Kotlin also supports chaining with safe calls.</p><pre>val user: User? = getUser()<br>val addressStreet = user?.address?.street // Safely accesses &#39;street&#39; property</pre><p>Just like in Swift, if user or address is null, the result will be null.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3321170313f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging Worlds: Exploring Kotlin for Swift Developers]]></title>
            <link>https://medium.com/@swapNighot/bridging-worlds-exploring-kotlin-for-swift-developers-2a61132549e6?source=rss-8a3c8ff3bf2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a61132549e6</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Swapnil Nighot]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 13:30:31 GMT</pubDate>
            <atom:updated>2024-02-10T11:32:50.427Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In the fast-evolving landscape of software development, the ability to adapt and embrace new technologies is crucial. Swift and Kotlin, two modern programming languages, have emerged as powerhouses in their respective domains — iOS/macOS/tvOS app development for Swift and Android app development for Kotlin. While they may target different platforms, Swift and Kotlin share a common lineage and a fundamental set of programming concepts that make them remarkably similar.</p><p>If you’re a Swift developer venturing into the realm of Kotlin, you’re already well-equipped to dive in. This article series, <em>“Bridging Worlds: Exploring Kotlin for Swift Developers,”</em> is designed to guide you through the process of transitioning your skills and mindset from Swift to Kotlin. I’ll leverage the analogies between these languages to accelerate your understanding of Kotlin’s syntax, principles, and best practices.</p><p><strong>Finding Familiar Ground:</strong></p><p>Both Swift and Kotlin have their roots deeply embedded in modern programming paradigms, and their designs reflect a focus on safety, expressiveness, and developer-friendliness. This inherent similarity makes it easier for Swift developers to grasp Kotlin concepts without starting from scratch.</p><p>In this series, I’ll draw parallels between the languages, highlighting corresponding concepts, language constructs, and design philosophies. For every Swift concept you’re familiar with, there’s likely a counterpart in Kotlin that serves a similar purpose. By recognising and understanding these parallels, you’ll be able to leverage your existing Swift knowledge as a launchpad into the world of Kotlin.</p><p><strong>The Journey Ahead:</strong></p><p>Over the course of this article series, I’ll cover a wide range of topics that resonate with Swift developers seeking to learn Kotlin:</p><ul><li><strong>Variables and Constants:</strong> Drawing parallels between Swift’s var and let and Kotlin’s var and val declarations. <a href="https://medium.com/@swapNighot/navigating-variables-and-constants-in-swift-and-kotlin-17723da4526a">Link</a>.</li><li><strong>Type System:</strong> Comparing Swift’s strong typing with Kotlin’s type inference and null safety. <a href="https://medium.com/@swapNighot/understanding-the-type-systems-in-kotlin-and-swift-3321170313f3">Link</a>.</li><li><strong>Functions and Lambdas:</strong> Exploring how functions and lambdas are defined, invoked, and utilised in both languages.</li><li><strong>Collections:</strong> Understanding the similarities and differences in handling arrays, lists, and maps in Swift and Kotlin.</li><li><strong>Object-Oriented Programming:</strong> Recognizing the shared concepts of classes, objects, inheritance, and interfaces.</li><li><strong>Concurrency and Asynchronous Programming:</strong> Exploring how Swift’s async/await relates to Kotlin’s coroutines.</li></ul><p>Each article will bridge the gap between Swift and Kotlin by building upon your existing Swift knowledge and demonstrating its equivalence in the Kotlin ecosystem. Our goal is to empower you to not only write Kotlin code but also comprehend and appreciate the language’s design principles.</p><p><strong>Conclusion:</strong></p><p>As you embark on this journey of exploring Kotlin through the lens of Swift, you’re investing in your versatility as a developer. The knowledge you gain from this series will not only allow you to contribute to Kotlin projects but also enhance your holistic programming acumen.</p><p>So, let’s begin this voyage of analogies and insights. Strap in as we traverse the shared landscape of Swift and Kotlin, unraveling the intricacies of each language while appreciating the common threads that tie them together. Welcome to <strong><em>“Bridging Worlds: Exploring Kotlin for Swift Developers.”</em></strong></p><p><strong>What Next:</strong></p><p>As part of this article series, please take a look at the first article titled “Navigating Variables and Constants in Swift and Kotlin.” You can find the article by following this <a href="https://medium.com/@swapNighot/navigating-variables-and-constants-in-swift-and-kotlin-17723da4526a">link</a>.</p><p>If you enjoy this article, kindly consider liking it and sharing your feedback. Your support and feedback will serve as encouragement for me to continue crafting further articles within this series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a61132549e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating Variables and Constants in Swift and Kotlin]]></title>
            <link>https://medium.com/@swapNighot/navigating-variables-and-constants-in-swift-and-kotlin-17723da4526a?source=rss-8a3c8ff3bf2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/17723da4526a</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Swapnil Nighot]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 13:25:51 GMT</pubDate>
            <atom:updated>2023-08-29T13:37:43.993Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>This article marks the beginning of the series <em>“</em><a href="https://medium.com/@swapNighot/bridging-worlds-exploring-kotlin-for-swift-developers-2a61132549e6"><em>Bridging Worlds: Exploring Kotlin for Swift Developers.</em></a><em>”</em> It serves as the inaugural piece introducing the series.</p><p>In the world of programming, variables and constants are the building blocks that enable developers to store and manage data. Swift and Kotlin, though designed for different platforms, share the same fundamental concepts of variables and constants. This article will delve into the nuances of these concepts in both languages, drawing parallels that will empower Swift developers to seamlessly transition to Kotlin.</p><p><strong>The Basics:</strong></p><p>In Swift, variables are declared using the var keyword, while constants use the let keyword. This distinction emphasises the mutability of variables and the immutability of constants. Kotlin employs a similar distinction with var for variables and val for constants.</p><p><strong>Swift Example:</strong></p><pre>var mutableValue = 10<br>let immutableValue = 5</pre><p><strong>Kotlin Example:</strong></p><pre>var mutableValue = 10<br>val immutableValue = 5</pre><p><strong>Type Annotations:</strong></p><p>Both Swift and Kotlin support type inference, but they also allow explicit type annotations. In Swift, type annotations follow the variable or constant name, separated by a colon. In Kotlin, type annotations are placed after the variable or constant name, separated by a colon.</p><p><strong>Swift Example:</strong></p><pre>var name: String = &quot;John&quot; <br>let age: Int = 30</pre><p><strong>Kotlin Example:</strong></p><pre>var name: String = &quot;John&quot; <br>val age: Int = 30</pre><p><strong>Type Inference:</strong></p><p>While explicit type annotations are possible, both languages encourage the use of type inference whenever possible. Swift and Kotlin determine the type of a variable or constant based on the assigned value, reducing redundancy and enhancing code readability.</p><p><strong>Mutable vs. Immutable:</strong></p><p>In Swift and Kotlin, variables (or mutable values) can be reassigned new values after their initial declaration, whereas constants (or immutable values) remain fixed once assigned.</p><p><strong>Swift Example:</strong></p><pre>var count = 3<br>count = 5 // Valid<br><br>let pi = 3.14<br>pi = 3.1415 // Error: Cannot assign to &#39;let&#39; value &#39;pi&#39;</pre><p><strong>Kotlin Example:</strong></p><pre>var count = 3<br>count = 5 // Valid<br><br>val pi = 3.14<br>pi = 3.1415 // Error: Val cannot be reassigned</pre><p><strong>Conclusion:</strong></p><p>Understanding the concept of variables and constants is essential in any programming language. In Swift and Kotlin, these concepts are foundational and share remarkable similarities. Whether it’s the declaration syntax, type annotations, or the distinction between mutability and immutability, the parallels between the two languages serve as a bridge, allowing Swift developers to seamlessly grasp the corresponding concepts in Kotlin.</p><p>In the next instalment of <em>“Bridging Worlds: Exploring Kotlin for Swift Developers,”</em> I’ll explore the intricacies of the type system in Swift and Kotlin, uncovering the ways in which both languages handle types, null safety, and type inference. Stay tuned as we continue our journey of analogies and insights into these two versatile programming languages.</p><p><strong>What next:</strong></p><p>If you enjoy this article, kindly consider liking it and sharing your feedback. Your support and feedback will serve as encouragement for me to continue crafting further articles within this series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17723da4526a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Apps CI/CD pipeline with GitHub Actions and Fastlane]]></title>
            <link>https://medium.com/@swapNighot/ios-apps-ci-cd-pipeline-with-github-actions-and-fastlane-14b03dafc375?source=rss-8a3c8ff3bf2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/14b03dafc375</guid>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Swapnil Nighot]]></dc:creator>
            <pubDate>Thu, 03 Mar 2022 20:40:06 GMT</pubDate>
            <atom:updated>2022-03-07T19:09:44.202Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is GitHub Actions ?</strong></p><p>GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline.</p><p>For more information please check the <a href="https://docs.github.com/en/actions">official document</a> of it.</p><p>Lets check, how we can use the GitHub Actions to automate the iOS app build process.</p><p>To compile and package the iOS applications you need the macOS system. GitHub provides Linux, Windows, and macOS virtual machines to run your jobs/ workflows using GitHub Actions.</p><p><strong>Create Sample iOS project</strong></p><p>Lets create the sample iOS project using Xcode by selecting the iOS App template.</p><p>Add appropriate Product Name, for this article I have added “GithubActionDemo”</p><p>Please select the “Include Tests” option to add the test target in our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4YCdd8Z1QW3H4EkD6c8QtA.png" /><figcaption>Xcode project setup</figcaption></figure><p>Click on the “Next” and complete the project setup. Once done you should be ready with “GithubActionDemo” project with white screen on the simulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJmXM4sJAME9Lw81GtcT-A.png" /></figure><p>Create new repository in your GitHub account and push this newly created project to the GitHub repository.</p><p><strong>What is fastlane ?</strong></p><p>It is the open source platform that is use to automate the development and release process of the iOS and Android apps. For more details please check <a href="https://fastlane.tools/">official documentation</a> of fastlane.</p><p><strong>Setup Fastlane locally</strong></p><p>Before moving on to the GitHub Actions, lets setup the Fastlane locally on development machine so that you can test the setup locally.</p><p>Fastlane can be installed in multiple ways, but since fastlane is the Ruby gem the preferred way to install is via <a href="https://bundler.io/"><em>Bundler</em></a><em>. </em>Bundler is the dependency manager for the Ruby projects.</p><p>Lets install the bundler and add fastlane as it’s dependency using following steps.</p><ul><li>Install the bundler by running gem install bundler command</li><li>Go to root directory of your project and create “Gemfile” using command touch Gemfile</li><li>Open newly created Gemfile and add fastlane dependency in it.</li></ul><pre>source &quot;https://rubygems.org&quot;<br>gem &quot;fastlane&quot;</pre><p>Run bundle install command. It will check the content of Gemfile and automatically installs the ruby packages in your machine. In this case it will install the “fastlane”</p><p>Push the “Gemfile” and “fastfile” to the GitHub repository.</p><p><strong>Create Fastfile</strong></p><p>In fastlane world, we have to create the Fastfile where we can define the different lanes for different automated tasks. For example we can have lane for running unit test cases, capturing screenshots, submitting beta apps, submitting App store builds etc….</p><p>For this article purpose we are going to create the simple lane for running the unit test cases.</p><ul><li>Lets create the “fastlane” folder in your projects root directory and create “fastfile” in it.</li></ul><pre>mkdir fastlane<br>cd fastlane<br>touch Fastfile</pre><ul><li>Add the lane in Fastfile to run the unit test cases, as below</li></ul><pre>lane :tests do<br> run_tests(scheme: &quot;GithubActionDemo&quot;)<br>end</pre><ul><li>To verify the local setup run the command bundle exec fastlane tests</li></ul><p>If everything setup correctly, It should compile your iOS project for simulator and run the unit test cases.</p><p>Now we have local setup ready, lets create the GitHub Actions flow to run the unit test cases on the CI environment.</p><p><strong>Create GitHub Actions workflow</strong></p><p>Workflow is the automated process where you define the process in YML file.</p><ul><li>Create .github/workflows folder in your projects root directory.</li><li>Create file github-actions-demo.yml inside the workflows folder, use below commands to do it.</li></ul><pre>mkdir .github<br>cd .github<br>mkdir workflows<br>cd workflows<br>touch github-actions-demo.yml<br>cd ..<br>cd ..</pre><ul><li>Open the newly created “github-actions-demo.yml” file and copy following content in it.</li></ul><pre>name: GitHub Actions Demo<br>on: [push]<br>jobs:<br>  Explore-GitHub-Actions:<br>    runs-on: macos-latest<br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v1<br>      - name: Run unit test case<br>        uses: maierj/fastlane-action@v2.2.0<br>        with:<br>        lane: tests</pre><p>In this workflow we have define the job with name “Explore-GitHub-Actions”, this will be triggered on very push to repository and run the unit test cases using fastlane.</p><p>Lets’s look at the workflow syntax line by line</p><p><strong><em>name</em></strong>: The name of the workflow</p><p><strong><em>on</em></strong>: To automatically trigger the workflow on the mentioned event, In this example [push], It indicates on every push to this repository it will trigger the workflow. We can configure this to be more specific also, for example for every push to “main” branch trigger this flow or when someone creates the PR trigger this workflow etc..</p><p><strong>jobs: </strong>The workflow is made up of one or more jobs, in this case we have created one job with name “Explore-GitHub-Actions”. You can see this name in Github UI in actions section. (Please see image below)</p><p><strong>runs-on</strong>: It is the name of the runner (virtual machine) where the job will be executing. Since we need mac OS for iOS build hence we choose “macos-latest”</p><p><strong>steps</strong>: These are steps executing on the virtual Mac machine. We have configured two step in this section as below</p><ol><li><strong>Checkout repository</strong>: It will checkout the code on the mac runner using the v1 version of the checkout action (actions/checkout@v1). <a href="https://github.com/actions/checkout">This action </a>is provided by the GitHub by default. There are other actions that you can use as per your requirement, please feel free to check the <a href="https://github.com/actions">documentation</a>.</li><li><strong>Run unit test case:</strong> It will install the fastlane on the runner and executes the lane “”tests”. It will use the version 2.2.0 of the fastlane-action provided by third party provider (maierj/fastlane-action@v2.2.0). There are several actions available on GitHub marker place. Please feel free to check it <a href="https://github.com/marketplace?type=actions">https://github.com/marketplace?type=actions</a>.</li></ol><p>Push the “github-actions-demo.yml” to the GitHub repository.</p><p>If everything configured correctly, it should trigger the new action and run the unit test cases on it.</p><p>You can check this in the “actions” section of your repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFREem1RaKXbkW5CfvK2YQ.png" /></figure><p>This is the basic tutorial to explain the various building blocks of the GitHub Actions and Fastlane. You can configure various workflows depending on your requirement using it.</p><p>Feel free to check the GitHub Actions / Fastlane documentation for more details.</p><p>Please add your comment if you have any questions/ suggestion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14b03dafc375" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>