Migrating from AS3 to Swift

As iOS 11 no longer supports 32 bit apps, I’ve been revisiting an old app that was built in Flash/ActionScript3 (and packed in 32 bit) and decided it was an opportune moment to migrate it to native iOS Xcode/Swift. Migration was quite an interesting experience, and ultimately gave me a new appreciation for Xcode/Swift, especially auto-layout, size classes, enums and type-strictness.

In general, the app looks and acts virtually identically to its predecessor. Here is the main menu for you:

beforeAfter1.jpg

But in some cases, a change was necessary. As Flash did not have access to native controls, a custom solution was used using a Starling framework called Feathers. Of course from Xcode/Swift native controls were available. I used form builder Eureka to build this up. Here’s the difference:

beforeAfter3.jpg

Charts looked a little differently too. Charts in Flash used a long-dead yahoo framework called Astra. Charts now use Daniel Gindi’s huge Charts framework, which adds some pretty cool features such as pinch to zoom and drag. Here’s the difference:

beforeAfter4.jpg

One problem that I wasn’t able to resolve was detecting data from the old version of the app in new version of the app. I couldn’t find technical information on how Air’s SharedObject was implemented, so unfortunately data has to be reset from this version. Still, better than the app simply not working!

If you’re interested in checking out the new version of the app, you can find it here.

 

 

 

Interactive developer, Author - iOS development with Swift - book coming 2017 https://manning.com/books/ios-development-with-swift

Tagged with:
Posted in AIR, Flash, Swift

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: