Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Apple Watch App Development
  • Table Of Contents Toc
  • Feedback & Rating feedback
Apple Watch App Development

Apple Watch App Development

By : Steven F. Daniel
3.5 (2)
close
close
Apple Watch App Development

Apple Watch App Development

3.5 (2)
By: Steven F. Daniel

Overview of this book

With the increasing amount of new wearable devices hitting the market, wearables are the next wave of mobile technology. With the release of Apple's WatchKit SDK, a whole new world of exciting development possibilities hasopened up. Apple Watch App Development introduces you to the architecture and limitations of the Apple Watch platform, followed by an in-depth look at how to work with Xcode playgrounds. Here, we'll introduce you to the Swift programming language so you can quickly begin developing apps for the Apple Watch platform with the WatchKit framework and the Xcode Development IDE. We then discuss more advanced topics such as Notifiations, Glances, Closures, Tuples, Protocols, Apple pay, and using Swift playgrounds, with each concept backed up with example code that demonstrates how to properly execute it. We also show you how to package and deploy your Watch application to the Apple AppStore. By the end of this book, you will have a good understanding of how to develop apps for Apple Watch platform using the WatchKit framework and Swift 2.0.
Table of Contents (13 chapters)
close
close
12
Index

Introduction to Xcode playgrounds

A playground is basically an interactive Swift coding environment that displays the results of each statement as updates are made without having the need to compile and run a project. You can use playgrounds to learn and explore Swift, prototype parts of your app, and create learning environments for others. The interactive Swift code environment lets you experiment with algorithms, explore system APIs, and even create your very own custom views without the need to create a project. Once you perfect your code in the playground, simply move this code into your project. Given that playgrounds are highly interactive, they are a wonderful vehicle for distributing code samples with instructive documentation and can even be used as an alternative medium for presentations.

With the new Xcode 7 IDE, you can incorporate rich text comments with bold, italic, and bulleted lists with the addition of having the ability to embed images and links. You can even embed resources and support Swift source code in the playground to make the experience incredibly powerful and engaging, while the visible code remains simple.

Playgrounds provide you with the ability to do the following:

  • Share curriculum to teach programming with beautiful text and interactive code
  • Design a new algorithm and watch its results every step of the way
  • Create new tests and verify that they work before promoting them into your test suite
  • Experiment with new APIs to hone your Swift coding skills
  • Turn your experiments into documentation with example code that runs directly within the playground

Let's begin by opening the Xcode IDE and explore how to create a new playground file for the first time. Perform the following steps:

  1. Open the Xcode.app application either using the finder in your Applications directory or using Apple's Launchpad. If you've never created or opened an Xcode project before, you will be presented with the following screen:
    Introduction to Xcode playgrounds
  2. In the Welcome to Xcode dialog, select the Get started with a playground option. If this dialog doesn't appear, you can navigate to File | New | Playground… or simply press Shift + Option + Command + N.
  3. Next, enter SwiftLanguageBasics as the name of your playground.
  4. Then ensure that you choose iOS as the platform that we will target.
    Introduction to Xcode playgrounds
  5. Click on the Next button to proceed to the next step in the wizard.
  6. Specify the location where you would like to save your project.
  7. Then click on the Create button to save your playground at the specified location.

Once your project is created, you will be presented with the default playground template, as shown in the following screenshot:

Introduction to Xcode playgrounds

In the next section, you will begin learning about some of the Swift language basics, start adding lines of code within this playground file, and see the results that we get when they are executed.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Apple Watch App Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon