gpt4 book ai didi

swift - 具有多个目标的 Xcode Swift 4.2 迁移

转载 作者:可可西里 更新时间:2023-11-01 00:54:33 24 4
gpt4 key购买 nike

我的项目有多个目标。更新 Xcode 后,我选择执行 Swift 迁移到最新版本。我成功地执行了迁移,但事实证明它只针对一个目标。

所以我遵循了本迁移指南底部的说明:https://swift.org/migration-guide-swift4

If you have multiple schemes in your project that cover different targets, you will only get notified that you need to migrate one of them. You will need to manually select the new scheme, then run Edit -> Convert -> To Current Swift Syntax to migrate the remaining schemes.

但是,我收到一个错误:

enter image description here

但是,由于我执行了迁移并且目标共享文件,我现在有大量错误阻止我成功构建。

我不知道如何进行。

最佳答案

我遇到了同样的问题,但是 migration guide实际上提到了这个问题的另一种解决方案。

If you have multiple schemes in your project that cover different targets, you will only get notified that you need to migrate one of them. You will need to manually select the new scheme, then run Edit -> Convert -> To Current Swift Syntax to migrate the remaining schemes. Or you can create a scheme that includes all the targets from your project, and have it selected before running the migration assistant.

因此,继续创建一个新方案。它只会让您在创建目标时添加一个目标。然后编辑该新方案并添加您拥有的其余目标。使用迁移工具同时迁移所有目标。完成后删除您创建的方案。

关于swift - 具有多个目标的 Xcode Swift 4.2 迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52542645/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com