万本电子书0元读

万本电子书0元读

顶部广告

Building Apple Watch Projects电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Stuart Grimshaw

出  版  社:Packt Publishing

出版时间:2016-02-29

字       数:370.7万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Discover exciting and fun projects by building brilliant applications for the Apple WatchAbout This BookExplore the opportunities opened up to developers by Apple’s latest device: the Apple WatchBe a crackerjack at developing software across a broad range of watch app categoriesFrom an eminent author, master all stages of development, from the first stage through to a completed projectWho This Book Is ForIf you have some basic knowledge of programming in Swift and are looking for the best way to get started with Apple Watch development, this book is just the right one for you!What You Will LearnUnderstand the concept of the Apple Watch as an autonomous device as well as it being paired with the iPhoneGet your app up and runningDesign exciting, inspiring, and attractive layouts for your appsMake your user interface more engaging using images and animationEnable your Watch and iPhone apps to transport and share dataLeverage the feature-rich set of WatchKit technologies provided by AppleConnect your apps to the InternetSubmit your app to the App StoreIn DetailWith Apple’s eagerly anticipated entry into the wearable arena, the field is wide open for a new era of app development. The Apple Watch is one of the most important technologies of our time.This easy-to-understand book takes beginners on a delightful journey of discovering the features available to the developer, right up to the completion of medium-level projects ready for App Store submission. It provides the fastest way to develop real-world apps for the Apple Watch by teaching you the concepts of Watch UI, visual haptic and audio, message and data exchange between watch and phone, Web communication, and finally Visual, haptic as well as audio feedback for users.By the end of this book, you will have developed at least four fully functioning apps for deployment on watchOS 2.Style and approachThis is a step-by-step guide to developing apps for the Apple Watch with the help of screenshots and fully coded working examples.
目录展开

Building Apple Watch Projects

Table of Contents

Building Apple Watch Projects

Credits

About the Author

About the Reviewer

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Exploring the New Platform

Wide open future

A closer look at the watch

Building on success

A look under the hood

Vital statistics

watchOS

WatchKit

One App, four interfaces

The Main app

Glances

Correction

Notifications

User Input Hardware

Digital Crown

Force Touch

Taptic Engine

Audio in out

♥ It

Extension of the iPhone, but more

Opportunity knocks

Summary

2. Hello Watch

Setting it all up

Creating a new Xcode project

Check out what's new

Building and running the app

Looking over the project

Three apps?

iOS app

WatchKit app

WatchKit extension

Three targets

Two storyboards

Adding some content on screen

Preparing the interface

Adding a button

Give the UI some visual appeal

Adding a group

Creating a group object

Tweaking the button

Done

Adding some animation magic

Getting user input

Ideas for self study

Summary

3. C-Quence – A Memory Game

Plan the app

Mission statement

User story

App requirements

Setting up the project

Create the Xcode project

Create Required Classes

Building the interface

Set up the Group hierarchy

Add a button

Copy and paste

GameLogic

Create the GameLogic class

Plan the class

Create the class's interface

Define some enums

Stub the methods

Extend the sequence

Evaluate

Clear

Define properties

Check your code

Interface Controller

Planning the interface

Define Outlets to the View

Connect the UI with the Outlets

Stub some preliminary methods

Start the game

Accept guess

Game over!

Check your code

Hook up the UI with the Outlets

Run the app

Summary

4. Expanding on C-Quence

Implementing the methods

The InterfaceController class

awakeWithContext

playButtonTapped

Declare additional constants

playSequence

timerFired

flashColor

redButtonTapped & Co

colorButtonTapped

endGame

GameLogic

Init the sequence array

Extend the sequence

Evaluating the user's input

clearGame

Test it

Build and run the app

Testing and tweaking

The first test

The first bug

The first fix

Test again

Fix again

Test

Fix

Test again

Communicating with the phone

Make it personal

Getting the message across

Requirements

What classes will we need?

Preparing both apps to communicate

Create a Constants.swift file

Define the constants

Create the iPhone Connectivity Manager

Instantiate the class in AppDelegate

Getting the user name

ViewController

Prepare the UI

Hook up the UI

Creating the Watch Connectivity Manager

Instantiate the class in ExtensionDelegate

Modify the InterfaceController class

Run and test

Summary

5. On Q – A Productivity App

Download the project template

Plan the Watch app

Mission statement

User story

The Watch app

Launch view:

Prompts view:

Menu:

The iPhone app

App requirements

Setting up the project

Create the required watchOS classes

Writing the code

WatchConnectivity

WatchConnectivityManager class

WatchData

WatchDataManager class

Interface Controllers

PromptsInterfaceController

DetailsInterfaceController

The Storyboard

Preparing the images

Using xcassets

Designing the user interface

PromptsInterfaceController

Prompts Group

