Using Xcode 12.4 and Swift 5.3 I have defined a package using the Package.swift
manifest file. After including it in an app I want to update the package. To do that I have changed the link to the new release and updated the checksum; the relevant part of the file looks like this:
let package = Package(
name: "MyPackage",
// omitted platforms and products
targets: [ .binaryTarget( name: "MyPackage",
url: "https://artifactory/mypackage-v1.1.zip",
checksum: "..." ) ] )
However, I get the error message artifact of binary target 'MyPackage' has changed checksum; this is a potential security risk so the new artifact won't be downloaded
. This error can be ignored by deleting the entire DerivedData
on folder, but that's obviously not updating the version number. Another solution is suggested in this answer, but again it doesn't affect versioning. The official documentation writes extensively about dependent package versions, but I cannot find how to specify the version of the CURRENT package.
How can I legitimately specify and update the version number so the new artifact gets identified as a distinct new version and downloaded properly?