Swift 2 Blueprints

Book description

Sharpen your skills in Swift by designing and deploying seven fully functional applications

About This Book

  • Develop a variety of iOS-compatible applications that range from health and fitness to utilities using this project-based handbook
  • Discover ways to make the best use of the latest features in Swift to build on a wide array of applications
  • Follow step-by-step instructions to create Swift apps oriented for the real world

Who This Book Is For

If you are a competent iOS developer who wants to develop stunning applications with Swift, then this book is for you. Familiarity with Swift programming is assumed.

What You Will Learn

  • Get to grips with the basics of Xcode and Swift for application development
  • Create a Photo Sharing application to capture an image, edit it using different features and share it via social media.
  • Develop applications using the WatchKit and exchange data between iPhone and the Watch
  • Use advanced features such as SpriteKit to build a game
  • Install third-party Swift frameworks to improvise on your application development
  • Discover how to simulate home automation with HomeKit
  • Build an application to monitor the user's weight, heart rate and the number of steps for Health Historic Analysis
  • Manipulate media using AVFoundation framework to merge audio and video.

In Detail

In this book, you will work through seven different projects to get you hands-on with developing amazing applications for iOS devices.

We start off with a project that teaches you how to build a utility app using Swift. Moving on, we cover the concepts behind developing an entertainment or social networking related application, for example, a small application that helps you to share images, audio, and video files from one device to another. You'll also be guided through create a city information app with customized table views, a reminder app for the Apple Watch, and a game app using SpriteKit.

By the end of this book, you will have the required skillset to develop various types of iOS applications with Swift that can run on different iOS devices. You will also be well versed with complex techniques that can be used to enhance the performance of your applications.

Style and approach

This book takes a step-by-step approach to help you build apps from scratch and learn the methodology to develop real-time applications using Swift.

Table of contents

  1. Swift 2 Blueprints
    1. Table of Contents
    2. Swift 2 Blueprints
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Exploring Xcode
      1. Keyboard shortcuts
      2. Versioning your project
      3. Testing with Playground
      4. Debugging
      5. New Swift features
      6. Some final comments
      7. Summary
    9. 2. Creating a City Information App with Customized Table Views
      1. Project overview
      2. Setting it up
      3. The first scene
      4. Displaying the cities' information
      5. Coding the initial view controller
      6. Adding the page view controller
      7. Displaying the Wikipedia information
      8. Displaying weather forecasts
      9. Retrieving some pictures
      10. Summary
    10. 3. Creating a Photo Sharing App
      1. Project overview
      2. The camera
      3. Custom UIView
      4. The social framework
      5. Creating the app
      6. Creating a view to draw on it
      7. Developing the edition space
      8. Publishing your picture
      9. Summary
    11. 4. Simulating Home Automation with HomeKit
      1. Project overview
      2. Preparing yourself for HomeKit
        1. Downloading the HomeKit Accessory Simulator
        2. Creating accessories
        3. Creating the app
        4. The first scene
        5. Creating an accessory class
      3. Building view controllers with HomeKit
        1. GarageDoorViewController
        2. Garage layout
        3. Building the living room
        4. The door lock view controller
        5. FanViewController
        6. AquariumViewController
        7. The final storyboard
      4. Summary
    12. 5. Health Analyzing App Using HealthKit
      1. Project overview
      2. The setup
      3. Creating helpers
      4. Asking permission
      5. Displaying and saving the user's health data
      6. Checking your health record
      7. Charts on the storyboard
      8. Summary
    13. 6. Creating a Game App Using SpriteKit
      1. Project overview
      2. The setup
        1. Changing the current code
        2. Adding a character and some waves
        3. Creating some enemies
        4. Checking for collisions
        5. Losing lives
        6. Fixing the score counter
        7. Moving the dinosaur
        8. The final action
      3. Summary
    14. 7. Creating an Apple Watch App
      1. Project overview
      2. Setting it up
      3. The iOS app
      4. The models
      5. A scene to add supplies
      6. Displaying the fridge's status
      7. Going to the supermarket
      8. The WatchApp
      9. Communicating with the iOS app
      10. Displaying the map on the watch
      11. The glance
      12. Summary
    15. 8. AVFoundation
      1. Getting a project overview
      2. Setting up the app
      3. Storing some asset information
      4. Listing videos
      5. Recording
      6. Improving the usability
      7. Summary
    16. Index

Product information

  • Title: Swift 2 Blueprints
  • Author(s): Cecil Costa
  • Release date: October 2015
  • Publisher(s): Packt Publishing
  • ISBN: 9781783980765