How to configure a Swift package registry

ARTIFACTORY: How to configure a Swift registry and resolve related errors

AuthorFullName__c
DaYoun Kang
articleNumber
000005481
ft:sourceType
Salesforce
FirstPublishedDate
2022-11-30T09:26:00Z
lastModifiedDate
2022-11-30
VersionNumber
2
Once you create a Swift repository from the Artifactory UI, we will need to configure the client in order to use it.

From your client, run the below command to set a Swift package registry:
swift package-registry set https://[ARTIFACTORY_URL]/artifactory/api/swift/[swift-repo-name]

When the above command is run, it will create a .swiftpm/configuration/registries.json file. You can verify this file to check if the registry is set correctly.

E.g:
{
  "registries" : {
    "[default]" : {
      "url" : "https://[ARTIFACTORY_URL]/artifactory/api/swift/[swift-repo-name]"
    }
  },
  "version" : 1
}