如何处理 Swift 包的依赖工件校验和? [英] How to handle a Swift Package's dependent artifact checksum?

查看:43
本文介绍了如何处理 Swift 包的依赖工件校验和?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Xcode 12 beta 和 swift-tools-version 5.3,您可以链接到一个框架,如下所示:

Using Xcode 12 beta and swift-tools-version 5.3, you can link to a framework, like this:

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

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

But when I needed to update the checksum (I had it wrong) I get

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

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

How can I reset this, or override it when I need to change the checksum?

推荐答案

为了摆脱错误,您需要清除 Xcode 的本地包缓存.

In order to get rid of the error, you need to purge Xcode's local package caches.

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

In Xcode's File menu, select 'Swift Packages' and then 'Reset Package Caches'

这篇关于如何处理 Swift 包的依赖工件校验和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