• Complain

Liao - Migrating to Swift from Android

Here you can read online Liao - Migrating to Swift from Android full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: Apress, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Liao Migrating to Swift from Android
  • Book:
    Migrating to Swift from Android
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2014
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Migrating to Swift from Android: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Migrating to Swift from Android" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

In 250 pages, Migrating to Swift from Android gives youas an experienced Android app developerall you need to create native iOS apps using the latest Swift programming language. Starting with preparing your Xcode 6.1 IDE and introducing just enough iOS application framework fundamentals, youll understand how to create meaningful Swift applications for iOS 8 immediately.

After the short IDE setup guide, this book continues by providing guidance on how to translate your existing Android apps to iOS. Every topic comes with a tutorial project; youll plan and structure your iOS apps following a typical top-down process using Xcode Storyboards. To implement use cases, youll cover common mobile topics, including user interfaces, managing data, and networking with remote services. As you move through Part 2 of this book, youll create simple and meaningful iOS apps with rich UI components to handle common CRUD operations locally and remotely.

Part 3 demonstrates the whole porting process by translating a typical mobile app from Android to iOS 8 from start to finish. When you finish reading Migrating to Swift from Android, youll be an iOS developer as well as an Android developer. And, you will be fully convinced you can create iOS apps just like you do in Android. In most cases, it is a waste not to port your native Android apps to iOS.

Migrating to Swift from Android — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Migrating to Swift from Android" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

Chapter

Setting Up the Development Environment

It is more fun to see apps run than to read the source code, and you cannot get hands-on programming experience by just reading books. Lets get the development environment up and running first so you can use itand learn Swift programming for iOS along the way.

Xcode and the iOS SDK

ANDROID ANALOGY

The Android Developer Tools (ADT plug-in for Eclipse or Android Studio.

Xcode is the complete toolset for building iOS apps. It is an integrated development environment (IDE) that helps you build, test, debug, and package your iOS apps. It is free but you must have an Intel-based Mac running Mac OS X Mavericks or later. You will use the latest Xcode, version 6, throughout this book.

Installing from the Mac App Store

Xcode is distributed in the Mac App Store shows Xcode in the Mac App Store app.

Xcode in Mac App Store All you need to do is install the latest Xcode from - photo 1

. Xcode in Mac App Store

All you need to do is install the latest Xcode from the Mac App Store. After completing the installation, go ahead and launch Xcode from the Applications folder. Keep it in the Mac OS Dock so that you can launch it at any time.

The first time you launch Xcode, it immediately prompts you to install the required components (see ). Click Install to complete the Xcode installation.

Install the required components After the required components are installed - photo 2

. Install the required components

After the required components are installed, you should see the screenshot in . Your iOS IDE, Xcode, is ready!

Welcome to Xcode Create an iOS Project Using the Template ANDROID ANALOGY - photo 3

. Welcome to Xcode

Create an iOS Project Using the Template

ANDROID ANALOGY

New Android Application Project template in ADT.

Youve got the right tool; now, wouldnt you like to see some real actionlike creating an iOS app and seeing it run? Id like that, too! You want to do this to ensure your IDE is working properly as well.

I actually created my very first Android app using the ADT New Android Application Project template when I had no idea how to create Android mobile apps. All I wanted was to see something running in no time. Yep, ADT did it for me nicely. I was very happy with myself when I felt Id created an Android app without knowing anything! Hey, theres nothing wrong with making yourself happy, right?

Xcode offers the same thing. The objective of this section is to show you how to create an iOS app as quickly as possible. Hold any programming questions so you can finish the project as fast as you can. For now, complete the following steps:

  1. Launch Xcode if you havent launched it yet.
  2. Select Create a new Xcode project from the Welcome to Xcode screen (see shows the prompt that asks you to choose a template for your project:
    1. In the left panel of , select iOS Application In the right panel of you may choose any of the templates Just - photo 4 Application.
    2. In the right panel of , you may choose any of the templates. Just for fun, choose Game.
    3. Click the Next button.

      depicts the basic project info that requires you to fill in the following - photo 5

  3. depicts the basic project info that requires you to fill in the following:
    1. Product Name: This is the app name. Name your project LessonOne .
    2. Organization Name: Optional; for example, Your organization or any name you choose.
    3. Organization Identifier: Together with the product name, the organization identifier should uniquely identify your app. Reverse domain name is recommended (e.g., com.yourdomain.xxx ).
    4. Language, Game Technology, and Device: You dont need to change these settings.
    5. Click the Next button when done.
    6. Select a folder in which to save your LessonOne project.

      That is it You just created an iOS project the LessonOne project as shown in - photo 6

That is it! You just created an iOS project, the LessonOne project as shown in .

The LessonOne project can be seen on the left-hand side panel as shown in - photo 7

The LessonOne project can be seen on the left-hand side panel as shown in ; this is the Project Navigator in the navigation area. Just as when you use ADT project creation templates, the Xcode project template creates the project folder, the application source code, and all the resources for building the LessonOne apps.

Build the Project

ANDROID ANALOGY

The Eclipse ADT Build action keyboard shortcut on the Mac is the same as the build command in Xcode: Command+B (z+B). In Windows the Eclipse build shortcut is Control+B.

To build and compile the Xcode project, use the Build action, which is located in the Xcode menubar Picture 8 Product Picture 9 Build (or z+B). You will get used to using the z+B keyboard shortcut a lot because Xcode doesnt automatically build your code, unlike Eclipse ADT, which builds it automatically by default.

Launch the App

The LessonOne project should have no errors. You can launch the app and see it run on an iOS emulator. The emulator is a very important piece of any IDE. Unlike ADT, there is no need to mess with something like AVD Manager to create an emulator. All the emulators are right there in Xcode and you can launch the LessonOne project onto the selected device, including the iOS emulator, with a click on the triangle button in the upper left corner as shown in .

Alternatively, you may use an Xcode keyboard shortcut key for the Run action, Command+R (z+R), to launch the app. You should see your LessonOne app.

LessonOne app in Emulator Play with the app and then select other emulators - photo 10

. LessonOne app in Emulator

Play with the app, and then select other emulators from the device emulator selector (see the pointer in ). A mouse-click event on an emulator is equivalent to a touch event, and three-finger movement on the trackpad is equivalent to touch-drag on a physical iOS screen. If you dont have a particular device yet, definitely play with the emulator to get familiar with the emulated iOS devices.

Tip To change to landscape or portrait orientation, press z+left arrow or right arrow to rotate the emulator.

The iOS emulators are way better than AVDvery robust and responsive, and they behave just like real devices. For learning Swift programming for iOS, the emulator actually is better, as iOS developers use emulators much more frequently than Android developers. In this book, you are not required to run apps on a physical iOS device; for that you would need to be a registered iOS developer and an iOS device. You can save the $99 iOS developer membership fee until you are ready to submit your first app to the App Store or if your app requires certain features not available in the emulator (e.g., the camera or certain sensors). For now, if your app is launched and running on an iOS emulator, your mission is completed!

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Migrating to Swift from Android»

Look at similar books to Migrating to Swift from Android. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Migrating to Swift from Android»

Discussion, reviews of the book Migrating to Swift from Android and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.