如何将Giant项目Objective C转换为Swift [英] How to convert Giant project Objective C to Swift

查看:93
本文介绍了如何将Giant项目Objective C转换为Swift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行项目,它的确非常庞大,它包含将近1000个文件和4个Custom(自建)框架,以及将近10个其他通过Pods添加的框架. 我经历了将您的Objective-C代码迁移到Swift ,并且使用Swiftify迁移.

I've running project and its really gigantic, it contain almost 1000 files and 4 Custom (own built) framework and almost 10 others added via Pods. I've gone through Migrating Your Objective-C Code to Swift and also Migrate with Swiftify.

我开始按照Apple的建议逐个转换每个文件,但是第一次转换并没有成功完成Swiftify以及依赖问题.

I started to converting each file one by one as Apple suggest but first Conversion isn't successfully done by Swiftify and also dependency issues.

所以在这个位置上,我开始在撒哈拉沙漠中行走,那里看不到任何终点.

So at this position its looks like that I start walking in Sahara Desert, where I can't see any end point.

所以我需要一些建议,说明如何将这个庞大的项目转换为Swift?

So I need some suggestion how to convert to Swift this kinda huge scale project?

推荐答案

我最近将 SVProgressHUD 转换为使用 Swiftify 快速进行.可以在此处找到转换后的代码.

I recently converted SVProgressHUD to swift using Swiftify. The converted code can be found at here.

主要的收获是:

  1. 要一次维护一个文件开始代码转换 与目标C的互操作性,即已转换的swift文件 应该可以与您现有的Objective-C代码互操作.
  2. 选择一个没有子类且简单的类.
  1. To start the code conversion one file at a time maintaining interoperability with Objective C, that is the converted swift file should be interoperable with your existing Objective-C code.
  2. Pick a class which does not have subclasses and is simple.

详细的转换策略可以在此处.

The detailed conversion strategy can be found here.

这篇关于如何将Giant项目Objective C转换为Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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