![]() ![]() Also, the number of errors does increase as you go, as the compiler can reach more and more parts of the code.Īt their simplest, compile errors in the converted code would be things like missing argument labels in function calls. It’s a bit numbing, but finally getting to that point with no errors feels pretty good, even though the project doesn’t still doesn’t actually work by the end of it. You tend to find a few recurring patterns that you just continuously fix over and over again. Getting the code to compile was very similar to any code porting project. You’re still manually porting code, just from broken to working SwiftĪs for the generated Swift code, I started with over 280 errors and warnings to chomp through. I had plenty of errors logged on the website during the Swiftify conversion, and this resulted in a hefty amount of work just to get the darn thing to compile. ![]() I’m not really sure where they got that 90% figure from on the website, but what I got back for Spectacle seemed pretty far away from it. This is where things actually get interesting. So you download the converted Swift sources and you’re pretty much good to go, right? Well, not quite. If you’re extremely lucky, you won’t see any errors logged on site for the conversion. I hate installing software when it’s not necessary, especially plugins, so cut the corners and just upload a zip of your source to via the website. The Swiftify team has provided us with a plethora of avenues to take for executing the conversion, and I think at the end of the day all of them just upload code to their servers and spit the results out. The $30 subscription for 1 month was as much as I wanted to spend, which is actually a pretty cheap gamble when you’re looking at potentially saving several hours of your life. Of course, there’s other options, including paying the Swiftify team to convert your code for you. I paid $3 for a small one-class conversion outside of the subscription. I recommend trying out the pay as you go method first, as they give you an automated price tag before you have to pay anything. 10MB of source code is actually a rather generous amount if you’re in it for converting small projects. You can cancel the subscription at any time, and still use the service until 1 month is over or you’ve reached the 10MB limit. Additionally, I’d be able to convert a few odds and ends projects and maybe get my money’s worth. For me, I figured that if I messed up and needed some extra files converted, I’d rather just have paid $30 than potentially more. Compare that with the monthly subscription of $30 for up to 10MB of files. Spectacle source files were about 55KB zipped (370KB unzipped), and converting via pay as you go was around $18 if I remember right. The pay as you go is based on the size of the files that are uploaded to be converted. To convert a project, your simple options are a pay as you go or a subscription. Swiftify PricingĪs you’d probably expect from a service like this, it can be a little tricky to figure out how much it costs to just convert a project without finagling around a little bit on their site. Swiftify checked all of those boxes, and the website says it can get you 90% of the way there. I couldn’t get iSwift to convert an entire project at once to Swift, and it didn’t port to the latest version of Swift (not a dealbreaker for me, but still). I tried out the trial of iSwift, but it doesn’t appear to be maintained. Even if a service only got me half the way there, I figured I would save significant time.Īt the time of this writing there’s really only one service I found that looked to be worth using: Swiftify. Because of time constraints, I knew this wasn’t something I wanted to do. Chances are that if you’re reading this, you already know that’s not a path you want to go down. If doing it yourself seems crazy, pay a serviceĭepending on the codebase, how much time you have, and your ObjC dev chops, manning up and doing a full manual port of your ObjC code will more than likely give you the best results. The port ended up being more of a rewrite of the app, and I open sourced it and released it as Rectangle. ![]() In order to add window management to the Multitouch app, I recently decided to port the popular Spectacle app from ObjC to Swift. Despite reading a lot of ObjC code and writing some, I still prefer to have all my code in a Swift project be written in Swift. I didn’t start out as an ObjC developer, but every example I came across was written in ObjC and I reluctantly forced myself to learn it. When I first started writing in Swift, version 2.0 of the language had just been released. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |