如何处理 Swift 包的依赖工件校验和?



使用Xcode 12测试版和swift工具5.3版,您可以链接到一个框架,如下所示:

.binaryTarget(
name: "Stripe",
url: "https://github.com/stripe/stripe-ios/releases/download/v19.3.0/Stripe.xcframework.zip",
checksum: "fe459dd443beee5140018388fd6933e09b8787d5b473ec9c2234d75ff0d968bd"
)

但当我需要更新校验和时(我错了(,我得到了

: artifact of binary target 'Stripe' has changed checksum; this is a potential security risk so the new artifact won't be downloaded

当我需要更改校验和时,我如何重置或覆盖它?

为了消除错误,您需要清除Xcode的本地包缓存。

在Xcode的"文件"菜单中,选择"Swift Packages",然后选择"Reset Package Caches">

最新更新