万本电子书0元读

万本电子书0元读

顶部广告

Learning Xcode 8电子书

售       价:¥

18人正在读 | 0人评论 9.8

作       者:Jak Tiano

出  版  社:Packt Publishing

出版时间:2016-11-01

字       数:373.1万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn how to use the power of Xcode to turn your next great app idea into a reality About This Book Learn the theory and tools behind app development using Swift 3 and Xcode 8 Build a fully featured iOS app, including a companion app for the Apple Watch Optimize, debug, and ultimately release your app on Test Flight and the App Store Who This Book Is For This book is intended for programmers looking to get a jump-start into the world of iOS development. Whether you’re a young student who has only spent a few months with Java, or a seasoned developer who has spent their career developing for a different platform, all that is expected is a basic understanding of a programming language such as C++, C#, or Java. What You Will Learn Understand the most important features of the Xcode IDE Write Swift 3 code for application data models and view controllers Prepare visual layouts for an iOS application using storyboards, size classes, and auto-layout Integrate many common technologies into an app, such as multi-touch gestures, CoreData, and notifications Build companion applications for the Apple Watch with watchOS 3 Debug applications using Xcode’s suite of debugging tools, and prevent bugs with unit testing Optimize an application using Xcode 8’s profiling tools and asset catalogs Distribute a beta application through TestFlight, and a finished application through the App Store In Detail Over the last few years, we’ve seen a breakthrough in mobile computing and the birth of world-changing mobile apps. With a reputation as one of the most user-centric and developer-friendly platforms, iOS is the best place to launch your next great app idea. As the official tool to create iOS applications, Xcode is chock full of features aimed at making a developer’s job easier, faster, and more fun. This book will take you from complete novice to a published app developer, and covers every step in between. You’ll learn the basics of iOS application development by taking a guided tour through the Xcode software and Swift programming language, before putting that knowledge to use by building your first app called “Snippets.” Over the course of the book, you will continue to explore the many facets of iOS development in Xcode by adding new features to your app, integrating gestures and sensors, and even creating an Apple Watch companion app. You’ll also learn how to use the debugging tools, write unit tests, and optimize and distribute your app. By the time you make it to the end of this book, you will have successfully built and published your first iOS application. Style and approach This easy-to-follow guide presents topics in a hands-on lecture format where concepts are introduced and explained, then used in an example as reinforcement. The first third of the book covers the separate building blocks of development, while the second two thirds cover the development of an app from start to finish.
目录展开

Learning Xcode 8

Table of Contents

Learning Xcode 8

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. Starting Your iOS Journey

A developer's responsibilities

Pre-production

Project setup

Development

Deployment

Working on a team

Designers

Other programmers

Project managers

Investors

The Xcode 8 toolset

Xcode

iOS and watchOS simulator

Instruments

Application Loader

Understanding Model-View-Controller (MVC)

Model

View

Controller

MVC on the web

MVC on iOS

Becoming a registered developer

Which account do you need?

Registering a free developer account

Registering a paid developer account

Summary

2. Welcome to Xcode

Getting started

Installing Xcode

Adding your developer account

Creating a new project

Navigating Xcode

Editor

Navigator sidebar

Debug area

Utilities sidebar

Exploring the editor

Standard editor

Assistant editor

Version editor

Understanding project settings

Project targets

The General tab

The Capabilities tab

The Info tab

Creating and managing files

Resource types

Creating new resources

Importing existing files

Groups and folders

Creating builds

Build and run

Running on a device

Applying the basics

Setting up the workspace

Creating the model, view, and controller

Testing our work in the simulator

Summary

3. Introduction to Swift 3

Discovering playgrounds

Setting up a playground

Using previews

Resources, pages, and rich comments

Resources

Pages

Rich comments

Understanding Swift basics

Data types, constants, and variables

Data types

Constants

Variables

Optionals

Collection types

Arrays

Dictionaries

Conditional statements

if statement

guard statement

switch statement

Loops

for loop

for-in loop

while loop

repeat-while loop

Functions

Comments and printing

Creating classes, structs, and enums

Classes

Structs

Enumerations

Using important Swift features

Closures

Protocols

Class extensions

Error handling

Summary

4. Using Storyboards, Auto Layout, and Size Classes

Storyboards

Getting started

View controllers and screen flow

Understanding segues

Auto Layout

The view hierarchy

Constraints

Resolving issues

Size classes

Devices, orientations, and size classes

Size classes in action

Summary

5. Taking Advantage of Source Control in Xcode

Understanding version control

Introduction to Git

Setting up Git in Xcode

Creating a local repository

Adding Git to an existing project

