Skip to main content
main-content

Über dieses Buch

This book builds on your knowledge of ActionScript to take you on to the fast track developing iOS apps with Apple’s latest language, Swift. Swift’s syntax is easier to understand than Objective-C for people already familiar with ActionScript. At the same time it offers a number of new features and richer expressiveness than both ActionScript and Objective-C.
Switching to a new platform usually involves migration on three levels: tools, workflow, and programming language. This book is structured as a guide that will help you on each level with step-by-step tutorials. Apart from the tutorials, it comes with recipes for some of the most popular mobile development topics: social network integration and messaging, taking advantage of device capabilities, networking and working with local and iCloud data, advertising in your app or game, and 2D and 3D graphics. The book also includes a final chapter that takes you through Apple’s App Store submission process. Don’t just build your apps, sell them.
What You Will Learn:
Expand your development knowledge to native iOS programming with SwiftUse the latest Xcode 7 IDEMigrate your existing ActionScript projects to Swift Create advanced UI, leverage the device hardware, integrate with social networks, take advantage of 2D and 3D graphicsDiagnose your app quickly with Xcode’s debugger and instrumentsPrepare and submit our iOS app in Apple’s App Store
Who This Book is For:
Migrating to Swift from Flash and ActionScript is for Flash and Adobe AIR developers who want to move on to native iOS programming with the latest Apple Swift language. It’s for the seasoned ActionScript programmer who is looking to add another language and platform to their tool belt quickly. Migrating to Swift from Flash and ActionScript is a good choice for developers who learn by doing and don’t have time to read thick manuals and books for beginners in order to start programming in a new language.

Inhaltsverzeichnis

Frontmatter

Tool Migration

Frontmatter

Chapter 1. Setting Up Your Environment

This chapter is all about setting up that workbench by sourcing, installing, and configuring the tools that you will need for native iOS development.
Radoslava Leseva Adams, Hristo Lesev

Chapter 2. Hello, Xcode!

We begin our journey into iOS development with Swift by making an app, for which you will not have to write a line of Swift code. . . . If you are a coder at heart, as I suspect you are, you probably can’t wait to get your hands on Swift and start making applications, rather than allow an integrated development environment (IDE) to create them for you.
Radoslava Leseva Adams, Hristo Lesev

Chapter 3. Introducing the Xcode Debugger

Having an integrated debugger is one of the best parts of using an integrated development environment (IDE). The easier and the more convenient a debugger is to use, the more regularly it will be put to work: without one you are shooting in the dark.
Radoslava Leseva Adams, Hristo Lesev

Chapter 4. Additional Development Tools

When you are done, you will have an app project, which is version-controlled and will have gained experience in profiling it.
Radoslava Leseva Adams, Hristo Lesev

Workflow Migration

Frontmatter

Chapter 5. “Hello, Swift!”—A Tutorial for Building an iOS App

Xcode and the iOS SDK encourage you to use certain software design patterns when structuring and implementing an app. We are about to have a look at these patterns and learn how to take advantage of them.
Radoslava Leseva Adams, Hristo Lesev

Chapter 6. Adding a More Complex UI

In this chapter we dig deeper in designing user interfaces (UIs) for iOS with Swift by making another app. There is a lot of ground to cover both on the UI front and on the language front. To make things easier, we will point out some of the Swift concepts that may look new or strange, explain them along the way, and let you know where you can find more information.
Radoslava Leseva Adams, Hristo Lesev

Chapter 7. Concurrency

Imagine that you share a house with three housemates: Alice, Bob, and Charles; the house is a mess and you want it cleaned up for your mother’s visit on the weekend. You could do it all yourself, starting with the kitchen, moving on to the bathroom, then the hallway, and so on.
Radoslava Leseva Adams, Hristo Lesev

Chapter 8. Debugging and Testing Your App

Migrating your workflow to Xcode and Swift would not be complete without an overview of the tools available to help you diagnose issues, debug and test your code.
Radoslava Leseva Adams, Hristo Lesev

Making Apps with Swift—Applied Examples

Frontmatter

Chapter 9. Communicating: E-mail, Text Messages, and Calls

In their early days mobile phones were used only for making calls and later on for sending short text messages. Today we don’t even call them phones any more: a mobile device is a computer that fits in your pocket.
Radoslava Leseva Adams, Hristo Lesev

Chapter 10. Getting Social: Posting to Facebook and Twitter

One of the significant events in the last decade was the rise of social networks. They transformed not only how we communicate with each other but also how ideas spread. If your app gives a compelling reason and an easy way for users to share thoughts and creations with their social network tribes, it can get the benefit of word of mouth and instantly be in front of the eyes of many more potential users.
Radoslava Leseva Adams, Hristo Lesev

Chapter 11. Knowing Your Location

