{
  "version": "https://jsonfeed.org/version/1",
  "title": "git on Joe Sherwood",
  "icon": "https://cdn.micro.blog/joesh/avatar.jpg",
  "home_page_url": "https://joesh.micro.blog/",
  "feed_url": "https://joesh.micro.blog/feed.json",
  "items": [
      {
        "id": "http://joesh.micro.blog/2024/06/14/swift-package-manager.html",
        "title": "Swift Package Manager Dependency from a Standalone Git Repository with SSH",
        "content_html": "<p>Adding a <strong>Swift Package Manager</strong> dependency to an <strong>Xcode 15</strong> project can easily be done when the source is <strong>Apple Swift Packages</strong> or via an Xcode account connection to the likes of <a href=\"github.com\">Github</a> or <a href=\"gitlab.com\">GitLab</a>. However, one can also be sourced from a standalone <code>git</code> repository over <code>ssh</code>, albeit in a non-obvious way.</p>\n<p><img style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https://cdn.uploads.micro.blog/1234/2024/add-package-dependencies-pane.png\" alt=\"Empty Xcode 'Add Package Dependencies...' pane\" title=\"spm-add-package-dependencies-pane.png\" border=\"0\" width=\"600\" height=\"371\" /></p>\n<p>Intuitively, one would think the <code>+</code> in the bottom left corner of this pane would be the place to try. Though that just allows for adding accounts to 3rd party hosting services. The <code>Add Local...</code> button, as its name implies, only works for instances of a dependency stored locally on the machine.</p>\n<p><img style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https://cdn.uploads.micro.blog/1234/2024/search-ssh-path.png\" alt=\"Add a ssh:// path to the git repository in the search field.\" title=\"spm-search-ssh-path.png\" border=\"0\" width=\"600\" height=\"371\" /></p>\n<p>The trick is to add the custom <code>url</code> to what appears to be a search box in the upper right, which will fetch the desired dependency. It is labelled <code>Search or Enter Package URL</code>, so this does appear to be the intended usage. Even so, I have figured this out, to subsequently forget it the next time I’ve needed it, so many times that I’m leaving this breadcrumb for future me to find.</p>\n<p><img style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https://cdn.uploads.micro.blog/1234/2024/add-package.png\" alt=\"Configure package sourced from custom git repository URL.\" title=\"spm-add-package.png\" border=\"0\" width=\"600\" height=\"152\" /></p>\n<p>After this search step, the package behaves like any other, which certainly was the goal all along.</p>\n",
        "date_published": "2024-06-14T22:47:09-05:00",
        "url": "https://joesh.micro.blog/2024/06/14/swift-package-manager.html",
        "tags": ["photo","dev","git","spm","ssh","xcode"]
      }
  ]
}