Using a GitHub hosted repository

Using version control in Xcode

Pull, push, and commit

The version editor

Creating and merging branches

Summary

6. Building Your First iOS App

Pre-production

Assembling a feature list

Visual design

Creating a development plan

New snippet

SnippetData model

New snippet button

Select snippet type

Update SnippetData model

Create an alert controller

Text snippet implementation

Update SnippetData model

Text entry view controller

PhotoSnippet implementation

Update SnippetData model

PhotoSnippet data entry

Scroll through snippets

Create prototype cells

Populate table view

Snippet dates

Update SnippetData model

Save data to model

Update view and controller

Summary

7. Integrating Multitouch and Gestures

Human interface guidelines – gestures

Standard gestures

Usage guidelines

How gestures work

Adding gestures from the storyboard

Setting up the storyboard

Flipping the image

Adding gestures from code

Creating a gesture through code

Reading the gesture data

Changing the scale of our image

If you're up for a challenge…

Creating 3D Touch app shortcuts

Setting up Info.plist

Handling shortcuts in the app delegate

Summary

8. Exploring Common iOS Frameworks

Frameworks

What is a framework?

Linking frameworks in a project

Understanding UIKit fundamentals

Application management

The UIDevice class

Views

Drawing

Hierarchies

Coordinate systems

Documents, displays, printing, and more

Documents

Displays

Printing

And more!

Using CoreLocation.framework

Setting up CoreLocation permissions

Getting the user's location

Adding location data to Snippets

Using Social.framework

Setting up the views

Posting to Twitter

Summary

9. Working with Core Data

What is Core Data?

Model revisited

Entities, attributes, and relationships

Entities

Attributes

Relationships

The data model editor

Preparing Snippets for Core Data

Initializing the Core Data stack

Data model versus object graph

The NSManagedObjectModel

The NSPersistentStoreCoordinator

The NSManagedObjectContext

Final touches

Recreating the data model with Core Data

Persisting data

Saving data

Fetching data

Deleting data

Summary

10. Creating a watchOS Companion App

Designing for the Apple Watch

Using the watch

Intended experience

Apple's design principles

Components of a watchOS app

The watchOS app

Dock snapshots

Notifications

Complications

Architecture of a watchOS app

Target bundles

Watch App bundle

Watch Extension bundle

Interface controller

Extension Delegate

Snippets for Apple Watch

Setting up our project

Creating a watchOS storyboard

Programming the interface controller

Connecting to iOS with Watch Connectivity.framework

Adding a complication

Summary

11. Advanced Input Using Sensors

Device status with UIDevice

Accessing orientation state

Checking the proximity sensor

Getting battery status

Introduction to Core Motion

Accelerometer

Gyroscope

CMDeviceMotion

User acceleration

Gravity

Rotation rate

Magnetic field

Charting motion data

Charts

Importing the framework

Setting up the storyboard

Filling the chart with data

Pedometer

Altitude

Sensors on Apple Watch

Setting up an extension

Getting sensor data on Apple Watch

Sending and displaying data on iOS

Summary

12. Sending Notifications

Introduction to user notifications

Components of a user notification

Local versus remote notifications

Adding notification support to Snippets

Getting permission to send notifications

Scheduling a local notification

Advanced notifications

Categories and actions

Badges

Custom sounds

Receiving notifications while in the app

Summary

13. Writing Unit Tests

Introduction to unit tests

What is a unit?

Why use unit testing in the first place?

Unit tests in action

Setting up the project

Writing tests with XCTest

Running tests

Implementing tests for Snippets

Setting up the Snippets project

Preparing our testing class

Writing a data validation unit test

Checking code coverage

Testing UI in Xcode 8

How does UI testing work?

Adding the UI testing target

Using the UI recorder

Summary

14. Debugging an iOS Application

Basic debugging practices

print()

Breakpoints and the debug area

Variables view

Console

Debug toolbar

The call stack

Advanced debugging tools

Address Sanitizer

Performance gauges

CPU and memory gauge

Disk and network gauge

Energy gauge

Visual debugging

Summary

15. Optimizing Your App

Introduction to Instruments

Time Profiler instrument

Anatomy of an Instruments document

Using the Time Profiler

Allocations instrument

Leaks instrument

App Thinning

Slicing

Bitcode

On-demand Resources

Creating tags

Loading resources

Purging resources

Summary

16. Distributing an iOS App

Preparing iTunes Connect

Registering a bundle identifier

Creating a new app record in iTunes Connect

Uploading to iTunes Connect

Releasing the app

Finalizing store assets

Distributing on TestFlight

Submitting to the App Store

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部