“Migrating to Swift from Flash and ActionScript”
a new book by the DiaDraw Team and Apress
Download a free book sample
Help us spread the word to all corners of the Flash and AIR world and get the first chapter for free.
This is great – just what I need. It helps me understand Swift from an AS3 background, but it also gets me through the necessary environment / tools plumbing and shows me how to use the neat things iOS can do. It’s detailed, expert, and wry enough to make me smile. Top.
Not a typical Swift book
Most books on Swift fall into one of two categories:
A) Introductory books on programming for those who have chosen Swift as a first programming language.
B) Books for Mac OS and iOS developers, who are transitioning to Swift from Objective-C.
You, as a Flash or AIR developer, are ahead of both of these groups. You don’t need to start from scratch or try to understand Swift from Objective-C point of view. Instead, build on yourActionScript experience – an OOP language, which looks very much like Swift.
“Migrating to Swift from Flash and ActionScript” is the first book that lets you take advantage of your skills and pays specific attention to things that may surprise an ActionScript developer.
We don’t like traditional migration guides. So we have broken the mould in a few ways:
- No massive project to port.
We don’t want you to invest precious time reading the book cover-to-cover before you can start coding your apps with Swift. Start with the chapters that are most relevant to you first: each chapter comes with a self-contained tutorial that can be coded in about an hour and doesn’t require you to have done all of the previous tutorials.
- Lazer-sharp focus on each level of migration.
We know that being versed in ActionScript, you will probably find that you begin to use and adapt to Swift with relative ease. The usual sources of frustration for Flash developers are: tackling Xcode and all its paraphernalia, getting your devices and test accounts in line and adopting a new workflow.
- Support with submitting your apps to Apple’s App Store.
Try to find that in another migration guide…
- No boredom.
We have spent enough time snoozing with thick programming books. So we’ve sprinkled little Easter eggs for you here and there. See if you can find them.
What’s in the book?
Part I: Tool Migration
We help you configure your environment and development devices so that you are on your way to making your first app with Swift.
Part II: Workflow Migration
This part walks you through the main parts of the programming workflow and shows you how to structure your user interface and use Xcode’s help with layout, how to take advantage of concurrency and how to use the debugger and automated testing tools. Apart from Chapter 8, which builds on the example of the preceding chapter to demonstrate debugging and testing techniques, the rest of the chapters come with self-contained tutorials.
Part III: Making Apps with Swift: Tutorials
This is probably the most fun part of the book. It offers a series of tutorials that cover a lot of common scenarios you may want to include in your apps. Here you build twelve self-contained practical apps and learn how to:
- – Send e-mail, SMS and make phone calls from your application.
- – Post to social networks.
- – Use the motion sensors and show a user’s location on a map.
- – Take photos, manipulate them and communicate with the photo gallery.
- – Work with local data and iCloud.
- – Connect to and communicate with network services.
- – Monetize your apps with advertisements and stay in touch with your users through push notifications.
- – Build 2D and 3D games with iOS SDK’s graphics frameworks.
Part IV: Language Migration
This part was the most fun for us to write. In it we have tried to distill the main ideas that underpin the Swift programming language: it encourages you to be concise and at the same time forces you to be explicit and take maximum advantage of the compiler in order to ensure correct code. We outline things that are similar with ActionScript and delve into concepts that are different or new in Swift.
Bonus Chapter: Publishing your app in the app store
The point of making an app is to share it with the world and allow millions of users to enjoy your creation. Apple’s process for releasing apps in the App Store, however, is far from intuitive. We thought that a book that that shows you how to create apps for iOS devices would not be complete without a walk through this process and some tips on how to keep it as smooth as possible.
Is the source code online?
Yes, it is! You can find it here: https://github.com/apress/migrating-to-swift-from-flash
And, guess what… It’s free, you don’t even have to have the book to download it. It will make a lot more sense when you have the book open in front of you, of course.