It’s good to know where you stand. In this chapter—literally. A mobile app that helps you with that can be priceless: from being able to summon a taxi by just sending your location to the taxi company (useful when leaving drinking establishments in a not entirely verbal state) to finding your way to the family picnic before your cousins get to the marshmallows.
Radoslava Leseva Adams, Hristo Lesev

Chapter 12. Working with the Camera and Images

When cameras were added to mobile devices and image-editing apps started appearing, we were all transformed into artists overnight. Taking a photo of an interesting object, applying a filter, and immediately sharing the resulting creation is so easy, it would probably inspire Andy Warhol to recreate his Marilyn Diptych. On the following pages we will see how to take pictures with the camera and edit them with the power of Swift.
Radoslava Leseva Adams, Hristo Lesev

Chapter 13. Working with Data

Working with data is a big part of app development. Anything from storing user preferences and achievements to providing larger storage for the users’ artistic creations requires that you know how to work with data, how to store it locally, and how to offer your users the option to back it up in the cloud.
Radoslava Leseva Adams, Hristo Lesev

Chapter 14. Networking

Today most mobile applications are part of an ecosystem of different channels for presenting information to the user. Whether you are reading your e-mail or checking the weather forecast in a web browser, in a desktop client, or in a mobile app all the information and devices are connected via the invisible meta-space called Internet. In this chapter we will focus on how to connect to and retrieve information from a web service and load it into your app.
Radoslava Leseva Adams, Hristo Lesev

Chapter 15. Adverts and Push Notifications

Let’s be frank: making apps is fun, but it is also a business undertaking. And with the App Store flooded with beautifully crafted and free apps, a professional app developer faces the dilemma of how to balance providing value for users and keeping app prices competitive. In this chapter we address two aspects of the business of making apps: monetization and keeping in touch with users.
Radoslava Leseva Adams, Hristo Lesev

Chapter 16. Using the High-End Graphics APIs

The ability to play games was an amazing addition to the world of mobile devices. It unleashed developers’ imaginations and allowed users to solve puzzles, create and defend kingdoms, or relieve stress by throwing some really angry birds around.
Radoslava Leseva Adams, Hristo Lesev

Language Migration

Frontmatter

Chapter 17. Swift Language Basics

The first impression Flash developers usually share with us about Swift is “Oh, it’s almost ActionScript, isn’t it!” What they refer to is how readable syntax-wise a piece of Swift code is, compared to Objective-C, which used to be the typical choice when switching to native iOS programming. And they have a point: in contrast to transitioning to Objective-C, moving to Swift from ActionScript has a much lower entry point. Swift offers a lot more than that and in this chapter we will start unpacking its bag of goodies.
Radoslava Leseva Adams, Hristo Lesev

Chapter 18. Operators

We start our exploration of the Swift language with a look at the operators it offers. You will find that your ActionScript experience has prepared you for most of what’s to come in this chapter. The majority of operators look the same and follow the same syntax and rules for associativity and precedence you would expect.
Radoslava Leseva Adams, Hristo Lesev

Chapter 19. Types

Prepare for a relatively fast pace in this chapter. We will speed through topics related to types in Swift and delve in more detail into those that are likely to be less familiar to an ActionScript developer. The chapter starts with an overview of Swift’s type policy and goes briefly over some of its primitive types.
Radoslava Leseva Adams, Hristo Lesev

Chapter 20. Control Flow

We have so far covered types and operators in Swift and you know how to declare variables and constants. Now is time to go over how you can control the execution of your code. It’s all about loops, conditional statements, keywords for changing the course of action, and Christmas carols . . .
Radoslava Leseva Adams, Hristo Lesev

Chapter 21. Object-Oriented Programming Topics

In this chapter we will go over the object-oriented side of Swift. Having experience with ActionScript, you are already familiar with the object-oriented programming (OOP) paradigm. It treats a piece of software as a system, which is broken down into objects. Each object is responsible for a part of the system and looks after its own state.
Radoslava Leseva Adams, Hristo Lesev

Chapter 22. New and Different Concepts

In this chapter we open the door to four topics that either have no counterpart in ActionScript or that Swift redefines in a way that can make them seem new to an ActionScript developer. Enumerations and generics fall under the first category. Subscripts and closures, although present in ActionScript, are taken to a whole new level in terms of functionality and expressiveness. Curious? I was . . .
Radoslava Leseva Adams, Hristo Lesev

Chapter 23. Releasing Your App in the App Store

A book on iOS development would not be complete without an overview of the process of releasing your app. Being able to share it with users is the main goal of developing a mobile app, after all. Apple’s release process evolves and changes all the time, so it is important to keep in mind that by the time you read this some of the screens we show may have changed. The main ideas behind this multistep process come from the desire to ensure quality and security for the apps that make it into the App Store and this is what we would like you to take away.
Radoslava Leseva Adams, Hristo Lesev

Backmatter

Weitere Informationen

Premium Partner

BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.

Whitepaper

- ANZEIGE -

Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.
Jetzt gratis downloaden!

Bildnachweise