Fast And Stable Offline Conversions
We offer an Offline Converter for companies that want the best results. By allowing users to convert their code offline, we provide them with speed, stability, and security.
While running tests with large source files (2.6MB
.m files with 100,000 lines of code!) we noticed room for improvement in our converter. We got to work on providing speed and and stability, no matter the size of your project.
One thing that needed improvement during our conversion of large files was the performance. We’re happy to report an up to 40x performance improvement on large files. Take a look at the speed of converting a handful of ViewControllers:
Our initial tests on our 2.6MB source file resulted in failed conversions. We’ve fixed the errors and are now able to convert successfully.
Support for NS_TYPED_ENUM
Unrelated to our Offline Converter improvements, we also added support for
NS_TYPED_ENUM is used to represent a fixed set of possible values:
// Store the three traffic light color options as 0, 1, and 2.
typedef long TrafficLightColor NS_TYPED_ENUM;
TrafficLightColor const TrafficLightColorRed;
TrafficLightColor const TrafficLightColorYellow;
TrafficLightColor const TrafficLightColorGreen;
NS_TYPED_EXTENSIBLE_ENUM can be used to create an extensible set of possible values.
typedef TrafficLightColor TrafficLightCombo  NS_TYPED_EXTENSIBLE_ENUM;
TrafficLightCombo const TrafficLightComboJustRed;
TrafficLightCombo const TrafficLightComboJustYellow;
TrafficLightCombo const TrafficLightComboJustGreen;
TrafficLightCombo const TrafficLightComboRedYellow;
Both of these can now be converted to their expected Swifty equivalents: Swift structs to represent the constants!
Try out the conversion here: http://swiftify.me/3y0lv4
Do you have a need for our Offline Converter?
If you’d like to try it out yourself and hear some more about what we have to offer, we invite you to schedule a demo. We’d be happy to discuss the different possibilities for moving your project to Swift.
We hope you enjoy the improvements we’ve added. If you have any feedback, please leave it in the comments below!