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

标签 swift xcode migration

我的项目有多个目标。更新 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/

相关文章:

swift - 在 Swift 中解析问题/预期 CGFloat 的类型

ios - Xcode Swift EXC_BAD_INSTRUCTION

ios - 在自定义 UIButton 子类上添加带圆角的阴影层

xcode - 我如何告诉我的 UITextField(代码)放弃第一响应者?

iphone - 调整图像大小而不损失其质量

ios - 用可选的问号赋值

iphone - iPhone 上的自动化接口(interface)测试

c# - 为什么使用 ArcGIS 9.3 对象编写的程序在升级到 ArcGIS 10 后不再运行?

java - Java8 中的 RoundingMode.HALF_DOWN 问题

ios - 如何将 Swift 3.0 编译的 POD 应用到 2.2 的项目中?