Learning Watchkit Programming Addison-Wesley Learning Series

Total Page:16

File Type:pdf, Size:1020Kb

Learning Watchkit Programming Addison-Wesley Learning Series Learning WatchKit Programming Addison-Wesley Learning Series Visit informit.com/learningseries for a complete list of available publications. The Addison-Wesley Learning Series is a collection of hands-on program- ming guides that help you quickly learn a new technology or language so you can apply what you’ve learned right away. Each title comes with sample code for the application or applications built in the text. This code is fully annotated and can be reused in your own projects with no strings attached. Many chapters end with a series of exercises to encourage you to reexamine what you have just learned, and to tweak or adjust the code as a way of learning. Titles in this series take a simple approach: they get you going right away and leave you with the ability to walk off and build your own application and apply the language or technology to whatever you are working on. Learning WatchKit Programming A Hands-On Guide to Creating Apple Watch Applications Wei-Meng Lee New York • Boston • Indianapolis • San Francisco Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are Editor-in-Chief claimed as trademarks. Where those designations appear in this book, and the publisher was Mark L. Taub aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Senior Acquisitions Editor The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. Trina MacDonald No liability is assumed for incidental or consequential damages in connection with or arising out Development Editor of the use of the information or programs contained herein. Sheri Cain For information about buying this title in bulk quantities, or for special sales opportunities (which Managing Editor may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales John Fuller department at [email protected] or (800) 382-3419. Full-Service For government sales inquiries, please contact [email protected]. Production Manager Julie B. Nahil For questions about sales outside the United States, please contact [email protected]. Copy Editor Visit us on the Web: informit.com/aw Stephanie Geels Library of Congress Control Number: 2015940909 Indexer Copyright © 2015 Pearson Education, Inc. Jack Lewis All rights reserved. Printed in the United States of America. This publication is protected by copy- Proofreader right, and permission must be obtained from the publisher prior to any prohibited reproduction, Anna Popick storage in a retrieval system, or transmission in any form or by any means, electronic, mechan- ical, photocopying, recording, or likewise. To obtain permission to use material from this work, Technical Reviewers please submit a written request to Pearson Education, Inc., Permissions Department, 200 Old Mark H. Granoff Tappan Road, Old Tappan, New Jersey 07675, or you may fax your request to (201) 236-3290. Chaim Krause Apple, the Apple logo, Apple TV, Apple Watch, Cocoa, Cocoa Touch, eMac, FaceTime, Finder, Niklas Saers iBook, iBooks, iCal, Instruments, iPad, iPad Air, iPad mini, iPhone, iPhoto, iTunes, the iTunes logo, iWork, Keychain, Launchpad, Lightning, LocalTalk, Mac, the Mac logo, MacApp, MacBook, Editorial Assistant MacBook Air, MacBook Pro, MacDNS, Macintosh, Mac OS, Mac Pro, MacTCP, the Made for Olivia Basegio iPad logo, the Made for iPhone logo, the Made for iPod logo, Metal, the Metal logo, the Monaco Cover Designer computer font, MultiTouch, the New York computer font, Objective-C, OpenCL, OS X, Passbook, Pixlet, PowerBook, Power Mac, Quartz, QuickDraw, QuickTime, the QuickTime logo, Retina, Chuti Prasertsith Safari, the Sand computer font, Shake, Siri, the Skia computer font, Swift, the Swift Logo, the Compositor Textile computer font, Touch ID, TrueType, WebObjects, WebScript, and Xcode are trademarks of Apple, Inc., registered in the United States and other countries. OpenGL and the logo are CIP Group registered trademarks of Silicon Graphics, Inc. Intel, Intel Core, and Xeon are trademarks of Intel Corp. in the United States and other countries. ISBN-13: 978-0-13-419544-5 ISBN-10: 0-13-419544-2 Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana. First printing, June 2015 ❖ I dedicate this book with love to my family, and to my dearest wife, who has had to endure my irregular work schedule and take care of things while I was trying to meet writing deadlines! ❖ This page intentionally left blank Contents at a Glance Preface xiii Acknowledgments xvii About the Author xix 1 Getting Started with WatchKit Programming 1 2 Apple Watch Interface Navigation 17 3 Apple Watch User Interface 45 4 Interfacing with iOS Apps 99 5 Displaying Notifications 149 6 Displaying Glances 179 Index 195 This page intentionally left blank Contents Preface xiii Acknowledgments xvii About the Author xix 1 Getting Started with WatchKit Programming 1 Specifications of the Apple Watch 1 Getting the Tools for Development 2 Understanding the WatchKit App Architecture 3 Deploying Apple Watch Apps 4 Interaction between the Apple Watch and iPhone 4 Communicating with the Containing iOS App 5 Types of Apple Watch Applications 6 Hello, World! 6 Creating an iPhone Project 6 Adding a WatchKit App Target 8 Examining the Storyboard 11 WatchKit App Lifecycle 12 Modifying the Interface Controller 13 Running the Application on the Simulator 14 Summary 16 2 Apple Watch Interface Navigation 17 Interface Controllers and Storyboard 17 Lifecycle of an Interface Controller 19 Navigating between Interface Controllers 22 Hierarchical Navigation 23 Page-Based Navigation 27 Passing Data between Interface Controllers 28 Customizing the Title of the Chevron or Cancel Button 34 Navigating Using Code 35 Presenting a Series of Pages 38 Changing the Current Page to Display 40 Summary 43 xContents 3 Apple Watch User Interface 45 Responding to User Interactions 45 Button 46 Switch 59 Slider 62 Displaying Information 65 Labels 65 Images 65 Table 71 Gathering Information 82 Getting Text Inputs 82 Getting Emojis 85 Laying Out the Controls 86 Force Touch 91 Displaying a Context Menu 91 Adding Menu Items Programmatically 97 Summary 98 4 Interfacing with iOS Apps 99 Localization 99 Localizing the User Interface 102 Creating Localizable Strings 106 Using the Date Control 112 Communicating between the WatchKit App and the Extension 113 Location Data 114 Displaying Maps 123 Accessing Web Services 126 Sharing Data 130 Summary 148 5 Displaying Notifications 149 What Is a Notification? 149 Types of Notifications on the Apple Watch 152 Implementing the Short-Look Interface 153 Implementing the Long-Look Interface 167 Summary 178 Contents xi 6 Displaying Glances 179 What Is a Glance? 179 Implementing Glances 180 Customizing the Glance 182 Testing the Glance 186 Making the App Useful 186 Creating a Shared App Group 187 Implementing Background Fetch 188 Updating the Glance 192 Summary 194 Index 195 This page intentionally left blank Preface Welcome to Learning WatchKit Programming! This is an exciting time to be a programmer, as we are witnessing a new era of wear- ables. While the Apple Watch is not the first wearable device in the market, its launch signified the intention of Apple to enter the wearable market in a big way. After success- fully changing various industries—music, computer, phone, and mobile computing— Apple looks set to change the wearable industry. And nobody is taking this lightly. As with the iPhone, much of the usefulness and functionality of the Apple Watch device actually come from the creativity of the third-party developers. In the early days of the iPhone, Apple restricted all third-party apps to web applications, as they wanted to retain the monopoly on developing natively for the device. However, due to the over- whelming protests of developers, Apple finally relented by releasing an SDK to support third-party apps. It was this decision that changed the fate of the iPhone; the iPhone would never have been so successful without the ability to support third-party apps. When the Apple Watch was announced, Apple was quick to learn its lesson and real- ized that the success of the Apple Watch largely depends on the availability of apps that support it. Hence, before the release of the Apple Watch, the SDK was made available to developers to have a hand in developing Apple Watch apps. The book you are holding in your hands right now (or reading on your phone or tablet) is a collection of tutorials that help you navigate the jungle of Apple Watch programming. This book contains all of the fundamental topics that you need to get started in Apple Watch programming. As this is a book on Apple Watch programming, I am going to make a couple of assumptions about you, the reader: n You should already be familiar with the basics of developing an iOS application. In particular, concepts like outlets and actions should not be new to you. n You should be comfortable with the Swift programming language. See the next section on how to get started with Swift if you are new to it. What You’ll Need To get the most out of this book: n You need a Mac, together with Xcode. n Your Mac should be running at least Mac OS X Yosemite (v10.10), or later. xiii xiv Preface n You can download the latest version of Xcode from the Mac App Store. All the code samples for this book are tested against Xcode 6.3. n If you plan to test your apps on a real device, you need to register to become a paid iOS developer (https://developer.apple.com/programs/ios/).
Recommended publications
  • Cocoa Touch & Iphone
    Music Appreciation 243: Introduction to Rick Astley Evan Doll [email protected] Alan Cannistraro [email protected] Thursday, April 2, 2009 Thursday, April 2, 2009 Welcome to CS193P: iPhone Application Development Evan Doll [email protected] Alan Cannistraro [email protected] Thursday, April 2, 2009 Staff • Lecturers ■ Evan Doll [email protected] ■ Alan Cannistraro [email protected] • Student TAs ■ Troy Brant [email protected] ■ Paul Salzman [email protected] • “Professor Emeritus” ■ Paul Marcos [email protected] Thursday, April 2, 2009 How many of you... • Are familiar with object-oriented programming? • Have developed software with Mac OS X? • Have developed apps for the iPhone? Thursday, April 2, 2009 Lectures, Sections, Office Hours • Lectures ■ 320-105, Monday & Wednesday 3:15 – 4:30 PM • Optional Section ■ 200-205, Friday 3:15 – 4:05 PM as announced ■ Guest speakers, additional topics ■ First one will be next Friday 4/10 • Office Hours ■ Troy and Paul will be holding office hours ■ Time & location TBD, check website for details Thursday, April 2, 2009 Requirements • Prerequisite: CS 106B/X • Recommended Book: None, we’ll use Apple documentation • You must have access to an Intel-based Macintosh ■ Running Mac OS X 10.5 Leopard ■ iPhone SDK (Not available on cluster computers!) • Owning an iPhone or iPod Touch is not required ■ Assignments may be done with the iPhone Simulator ■ Loaner iPod Touches should be available, more details to come Thursday, April 2, 2009 Enrollment • Response has been phenomenal again
    [Show full text]
  • App Frameworks #WWDC16
    App Frameworks #WWDC16 Improving Existing Apps Using modern best practices Session 213 Woody L., � to the Knowledge © 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda Reduce Technical Debt Asset Catalogs Dependency Injection Live Playgrounds Cycle of Development You down with ‘Dub-DC? Yeah, you know me. Lots of Requests Your boss More Requests Your customers Technical Debt //TODO: Write and clean up Customer’s Perspective Actuality Duarte requesting hi-res photo AppStore New API zsh AppKit CF AirPortUtility PreferencesApp iCal Foundation AVFoundation AirPortAssistant AirPortSettings AirPortAssistant OpenCL GameKit Dock Mail MapKit MobileMusicPlayer xnu AppKit AppStore MobileSafari zsh QuickTime udf WebKit BlueToothSettings cups Messages Dock ActivityMonitor MobileSafari bash Mail AccessibilitySettings GameKit GameKitServices MediaPlayerUI MediaPlayer MediaStream MobileMail Swift 3 Source code compatibility New and Updated Platforms A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap The Essentials A very good place to start Earlier iOS 8 5% 11% Minimum Deployment of iOS 8 • 95% of Devices iOS 9 84% As measured by the App Store on May 9, 2016 Pick a Deployment Target Latest update of previous release Deprecated API Deprecated API Treat Warnings
    [Show full text]
  • Iphone Ios 5 Development Essentials
    iPhone iOS 5 Development Essentials i iPhone iOS 5 Development Essentials – First Edition ISBN-13: 978-1466337275 © 2011 Neil Smyth. All Rights Reserved. This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved. The content of this book is provided for informational purposes only. Neither the publisher nor the author offers any warranties or representation, express or implied, with regard to the accuracy of information contained in this book, nor do they accept any liability for any loss or damage arising from any errors or omissions. This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respective trademark owner. The terms used within this book are not intended as infringement of any trademarks. Rev 2.3p ii Table of Contents Preface ............................................................................................................................................................... xix 1. About iPhone iOS 5 App Development Essentials .............................................................................................. 1 1.1 Example Source Code ................................................................................................................................... 2 1.2 Feedback ...................................................................................................................................................... 2 2. The Anatomy of an iPhone 4S ...........................................................................................................................
    [Show full text]
  • Développement Mobile Apple Ios, Ipados, Iphone, Ipad Avec Swift
    Développement mobile Apple iOS, iPadOS, iPhone, iPad avec Swift En bref Acquérir les meilleures bases pour concevoir et développer des applications pour la plateforme iOS (iPad, iPhone) de manière autonome avec l’IDE Xcode 11.x et le langage Swift 5.x en conformité avec les « best practices » d’Apple. Au terme de cette formation, les participants seront en mesure de développer une application complète avec la plupart des contrôles disponibles dans l’environnement iPhone, iPad et d’être autonomes pour la réalisation de projet de plus grande envergure. Ces derniers seront également en mesure d’implémenter les meilleurs choix et les « meilleures pratiques » en matière de structures de données pour leurs applications et garantir une conformité aux standards de développement d’Apple tant d’un point de vue ergonomique que fonctionnel. Le cours traitera, au fil de l’eau, également des considérations d’ordre marketing et UX, avec des incidences et des « Use Case » du monde professionnel. Objectifs globaux • maîtriser le cycle de développement d’une application iOS • connaître et appliquer les « meilleures pratiques » et « l’art de faire » en matière d’ingénierie logicielle pour la plate-forme iOS ainsi que iPadOS (généralités) • maîtriser les bases du langage Swift version 5.x • être en mesure de développer une application complète iOS avec l’environnement de développement intégré Apple Xcode version 11.x • maîtriser la recherche d’informations, de solutions et résolutions de problèmes afin d’obtenir un degré d’autonomie optimal • être en mesure
    [Show full text]
  • App Frameworks #WWDC16
    App Frameworks #WWDC16 What’s New in Cocoa Touch Session 205 Olivier Gutknecht Senior Engineering Manager, UIKit © 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. What’s New in Cocoa Touch What’s New in Cocoa Touch What’s Not New in Cocoa Touch Since Last Year Since Last Year 3D Touch Since Last Year 3D Touch iPad Pro Since Last Year 3D Touch iPad Pro Apple Pencil Since Last Year 3D Touch iPad Pro Apple Pencil Smart Keyboard Adaptivity Adaptivity UIUserInterfaceSizeClass.compact Adaptivity UIUserInterfaceSizeClass.regular Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Making Apps Adaptive The fundamentals Traits Size Classes Size-based layouts Aa Making Apps Adaptive Interface Builder Making Apps Adaptive Tools and Techniques Auto Layout Dynamic Type Layout Guides UIAppearance Asset Catalogs Making Apps Adaptive Aa PART 1 PART 2 Making Apps Adaptive, Part I Presidio Thursday 11:00AM Making Apps Adaptive, Part II Presidio Friday 9:00AM Inclusive App Design Pacific Heights Tuesday 10:00AM Advanced Touch Input Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Orientation, Precise Location, Force, and 240 Hz scanning with Apple Pencil Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Orientation, Precise Location, Force, and 240
    [Show full text]
  • Cocoa Touch Framework
    Mobile OSs, Development Environments, iOS and Android Lesson 04 Apple iOS © Oxford University Press 2018. All rights reserved. 1 iPhone 6 • Multimedia and Internet-enabled mobile phone • Apple iPhone 6 uses A8 processor, a power-efficient processor for the mobiles • Three versions with 16 GB, 64 GB, and 128 GB flash memory • © Oxford University Press 2018. All rights reserved. 2 Devices and Sensors Support • Global positioning system (GPS), Accelerometer, Magnetometer, Picture camera, Camera controls with digital zoom, a scene mode, white balance controls, macro focus, and colour effects. • Video camera in camcorder mode supports video recording and playing. • . © Oxford University Press 2018. All rights reserved. 3 ApplE iPhone • FaceTime app for videoconferencing • Support to iCloud and iCloud Drive, Health and Home Kits © Oxford University Press 2018. All rights reserved. 4 Apple iPhone 6 • Uses Mac OS 8-based iOS 6, 7, and 8 • iOS 8 requires more than 500 MB and more than 5 GB for the apps • Actual memory requirement depends on the OS version • Mac OS very fast responding UIs, direct manipulation using multi-touch gestures. © Oxford University Press 2018. All rights reserved. 5 Apple iPhones • Mac OS X • Four abstract layers • First layer for basic services • Second for core services • Third the media layer • Fourth the touch layer called Cocoa Touch layer © Oxford University Press 2018. All rights reserved. 6 Cocoa Touch Framework • Include libraries, APIs, and run-times • Framework gives an abstraction layer to the iOS © Oxford University Press 2018. All rights reserved. 7 Four Layer iOS Architecture © Oxford University Press 2018. All rights reserved. 8 model-view-controller (MVC) architecture • Framework model-view-controller (MVC) architecture • The core services layer is above the iOS kernel/Core OS.
    [Show full text]
  • Apple Ios 13 on Iphone and Apple Ipados 13 on Ipad Mobile Devices
    Apple Inc. Apple iOS 13 on iPhone and Apple iPadOS 13 on iPad Mobile Devices Security Target PP_MD_V3.1 with MOD_MDM_AGENT_V1.0, MOD_VPN_CLI_V2.1, PP_WLAN_CLI_EP_V1.0 Version 1.7 2020-11-10 VID: 11036 Prepared for: Prepared by: Apple Inc. atsec information security Corp. One Apple Park Way 9130 Jollyville Road, Suite 260 MS 927-1CPS Austin, TX 78759 Cupertino, CA 95014 www.atsec.com www.apple.com © 2020 Apple Inc. This document may be reproduced and distributed only in its original entirety without revision VID: 11036 Table of Contents Revision History ........................................................................................................................... 8 1 Security Target Introduction .............................................................................................. 10 1.1 Security Target Reference ........................................................................................... 10 1.2 TOE Reference ............................................................................................................. 10 1.3 TOE Overview ............................................................................................................... 10 1.4 TOE Description ............................................................................................................ 11 1.4.1 General information .......................................................................................... 11 1.4.2 Obtaining the mobile devices .........................................................................
    [Show full text]
  • Iphone Ios 6 Development Essentials
    i iPhone iOS 6 Development Essentials ii iPhone iOS 6 Development Essentials – First Edition ISBN-13: 978-1479211418 © 2012 Neil Smyth. All Rights Reserved. This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved. The content of this book is provided for informational purposes only. Neither the publisher nor the author offers any warranties or representation, express or implied, with regard to the accuracy of information contained in this book, nor do they accept any liability for any loss or damage arising from any errors or omissions. This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respective trademark owner. The terms used within this book are not intended as infringement of any trademarks. Rev 1.0 iii Table of Contents 1. Start Here .......................................................................................................................................................... 1 1.1 For New iOS Developers ...................................................................................................................................... 1 1.2 For iOS 5 Developers ........................................................................................................................................... 1 1.3 Source Code Download ....................................................................................................................................... 2 1.4 Feedback ............................................................................................................................................................
    [Show full text]
  • Internal Structure of Ios and Building Tools for Ios Apps
    International Journal Of Computer Science And Applications Vol. 6, No.2, Apr 2013 ISSN: 0974-1011 (Open Access) Available at: www.researchpublications.org Internal structure of iOS and Building tools for iOS apps Miss Priyanka V. Kanoi Miss Payal N. ingole 2nd yr Information and Technology 3rd yr Computer sc and Engineering JDIET , Yavatmal JDIET, Yavatmal [email protected] [email protected] operating system: "iPhone OS".In June 2010, Apple rebranded Abstract : iOS is world’s most advanced operating system. With iPhone OS as "iOS". The trademark "IOS" had been used by its easy-to-use interface, amazing features, and rock-solid Cisco for over a decade for its operating system, IOS, used on stability, iOS is the foundation of iPhone, iPad, and iPod touch. It its routers. To avoid any potential lawsuit, Apple licensed the is the most user friendly operating system. With better GUI "IOS" trademark from Cisco. Apple provides major updates to performance. iOS consists of four layers – cocoa touch layer, the iOS operating system approximately once a year over media layer, core service layer, core OS layer. Some of the developmental tools used for preparing iOS apps include iTunes and also, since iOS version 5.0, over the air. The latest XCODE, Instruments and developer library. With thousands of major update is iOS 6, publicly announced on June 11, 2012 apps in practically every category, iOS is the platform for the and released on September 12, 2012. Over 200 new features world’s largest collection of mobile apps. And every app starts debut in iOS 6, including Apple's new Passbook service, with the right DNA.
    [Show full text]
  • OS X Yosemite
    OS X Yosemite Core Technologies Overview October 2014 Core Technologies Overview 2 OS X Yosemite Contents Page 4 Introduction Page 5 System Startup BootROM EFI Kernel Drivers Initialization Address Space Layout Randomization (ASLR) Compressed Memory Power Efficiency App Nap Timer Coalescing Task-Level Scheduling Page 10 Disk Layout Partition Scheme Core Storage File Systems Page 13 Process Control Launchd Loginwindow Grand Central Dispatch Sandboxing Gatekeeper XPC Page 20 Network Access Ethernet Wi-Fi Multihoming IPv6 IP over Thunderbolt Network File Systems Access Control Lists Directory Services Remote Access Bonjour Core Technologies Overview 3 OS X Yosemite Page 27 Document Lifecycle Auto Save Automatic Versions Document Management Version Management Continuity Extensions iCloud Storage Page 31 Data Management Spotlight Time Machine Page 34 Developer Tools Xcode Swift LLVM Instruments Accelerate Automation WebKit Page 41 For More Information Core Technologies Overview 4 OS X Yosemite Introduction With more than 83 million users—consumers, scientists, animators, developers, and system administrators—OS X is the most widely used UNIX® desktop operating system. In addition, OS X is the only UNIX environment that natively runs Microsoft Office, Adobe Photoshop, and thousands of other consumer applications—all side by side with traditional command-line UNIX applications. Tight integration with hardware— from the sleek MacBook Air to the powerful Mac Pro—makes OS X the platform of choice for an emerging generation of power users. This document explores the powerful industry standards and breakthrough innovations in the core technologies that power Apple’s industry-leading user experiences. We walk you through the entire software stack, from firmware and kernel to iCloud and developer tools, to help you understand the many things OS X does for you every time you use your Mac.
    [Show full text]
  • An Extensible Watchos Application for Sleep Session Recording
    Sopor: An extensible watchOS application for sleep session recording Candidate: hwbakker Master’s Thesis Spring 2020 Blank page. 1 Abstract Most medical examinations require a user or patient to be present at a hospital to be examined. However, with technology being increasingly more available and capable we can move this examination closer to the patient’s home, thus reducing both the effort required by the patient and the strain and stress on the healthcare system. In the CESAR project, our goal is to increase the percentage of diagnosed obstructive sleep apnea cases, reduce the time it takes to get a diagnosis, and allow user-friendly and cost-efficient tools to be used for diagnosis at home. Mobile wrist-worn devices are becoming increasingly more powerful and they are equipped with a growing number of on-device sensors. This paper implements an extensible watchOS application, allowing users to collect data from the sensors on the watch. To achieve this we designed and implemented an application named Sopor which collects and processes data collected by the watch. The application collects data from the sensors on the watch and passes them on to a sink which allows events to be aggregated, stored locally or offloaded to an online location. In addition to Sopor, an application named Virga is developed, which allows data stored online to be retrieved and processed on a computer. Virga connects to an iCloud database and downloads data stored by Sopor. Several experiments are performed showing Sopor’s battery usage, resource efficiency, and extensibility. The experiments show that the application is stable and suitable for long-running sleeping sessions.
    [Show full text]
  • 1.13 Ios Developer Documentation 31 1.14 Wrap-Up 32
    DIVE INTO® IOS 6 AN APP-DRIVEN APPROACH DEITEL® DEVELOPER SERIES Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U. S. Corporate and Government Sales (800) 382-3419 [email protected] For sales outside the U. S., please contact: International Sales [email protected] Visit us on the Web: informit.com/ph © 2012 Pearson Education, Inc. All rights reserved. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, elec- tronic, mechanical, photocopying, recording, or likewise. To obtain permission to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you may fax your request to (201) 236-3290.
    [Show full text]