Iphone Ios 5 Development Essentials

Total Page:16

File Type:pdf, Size:1020Kb

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 ............................................................................................................................ 3 2.1 iOS 5 ............................................................................................................................................................. 3 2.2 Display ......................................................................................................................................................... 3 2.3 Wireless Connectivity ................................................................................................................................... 4 2.4 Wired Connectivity ....................................................................................................................................... 4 2.5 Memory ....................................................................................................................................................... 4 2.6 Cameras ....................................................................................................................................................... 4 2.7 Sensors ......................................................................................................................................................... 4 2.8 Location Detection ....................................................................................................................................... 5 2.9 Central Processing Unit (CPU) ....................................................................................................................... 5 2.10 Speaker and Microphone ............................................................................................................................ 5 2.11 Vibration .................................................................................................................................................... 5 2.12 Summary .................................................................................................................................................... 5 3. iOS 5 Architecture and SDK Frameworks ............................................................................................................ 7 3.1 iPhone OS becomes iOS ................................................................................................................................ 7 3.2 An Overview of the iOS 5 Architecture .......................................................................................................... 7 3.3 The Cocoa Touch Layer ................................................................................................................................. 8 3.3.1 UIKit Framework (UIKit.framework) ....................................................................................................... 9 3.3.2 Map Kit Framework (MapKit.framework) ............................................................................................... 9 3.3.3 Push Notification Service ..................................................................................................................... 10 3.3.4 Message UI Framework (MessageUI.framework) ................................................................................. 10 3.3.5 Address Book UI Framework (AddressUI.framework) ............................................................................ 10 3.3.6 Game Kit Framework (GameKit.framework) ......................................................................................... 10 3.3.7 iAd Framework (iAd.framework) .......................................................................................................... 10 3.3.8 Event Kit UI Framework ....................................................................................................................... 10 3.3.9 Accounts Framework (Accounts.framework) ........................................................................................ 11 3.3.10 Twitter Framework (Twitter.framework) ............................................................................................ 11 3.4 The iOS Media Layer ................................................................................................................................... 11 3.4.1 Core Video Framework (CoreVideo.framework) .................................................................................... 11 3.4.2 Core Text Framework (CoreText.framework) ........................................................................................ 11 3.4.3 Image I/O Framework (ImageIO.framework)........................................................................................ 11 3.4.4 Assets Library Framework (AssetsLibrary.framework)........................................................................... 11 3.4.5 Core Graphics Framework (CoreGraphics.framework) .......................................................................... 11 3.4.6 Core Image Framework (CoreImage.framework) .................................................................................. 12 3.4.7 Quartz Core Framework (QuartzCore.framework) ................................................................................ 12 3.4.8 OpenGL ES framework (OpenGLES.framework) .................................................................................... 12 3.4.9 GLKit Framework (GLKit.framework) .................................................................................................... 12 iii 3.4.10 NewsstandKit Framework (NewsstandKit.framework) ........................................................................ 12 3.4.11 iOS Audio Support .............................................................................................................................. 12 3.4.12 AV Foundation framework (AVFoundation.framework) ...................................................................... 12 3.4.13 Core Audio Frameworks (CoreAudio.framework, AudioToolbox.framework and AudioUnit.framework) .................................................................................................................................................................... 13 3.4.14 Open Audio Library (OpenAL) ............................................................................................................. 13 3.4.15 Media Player Framework (MediaPlayer.framework)........................................................................... 13 3.4.16 Core Midi Framework (CoreMIDI.framework) ..................................................................................... 13 3.5 The iOS Core Services Layer ........................................................................................................................ 13 3.5.1 Address Book Framework (AddressBook.framework) ............................................................................ 13 3.5.2 CFNetwork Framework (CFNetwork.framework) .................................................................................. 13 3.5.3 Core Data Framework (CoreData.framework) ...................................................................................... 13 3.5.4 Core Foundation Framework (CoreFoundation.framework) .................................................................. 13 3.5.5 Core Media Framework (CoreMedia.framework).................................................................................. 14 3.5.6 Core Telephony Framework (CoreTelephony.framework)...................................................................... 14 3.5.7 EventKit Framework (EventKit.framework) ........................................................................................... 14 3.6 Foundation Framework (Foundation.framework) ........................................................................................ 14 3.6.1 Core Location Framework (CoreLocation.framework) ........................................................................... 14 3.6.2 Mobile Core Services Framework (MobileCoreServices.framework)
Recommended publications
  • Zebra Scanner SDK for Ios Developer Guide (En)
    ZEBRA SCANNER SDK for iOS DEVELOPER GUIDE ZEBRA SCANNER SDK for iOS DEVELOPER GUIDE MN001834A04 Revision A July 2019 ii Zebra Scanner SDK for iOS Developer Guide No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from Zebra. This includes electronic or mechanical means, such as photocopying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice. The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software or firmware program delivered hereunder (licensed program). Except as noted below, such license may not be assigned, sublicensed, or otherwise transferred by the user without prior written consent of Zebra. No right to copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall not modify, merge, or incorporate any form or portion of a licensed program with other program material, create a derivative work from a licensed program, or use a licensed program in a network without written permission from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered hereunder, and to include the same on any authorized copies it makes, in whole or in part. The user agrees not to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any portion thereof.
    [Show full text]
  • How Ios 7 Stacks Up:Smartphone OS User Experience Shootout
    How iOS 7 Stacks Up: Smartphone OS User Experience Shootout a Pfeiffer Report Benchmark Project www.pfeifferreport.com @pfeifferreport Introduction Why is it that the arrival of iOS 7 Whether we like it or not, We do not look at features, we do not smartphones have become a compare cutting-edge options and is necessarily a momentous software game. Take any recent gadgets, we only look at aspects event for the smartphone top-of-the-line smartphone, and you that have a direct impact on the are likely to get a well-designed, fast, day-to-day user experience of an market? Simple: Unlike any other pleasant to use bit of hardware: fluid average, non-technical user. operating system out there, it will operation, responsive interaction, fast The aspects we have surveyed and be in the hands of millions or tens graphics. The difference of user rated are the following: experience, therefore, stems of millions of users within a few cognitive load, efficiency, almost exclusively from the customization, as well as user days after its launch. operating system, the user interface experience friction. Based on And that will make it a force to be design, the application integration, the the results from these benchmarks overall coherence. we have then established an overall reckoned with. This report compares the five Mobile Operating System User major mobile operating systems Experience Index presented at the * The question is, of course: in use today: iOS 7, iOS 6, Android , end of this document. Windows Phone 8, and Blackberry 10, The benchmarks are based on the How good is it really? and rates them in terms of user Pfeiffer Consulting Methodology experience.
    [Show full text]
  • 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]
  • Develop-21 9503 March 1995.Pdf
    develop E D I T O R I A L S T A F F T H I N G S T O K N O W C O N T A C T I N G U S Editor-in-Cheek Caroline Rose develop, The Apple Technical Feedback. Send editorial suggestions Managing Editor Toni Moccia Journal, a quarterly publication of or comments to Caroline Rose at Technical Buckstopper Dave Johnson Apple Computer’s Developer Press AppleLink CROSE, Internet group, is published in March, June, [email protected], or fax Bookmark CD Leader Alex Dosher September, and December. develop (408)974-6395. Send technical Able Assistants Meredith Best, Liz Hujsak articles and code have been reviewed questions about develop to Dave Our Boss Greg Joswiak for robustness by Apple engineers. Johnson at AppleLink JOHNSON.DK, His Boss Dennis Matthews Internet [email protected], CompuServe This issue’s CD. Subscription issues Review Board Pete “Luke” Alexander, Dave 75300,715, or fax (408)974-6395. Or of develop are accompanied by the Radcliffe, Jim Reekes, Bryan K. “Beaker” write to Caroline or Dave at Apple develop Bookmark CD. The Bookmark Ressler, Larry Rosenstein, Andy Shebanow, Computer, Inc., One Infinite Loop, CD contains a subset of the materials Gregg Williams M/S 303-4DP, Cupertino, CA 95014. on the monthly Developer CD Series, Contributing Editors Lorraine Anderson, which is available from APDA. Article submissions. Ask for our Steve Chernicoff, Toni Haskell, Judy Included on the CD are this issue and Author’s Guidelines and a submission Helfand, Cheryl Potter all back issues of develop along with the form at AppleLink DEVELOP, Indexer Marc Savage code that the articles describe.
    [Show full text]
  • 129 Practical Drawing for Ios Developers V4 DD F
    Practical Drawing for iOS Developers Taking advantage of the Core Graphics API Session 129 Bill Dudney Secret Service Captain or whatever… These are confidential sessions—please refrain from streaming, blogging, or taking pictures 1 What?! I could draw this with Quartz?! 2 3 4 5 6 7 8 9 Agenda 10 11 Gradient Background 12 Gradient Background Clipped 13 Data Grid 14 Clipped Horizontal Grid 15 Clipped Linear Fill 16 Closing Data 17 Volume Data 18 Text Labels 19 Simple Stocks 20 Drawing 21 22 Color Fill @implementation MyView ... - (void)drawRect:(CGRect)rect { ... } ... @end 23 Color Fill @implementation MyView ... - (void)drawRect:(CGRect)rect { [[UIColor redColor] setFill]; UIRectFill(self.bounds); } ... @end 24 Color Fill @implementation MyView ... - (void)drawRect:(CGRect)rect { [[UIColor redColor] setFill]; UIRectFill(self.bounds); } ... @end 25 Gradient Fill - (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGGradientRef gradient = [self gradient]; CGPoint startPoint = CGPointMake(CGRectGetMidX(self.bounds), 0.0); CGPoint endPoint = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMaxY(self.bounds)); CGContextDrawLinearGradient(ctx, gradient, startPoint, endPoint, 0); } 26 Core Graphics Is a C API Quartz 2D Documentation 27 …just now. —Bill Dudney 28 UIKit to the Rescue Much of Core Graphics is covered by UIKit 29 Gradient Fill Get the context - (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGGradientRef gradient = [self gradient]; CGPoint startPoint = CGPointMake(CGRectGetMidX(self.bounds),
    [Show full text]
  • Legal-Process Guidelines for Law Enforcement
    Legal Process Guidelines Government & Law Enforcement within the United States These guidelines are provided for use by government and law enforcement agencies within the United States when seeking information from Apple Inc. (“Apple”) about customers of Apple’s devices, products and services. Apple will update these Guidelines as necessary. All other requests for information regarding Apple customers, including customer questions about information disclosure, should be directed to https://www.apple.com/privacy/contact/. These Guidelines do not apply to requests made by government and law enforcement agencies outside the United States to Apple’s relevant local entities. For government and law enforcement information requests, Apple complies with the laws pertaining to global entities that control our data and we provide details as legally required. For all requests from government and law enforcement agencies within the United States for content, with the exception of emergency circumstances (defined in the Electronic Communications Privacy Act 1986, as amended), Apple will only provide content in response to a search issued upon a showing of probable cause, or customer consent. All requests from government and law enforcement agencies outside of the United States for content, with the exception of emergency circumstances (defined below in Emergency Requests), must comply with applicable laws, including the United States Electronic Communications Privacy Act (ECPA). A request under a Mutual Legal Assistance Treaty or the Clarifying Lawful Overseas Use of Data Act (“CLOUD Act”) is in compliance with ECPA. Apple will provide customer content, as it exists in the customer’s account, only in response to such legally valid process.
    [Show full text]
  • Enterprise Best Practices for Ios Devices On
    White Paper Enterprise Best Practices for iOS devices and Mac computers on Cisco Wireless LAN Updated: January 2018 © 2018 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 51 Contents SCOPE .............................................................................................................................................. 4 BACKGROUND .................................................................................................................................. 4 WIRELESS LAN CONSIDERATIONS .................................................................................................... 5 RF Design Guidelines for iOS devices and Mac computers on Cisco WLAN ........................................................ 5 RF Design Recommendations for iOS devices and Mac computers on Cisco WLAN ........................................... 6 Wi-Fi Channel Coverage .................................................................................................................................. 7 ClientLink Beamforming ................................................................................................................................ 10 Wi-Fi Channel Bandwidth ............................................................................................................................. 10 Data Rates .................................................................................................................................................... 12 802.1X/EAP Authentication ..........................................................................................................................
    [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]
  • Ipad Voiceover (VO) Controller
    RJ Cooper & Assoc., Inc. 1-800-RJCooper 949-582-2571 Fax: 949-582-3169 Internet: www.rjcooper.com Email: [email protected] iPad VoiceOver (VO) Controller This Controller allows control over those apps that are "VoiceOver-Compliant." This is not all apps! In fact, there are probably only several hundred apps that are VO-compliant. Most are not. Fortunately, and most importantly, most of Apple's are: Camera, Photos, Music, Messages, Notes, Mail, iBooks and several others. "VoiceOver" is a technology that Apple created for Macs, then its i-devices, for blind people to be able to hear what's under their finger. To find out if an app is VO-compatible, and also, to make my VO Controller work with your i-device: 1) Settings; 2) General; 3) Accessibility (scroll down to it); 4) VoiceOver; 5) Turn it on and wait and you will hear it. Now move your finger around slowly and things under your finger will highlight and speak. To activate the selected item, double-tap anywhere on the screen (remember that!). To scroll with VO, use 3 fingers. And that's how VO is supposed to work. Now press your Home button, and launch one of your desired apps, and move your finger around. Do things get highlighted and spoken? If so, then you're good to go! If not, you can write to the developer and beg ;-) But Apple soon discoverd that blind people don't use a mouse or their finger; they use a keyboard with keyboard "shortcuts," that is combinations of keys to navigate and hear their screen.
    [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]
  • Evolution of Ios New Iphone? Whats Ios? Fourteen Updates and Counting! Evolution of Ios Karina Iwabuchi & Sarah Twun-Ampofo
    Karina Iwabuchi & Sarah Twun-Ampofo Evolution of iOS New IPhone? whats iOS? fourteen updates and counting! Evolution of iOS Karina Iwabuchi & Sarah Twun-Ampofo The Apple iOS (iPhone Operating System) greatly be noted as the blueprint to all iOS systems influences many app entrepreneurs, developers after. The iPhone had ground-breaking features and companies. iOS is a core mobile operating such as Visual Voicemail, Multi-Touch Screen, system that powers all Apple products software and Integration of iTunes were considered a from the iPad to the Apple TV, the system has revolutionary advancement too. The iPhone OS been popularized due to its user friendly and 1 was a major key factor in the iOS development progressive interface which can be accredited to history, the first iPhone lacked elements that the 14 innovative updates since 2007. would become an inherent part of the iOS What is an iOS system? operating system such as Photos, Calendar, Notes, Camera, Mail, support for third-party apps, and The iOS system can be simply described as more. It offered a 3.5-in. screen, a 2-megapixel Apple’s special programming that runs specific camera and won plaudits for the then-new applications tailored to the software of their multitouch features. devices, meaning the iOS system allows for new Apple only applications and updates on their iPhone 3Gs and iOS 3 products. It is a core system that powers all In 2009 the iOS 3 system was released alongside devices from Apple iPhone, iPod, iPad, iWatch, the iPhone 3GS, a new model came with massive Apple TV and Mac.
    [Show full text]