Program the Internet of Things with Swift for iOS 无水印pdf 0分

5星(超过95%的资源)
所需积分/C币:16 2016-02-11 16:31:18 13.89MB PDF
15
收藏 收藏
举报

Paperback: 494 pages Publisher: Apress; 1st ed. 2016 edition (December 27, 2015) Language: English ISBN-10: 1484211952 ISBN-13: 978-1484211953 Program the Internet of Things with Swift and iOS is a detailed tutorial that will teach you how to build apps using Apple’s native APIs for the Internet of Things, including the Apple Watch, HomeKit, and Apple Pay. This is the second book by Ahmed Bakir (author of Beginning iOS Media App Development) and his team at devAtelier LLC, who have been involved in developing over 20 mobile projects. Written like a code review, this book presents a detailed "how" and "why" for each topic, explaining Apple-specific design patterns as they come up and pulling lessons from other popular apps. To help you getting up and running quickly, each chapter is framed within a working project, allowing you to use the sample code directly in your apps. The Internet of Things is not limited to Apple devices alone, so this book also explains how to interface with popular third-party hardware devices, such as the Fitbit and Raspberry Pi, and generic interfaces, like Restful API’s and HTTPS. The Internet of Things is waiting ― be a part of it!
Program the Internet of Things with Swift for iOS Copyright o 2016 by Ahmed Bakir, Gheorghe Chesler, and Manny de la Torriente This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation broadcasting, reproduction on microfilms or in any other physical way, and transmission or information known or hereafter developed Exempted from this legal reservation are brief excerpts in connection wif ow storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher's location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through Rights Link at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law. ISBN-13(pbk):978-1-4842-11953 ISBN-13( electronic:978-1-4842-1194-6 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark The use in this publication of trade names, trademarks, service marks, and similar terms, even if they not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or on, While the advice and information in this book are believed to be true and accurate at the date of publicati omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein Managing Director: Welmoed Spahr Lead editor michelle lowman Technical reviewer Charles cruz Editorial Board: Steve Anglin, Louise Corrigan, Jonathan Gennick, Robert Hutchinson, Michelle lowman, James Markham, Susan McDermott, Matthew Moodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing Coordinating Editor: Mark Powers Copy Editor: Lori Jacobs Compositor: SPi global Indexer: SPi Global Artist SPi global Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201 )348-4505, e-mail orders-nyospringer-sbm com orvisitwww.springeronline.comApressMediaLlcisaCaliforniaLlcandthesolemember(owner)isSpringer Science Business Media Finance Inc(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation Forinformationontranslationspleasee-mailrights@apress.com,orvisitwww.apress.com Apress and friends of ed books may be purchased in bulk for academic, corporate, or promotional use e Book versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales-ebooklicensingwebpageatwww.apress.com/bulk-sales Any source code or other supplementary materials referenced by the author in this text is available to readers atwww.apress.com/9781484211953.Fordetailedinformationabouthowtolocateyourbookssourcecodego towww.apress.com/source-code/.ReaderscanalsoaccesssourcecodeatSpringerlinkintheSupplementary Material section for each chapter Contents at a Glance About the authors mxv About the technical reviewer Introduction mmmmmmxix Chapter 1: Building Your First Internet of Things App aman. 1 Chapter 2: Getting Started with Swiften ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 33 Chapter 3: Accessing Health Information Using Healthkit 59 Chapter 4: Using Core Motion to Save Motion Dataman 99 Chapter 5: Integrating Third-Party Fitness Trackers and Data Using the Fitbit APlmmmmmamammm aIn 119 Chapter 6: Building Your First watchS App 169 Chapter 7: Building an Interactive watchS App mmm 201 Chapter 8: Building a Stand-Alone watchS App aaa. 225 Chapter 9: connecting to a bluetooth lE Device 247 Chapter 10: Building location Awareness with iBeacons mmmmm 295 Chapter 11: Home Automation Using homekit mmmmmmmmmmmmmm 343 Contents at a glance Chapter 12: Building an App that interacts with a raspberry Pimmmmmnn 397 Chapter 13: Using Keychain Services to Secure Data ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 427 Chapter 14: Using Touch ID for Local Authentication mmmmmmmmaammammmam 443 Chapter 15: Using Apple Pay to Accept Payments mm RBRRIaD n457 Index u 485 Contents About the authors ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ XV About the technical reviewer Introduction mmmmmmxix Chapter 1: Building Your First Internet of Things App ■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Ahmed bakir Setting up the Project 2 Building the User Interface 7 Creating the Table View Controller. Creating the map view controller 18 Requesting Location Permission..,……22 Accessing the User's Location 26 Displaying the User's Location …28 Populating the Table view Populating the Map...........,,,,…,……………30 Summary 32 Contents Chapter 2: Getting Started with Swift merman 33 Ahmed bakir∴ 33 Why Use Swift? 34 Basic Swift Syntax… 35 Calling Methods hello world 35 Defining variables Compound Data Types… 37 Conditional logic..................... 38 Enumerated Types Loops∴… Object-Oriented programming in Swift . Building a class Protocols 42 Method Signatures. Accessing Properties and Meth0ds.…,.,.,… 44 Instantiating objects 45 Strings 46 Formatting strin Collections 面m 47 Casting …250 Swift -Specific Language Features 50 Optionals .50 Try-Catch Blocks 52 Mixing Objective-C and Swift in Projects 54 Calling Swift from Objective-C Summary… 57 Chapter 3: Accessing Health Information Using Healthkit ummmmnmainiaan: 59 Ahmed Bakir 59 Introduction 59 Contents Getting started 61 Setting Up the User Interface.......................................61 Setting Up the project for HealthKit....………,79 Prompting the User for healthkit Permission . Retrieving Data from HealthKit…...,…………,88 Displaying results in a Table view.....,….…,……………………!92 Fetching Background Updates Summary 97 Chapter 4: Using Core Motion to Save Motion Data mnmammnnan 99 Ahmed bakir 99 Introduction 99 Using Core Motion to Access Motion Hardware 100 Requesting User Permission for Motion Activity........... 日面日日日面日日自日量日面日日日面日日 Querying for Step count 103 Detecting Live Updates to Step count 106 Detecting Activity type.. 108 Saving data to HealthKit 110 Summary 117 Chapter 5: Integrating Third-Party Fitness Trackers and Data Using the Fitbit APl ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 119 Gheorghe chesler. 119 Introduction to the Fitbit APl …119 The restful apl 120 Fitbit RESTful API Implementation Details...........................122 Setting Up a Local Playground with Apache The oauth 1, oa authentication model wwww 125 The Fitbit oAuth Implementation 日日自日日日面日日面日自日日面日日自日日日日面日日自日日日面日自m日日自日日日面日自日面日自日日面日日 126 Fitbit APl Call Rate limits 127 Making async call!s..,,,,…………128 Using callbacks as parameters 128 Contents Setting up a Fitbit-compatible ios project 130 The view controll he Logger Library 133 Setting up a Basic Set of Crypto Functions 133 The aPl client Library.. 137 The oauth libral 151 Testing What We have so Far 157 Making requests to the Fitbit APl 159 Retrieving the User profile 161 Retrieving and Setting Data in the aPl 163 uth versions: Working in both worlds.….…,…,…,…,…,,…,,,…,…,…… 167 Summary… …168 Chapter 6: Building Your First watchOS App m BmBBRBEIR an 169 Ahmed bakir 169 Introduction 169 watchS Apps Vs iOS Apps 170 Setting Up Your project 172 Debugging your watch0sApp..,……………176 Adding a Table to your watchS App 176 Defining the Table 181 Fetching Data from your Building a detail page with a custom layout 190 Presenting the detail Interface Controller. Summary… 199 Chapter 7: Building an Interactive watchS App a ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 201 Ahmed Bakir 201 ntroduction…201 Using Force Touch to Present Menus…..,,,,……202 Resetting the Location List... 206 Presenting a detail view controller. Simulating force Touch Contents Adding Buttons to an Interface Controller 210 Passing Information Between Interface Controllers 213 Using a delegate to pass Information on Dismissal........ae 215 How to Add Notes Using Text Input .217 Sending Data Back to the Parent iOS App 219 Summary…..,,., 223 Chapter 8: Building a Stand-Alone watchOS App B mm m IaIIaIaInn: 225 Ahmed bakir. mm. 225 Using Core Location to Request current Location DDDDDDDDDDDDDDDDDDDDDDDDDDDDD 226 Reverse Geocoding an Address 229 Using NSTimer to Create Reminders 233 Making Network Calls from Your watchOS App 238 Handling a JSON Response 243 Summary 245 Chapter 9: Connecting to a bluetooth LE Device aa. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 247 Manny de la Torriente 247 Introduction to the apple bluetooth stack 247 Key terms and Concepts .................................................................................248 Core bluetooth objects 249 Building Your First bluetooth LE Application 250 Backlog .251 Base application and Home scene. Central role Scene . Peripheral Role Scene 25 Edita| e Text…255 Setting Up the project 256 Building the Interface. 256 Using a Central Manager DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 264

...展开详情
试读 127P Program the Internet of Things with Swift for iOS 无水印pdf 0分
立即下载
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
花花小Boy 原版完整PDF书籍,非常清晰
2016-07-11
回复
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 至尊王者

关注 私信
上传资源赚钱or赚积分
最新推荐
Program the Internet of Things with Swift for iOS 无水印pdf 0分 16积分/C币 立即下载
1/127
Program the Internet of Things with Swift for iOS 无水印pdf 0分第1页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第2页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第3页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第4页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第5页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第6页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第7页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第8页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第9页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第10页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第11页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第12页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第13页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第14页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第15页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第16页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第17页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第18页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第19页
Program the Internet of Things with Swift for iOS 无水印pdf 0分第20页

试读结束, 可继续阅读

16积分/C币 立即下载