<?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 Reza Akbari on Medium]]></title>
        <description><![CDATA[Stories by Reza Akbari on Medium]]></description>
        <link>https://medium.com/@rezaakbariiosdeveloper?source=rss-ad0ed701812------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*G9oJcpUF5IC02aht.jpg</url>
            <title>Stories by Reza Akbari on Medium</title>
            <link>https://medium.com/@rezaakbariiosdeveloper?source=rss-ad0ed701812------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 14:17:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rezaakbariiosdeveloper/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[Swift Package Registry: A Practical Guide for iOS and Swift Developers]]></title>
            <link>https://medium.com/@rezaakbariiosdeveloper/swift-package-registry-a-practical-guide-for-ios-and-swift-developers-307d3ab86477?source=rss-ad0ed701812------2</link>
            <guid isPermaLink="false">https://medium.com/p/307d3ab86477</guid>
            <category><![CDATA[artifactory]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[package-registry]]></category>
            <category><![CDATA[swift-package-manager]]></category>
            <dc:creator><![CDATA[Reza Akbari]]></dc:creator>
            <pubDate>Fri, 15 May 2026 09:32:44 GMT</pubDate>
            <atom:updated>2026-05-15T09:32:44.013Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Stop waiting on Git clones. There’s a better, faster, and more reliable way to manage your Swift dependencies.</blockquote><p>Swift Package Manager (SwiftPM) has become the de‑facto way to manage dependencies in Swift and iOS projects, but cloning entire Git repositories for each package can slow down onboarding and continuous integration (CI). A <strong>Swift Package Registry</strong> lets you download versioned archives instead of cloning Git histories. This guide walks through each step of migrating your project to a registry‑based workflow in an approachable, teacher‑like way.</p><h3>What Is Swift Package Registry?</h3><p>Swift Package Registry is a standard web service interface that SwiftPM can use to resolve and download packages, introduced through <a href="https://github.com/swiftlang/swift-evolution/blob/main/proposals/0292-package-registry-service.md">SE-0292</a>.</p><p>With a registry, a package dependency is declared by <strong>identifier</strong> instead of URL. Here’s what the migration looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxNl244N-FXfQHaXUia5LA.png" /><figcaption><strong>Before</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xyq0kup7socATPKqGEW8GA.png" /><figcaption><strong>After</strong></figcaption></figure><p>The identifier format is simple: scope.package-name. For GitHub-hosted packages, this maps naturally:</p><pre>// github.com/{organization}/{repository}<br>// becomes:<br>// {organization}.{repository}<br><br>apple.swift-log<br>pointfreeco.swift-composable-architecture<br>vapor.vapor</pre><h3>How SwiftPM Talks to a Registry</h3><p>You don’t need to understand every server endpoint, but here’s the high-level flow once you have a registry configured:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zDR4y6xnUiWPe-FsgVBZA.png" /></figure><h3>Configure SwiftPM to Use a Registry</h3><p>SwiftPM looks up registries in a configuration file located at either the project level (.swiftpm/configuration/registries.json) or user level (~/.swiftpm/configuration/registries.json). Creating this file is easy with the <strong>swift package-registry set</strong> command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Op4TkU9uH0xo3YyjlxCL9g.png" /></figure><h3><strong>Resolve Dependencies</strong></h3><h3>1. Swift Package</h3><p>Run:</p><pre>swift package resolve</pre><p>With the default command, some dependencies may still be resolved from source control. For migration mode, use:</p><pre>swift package --replace-scm-with-registry resolve</pre><blockquote><strong>Important: Mixed Git and Registry Graphs Need One Clear Rule</strong></blockquote><p>A package graph can contain both Git URL dependencies and registry dependencies.</p><p>However, SwiftPM treats different origins as different packages.</p><p>For example:</p><blockquote><em>apple.</em>swift-log<em><br>https://github.com/apple/</em>swift-log</blockquote><blockquote>These may be resolved as two separate packages, even if they refer to the same real package.</blockquote><p>This can cause duplicate packages or symbol conflicts.</p><h4>Choose One Migration Mode</h4><blockquote><strong>A. Default</strong></blockquote><pre>--disable-scm-to-registry-transformation</pre><p>Git dependencies remain Git dependencies. Registry dependencies remain registry dependencies.</p><blockquote><strong>B. Deduplicate Only</strong></blockquote><pre>--use-registry-identity-for-scm</pre><p>SwiftPM uses the registry identity for matching Git dependencies, but still downloads them from Git.</p><blockquote><strong>C. Prefer Registry</strong></blockquote><pre>--replace-scm-with-registry</pre><p>SwiftPM uses the registry when available and falls back to Git when the package is not found.</p><p>For a pure Package.swift project, this is usually the simplest option.</p><pre>swift package --replace-scm-with-registry resolve</pre><h3>Important<strong> tip</strong></h3><p>This flag works in the CLI. If you need to resolve packages using the Xcode UI, you should set the Xcode default flag:</p><pre>defaults write com.apple.dt.Xcode IDEPackageDependencySCMToRegistryTransformation useRegistryIdentityAndSources</pre><h3>2. Xcode Project</h3><p>For a plain .xcodeproj, Xcode stores SwiftPM configuration inside the workspace data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KgVLkvewNYef6KJ0LUwdA.png" /></figure><p>You must create registries.json manually, then open Xcode::</p><pre>cat &gt; configuration/registries.json &lt;&lt;&#39;EOF&#39;<br>{<br>  &quot;registries&quot;: {<br>    &quot;[default]&quot;: {<br>      &quot;url&quot;: &quot;http://127.0.0.1:8080&quot;<br>    }<br>  },<br>  &quot;version&quot;: 1<br>}<br>EOF</pre><p>In Xcode: open <strong>Package Dependencies</strong>, remove the old URL package, and add it back using the registry identifier (e.g. pointfreeco.swift-composable-architecture).</p><blockquote>Xcode may not automatically convert existing Git URL packages. If it keeps using the old URL, remove it and re-add using the registry identity.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wh5I6adbNBqK-jtwvH_cYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4n-gsKUXEDWx7ps-Do6Zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XdDXq-XqHierEXODJxjojA.png" /></figure><h3><strong>Done.</strong></h3><p>All packages are now resolved from my local registry service.</p><p>For Terminal/CI, use the xcodebuild SCM transformation flag:</p><pre>xcodebuild -resolvePackageDependencies -packageDependencySCMToRegistryTransformation useRegistryIdentityAndSources</pre><h3>3. Tuist</h3><p>Tuist already supports registries in its own setup. Read more here:<br><a href="https://tuist.dev/en/docs/guides/features/registry">https://tuist.dev/en/docs/guides/features/registry</a></p><h3>Choosing a Registry: Tuist, Artifactory, or Self-Hosted</h3><ol><li><strong>Tuist</strong></li></ol><p>The only free public Swift Package Registry service I personally know of today is <a href="https://tuist.dev/en/docs/guides/features/registry">Tuist Registry</a>.</p><pre>swift package-registry set https://tuist.dev/api/registry/swift</pre><p>This is the easiest way to try Swift Package Registry without running your own server.</p><p>But there is one important thing to keep in mind: <strong>Tuist may not have every dependency or every version you need.</strong> It is great for many popular open-source packages, but you should still test your dependency graph before migrating a real project.</p><p>2. <strong>Artifactory</strong></p><p>If you need something more enterprise-friendly, you can use an artifact repository manager like <a href="https://docs.jfrog.com/artifactory/docs/swift-repositories">JFrog Artifactory</a>.</p><p>JFrog supports Swift repositories, including local repositories for hosting your own packages and virtual repositories that can act as a single access point for your team’s dependencies. Their Swift repository docs describe Artifactory as a way to store, manage, and distribute Swift packages.</p><p>3. <strong>Self-Hosted Registry — Maximum Control and Local Speed</strong></p><p>The third option is to self-host a Swift Package Registry.</p><p>One implementation worth knowing about is <a href="https://github.com/CrowdStrike/swift-package-registry-service">CrowdStrike/swift-package-registry-service</a>. It implements the Swift Package Registry Service and proxies the GitHub API.</p><p>Important note: This repository is archived and read-only, so I would treat it more as a useful reference or starting point than a ready-to-adopt production dependency.</p><p>I forked it into our team’s repository, dockerized it, and made it easy to run in production.</p><blockquote><a href="https://github.com/BluiOS/swift-package-registry-service">https://github.com/BluiOS/swift-package-registry-service</a></blockquote><h3>REFERENCES</h3><ul><li><a href="https://github.com/swiftlang/swift-evolution/blob/main/proposals/0292-package-registry-service.md">SE-0292: Package Registry Service</a></li><li><a href="https://github.com/swiftlang/swift-package-manager/blob/main/Documentation/PackageRegistry/PackageRegistryUsage.md">SwiftPM Package Registry Usage</a></li><li><a href="https://tuist.dev/en/docs/guides/features/registry">Tuist Registry Documentation</a></li><li><a href="https://forums.swift.org/t/package-registry-support-in-xcode/73626">Swift Forums: Package registry support in Xcode</a></li><li><a href="https://docs.jfrog.com/artifactory/docs/swift-repositories">JFrog Artifactory — Swift Repositories</a></li><li><a href="https://github.com/CrowdStrike/swift-package-registry-service">CrowdStrike Swift Package Registry Service</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=307d3ab86477" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>