PromptLabelGroup

Buttons Group

Start Group

Other UI elements

DetailsInterfaceController

Implementing the methods

ExtensionDelegate

WatchConnectivityManager

WatchDataManager

Interface Controllers

PromptsInterfaceController

DetailsInterfaceController

Build and run

Test and Tweak

Testing with the iPhone and real data

Unstub the WatchDataManagerinit method

Challenges for further growth

Summary

6. Watching the Weather

Adding a Glance to an app

Plan the App

Mission Statement

User Story

Setting up the project

Requirements

Weather data structure

Getting the data

Welcome to openweathermap.org

Introducing JSON

JSON data structure 101

Making the data more readable

Introducing NSURLSession

Disabling App Transport Security

Using NSURLSession

Interface Controllers

Testing in the console

Completing InterfaceController

Coding InterfaceController

Building the Interface

WeatherTableInterfaceController

The simplicity of WatchKit tables

Coding WeatherTableInterfaceController

Parsing the JSON data

Building the WeatherTable UI

Run the app

DetailsInterfaceController

Coding the DetailsInterfaceController

Creating the DetailsInterfaceController UI

Run the complete app

Glances

Coding the GlanceController

Building the GlanceController UI

Building the Glance interface

Running and testing the Glance

Challenges for expansion

Summary

7. Plot Buddy – All about Location

Planning the app

Mission Statement

User Story

Setting up the project

Requirements

Data structure

Shared constants

Getting location data

Modifying the iPhone's Info.plist

Creating PBLocationManager

Create the Class

Delegates and Protocols

Define the protocol

Implement PBLocationManager

The Interface Controllers

Create the InterfaceController class

Test in the console

Beware of the glitches

Code

Interface

Test your code

PlotsSceneInterfaceController

CodingPlotsSceneInterfaceController

Creating the UI

Run the app

WatchConnectivity

Final test

Challenges for expansion

Summary

8. Images, Animation, and Sound

Adding an icon

Icon requirements

Technical requirements

Design considerations

Using third-party utilities

Complete icon set

Graphics apps

Sizes

Understanding points and pixels

Importing images into the project

Animation

Creating AnimationInterfaceController

Create a new project

Extending AnimationInterfaceController

Add Outlets to AnimationInterfaceController

Creating the UI

Adding code to AnimationInterfaceController

Some Constants

Setting the UI layout in code

Run the code

Tweak the code

Completing the animation code

Less is more

Run the app

Audio and Video

Adding a media file

Adding the code

Summary

9. Wear It, Test It, Tweak It, Ship It

Installation on a physical device

What if you don't have an Apple Watch?

Registering your device

Pair your Apple Watch and iPhone

Select the device in Xcode

Running on the device

Installation troubleshooting

Restarting, really?

Restart just the app

Restart the Simulator

Delete the app from the Watch Simulator

Delete the app from the iPhone Simulator

Delete the Derived Data directory

Reload the Xcode project

Restart Xcode

Restart Xcode

Read the error messages

Help online

Stack Overflow

Apple developer forums

Testing in the field

Wear it all day

Scenarios not to be forgotten

Beta testers

Iterate testing and tweaking

When testing is done

Before you submit

App Store submission process overview

Phone Functionality

Apple's guidelines

Keep up to date

Membership and certificates

Preparing for submission

Apple Developer Member Center

Xcode distribution settings

Using iTunes Connect

Requirements for iTunes Connect

App description

Support URL

App Store Icon

Screenshots

iTunes Connect optional data

App Preview

App Review Information

The iTunesConnect process

Submit for review

Uploading the build with Xcode

Upload

Uploaded!

Summary

10. This Is Only the Beginning

Using animation to the fullest

Advanced custom navigation

Onboarding

Making use of code snippets

Post release maintenance

Support

Analytics

Google Analytics

Fabric/Crashlytics

Expanding your skills

HTTP

Swift

Program design topics

Programming paradigms

Object orientated programming

Imperative programming

Declarative

Where Swift fits in

Program design patterns

Tools

Terminal

Help from afar

Command line development

Using cURL

Creating a local server

Xcode's Instruments app

Application Loader

Version control

What is version control?

Git and repos

Git and Xcode

GitHub

BitBucket

Which one to choose

Personal favorites

Graphics

Graphic

iConeer

Bezel

HTTP traffic

Charles

Wireshark

Sites to be aware of

Swift

Open source Swift

Swift blog

Apple developer resources

watchOS developer library

WWDC vids

Online help

Stack Overflow

Stack Exchange

Apple forums

My sites

Support

GitHub

Best of the blogs

NSHipster

Erica Sadun

Natasha the robot

Stay in touch

Follow the buzz

Open source

Real-world encounters

Meet-Ups

DevCons

Summary

One last word from the author

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部