Jonathon Manning, Paris Buttield-Addison & Tim Nugent

Total Page:16

File Type:pdf, Size:1020Kb

Jonathon Manning, Paris Buttield-Addison & Tim Nugent ■ ■ ■ ■ ■ ■ S w i f t ■ ■ Development with Cocoa DEVELOPING FOR THE MAC AND IOS APP STORES Jonathon Manning, Paris Buttield-Addison & Tim Nugent www.itbookshub.com Swift Development with Cocoa Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If you’re an experienced programmer who’s never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch. Learn how to use Swift in a wide range of real-world situations, with Cocoa features such as EventKit and Core Animation. You’ll pick up Swift language features and syntax along the way, and understand why using Swift (instead of Objective-C) makes iOS and Mac app development easier, faster, and safer. You’ll also work with several exercises to help you practice as you learn. ■ Learn the OS X and iOS application lifecycle ■ Use storyboards to design adaptive interfaces ■ Explore graphics systems, including the built-in 2D and 3D game frameworks ■ Display video and audio with AVFoundation ■ Store data locally with the ilesystem, or on the network with iCloud ■ Display lists or collections of data with table views and collection views ■ Build apps that let users create, edit, and work with documents ■ Use MapKit, Core Location, and Core Motion to interact with the world Jonathon Manning, cofounder of Secret Lab, is a mobile software engineer, game designer, and computing researcher. Follow him on Twitter at @desplesda. Paris Buttield-Addison, also a cofounder of Secret Lab, is a mobile software engineer, game designer, and computing researcher. Follow him on Twitter at @parisba. Tim Nugent, not a cofounder of Secret Lab, is a mobile app developer, game designer, PhD student, and author. Follow him on Twitter at @The_McJones. MACINTOSH/IPAD & IPHONE Twitter: @oreillymedia facebook.com/oreilly US $39.99 CAN $41.99 ISBN: 978-1-491-90894-5 www.itbookshub.com Swift Development with Cocoa Jonathon Manning, Paris Buttfield-Addison, and Tim Nugent www.itbookshub.com Swift Development with Cocoa by Jonathon Manning, Paris Buttfield-Addison, and Tim Nugent Copyright © 2015 Secret Lab. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editor: Rachel Roumeliotis Indexer: Wendy Catalano Production Editor: Matthew Hacker Cover Designer: Ellie Volckhausen Copyeditor: Jasmine Kwityn Interior Designer: David Futato Proofreader: Charles Roumeliotis Illustrator: Rebecca Demarest December 2014: First Edition Revision History for the First Edition: 2014-12-08: First release See http://oreilly.com/catalog/errata.csp?isbn=9781491908945 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Swift Development with Cocoa, the cover image of an Australasian gannet, and related trade dress are trademarks of O’Reilly Media, Inc. 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 O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While the publisher and the authors have used good faith efforts to ensure that the information and in‐ structions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. ISBN: 978-1-491-90894-5 [M] www.itbookshub.com Table of Contents Preface. xi 1. Cocoa Development Tools. 1 The Mac and iOS Developer Programs 1 Registering for a Developer Program 2 Downloading Xcode 3 Creating Your First Project with Xcode 4 The Xcode Interface 7 Developing a Simple Swift Application 13 Designing the Interface 13 Connecting the Code 15 Using the iOS Simulator 17 Testing iOS Apps with TestFlight 19 2. Programming with Swift. 21 The Swift Programming Language 21 Playgrounds 23 Variables and Constants 24 Types 26 Tuples 28 Arrays 28 Dictionaries 29 Control Flow 30 Switches 33 Functions and Closures 35 Using Functions as Variables 37 Closures 39 Objects 40 Inheritance 42 iii www.itbookshub.com Initialization and Deinitialization 42 Properties 44 Protocols 46 Extensions 47 Access Control 49 Operators 50 Generics 51 Interoperating with Objective-C 52 Using Objective-C and Swift in the Same Project 52 Using Swift Objects in Objective-C 53 Using Objective-C Objects in Swift 53 Modules 54 Memory Management 54 Working with Strings 55 Comparing Strings 56 Searching Strings 57 Data 57 Loading Data from Files and URLs 57 Serialization and Deserialization 58 Design Patterns in Cocoa 59 Model-View-Controller 59 Delegation 60 3. Applications on OS X and iOS. 63 What Is an Application? 63 Applications, Frameworks, Utilities, and More 64 What Are Apps Composed Of? 65 Using NSBundle to Find Resources in Applications 67 The Application Life Cycle 68 OS X Applications 68 iOS Applications 70 The Application Sandbox 75 Application Restrictions 76 Notifications with NSNotification 78 4. Graphical User Interfaces. 81 Interfaces in OS X and iOS 81 MVC and Application Design 82 Nib Files and Storyboards 82 Structure of a Nib File 83 Storyboards 86 Outlets and Actions 87 iv | Table of Contents www.itbookshub.com How Nib Files and Storyboards Are Loaded 88 Constructing an Interface 89 Guidelines and Constraints 90 Building an App with Nibs and Constraints 91 Interfaces on iOS 95 Launch Screen Files 97 UI Dynamics 98 UI and Gravity 98 Snapping UI 99 Core Animation 100 Layers 101 Animations 102 5. Closures and Operation Queues. 105 Closures in Cocoa 106 Concurrency with Operation Queues 107 Operation Queues and NSOperation 108 Performing Work on Operation Queues 108 Putting It All Together 109 6. Drawing Graphics in Views. 115 How Drawing Works 115 The Pixel Grid 117 Retina Displays 118 Pixels and Screen Points 119 Drawing in Views 120 Frame Rectangles 120 Bounds Rectangles 121 Building a Custom View 122 Filling with a Solid Color 123 Working with Paths 124 Creating Custom Paths 126 Multiple Subpaths 128 Shadows 129 Gradients 132 Transforms 135 7. SpriteKit. 139 SpriteKit’s Architecture 139 Making an App That Uses SpriteKit 140 Working with SpriteKit Scenes 141 SpriteKit Nodes 143 Table of Contents | v www.itbookshub.com Putting Sprites in Scenes 145 Responding to Touches 146 Working with Textures 147 Texture Atlases 148 Working with Text 149 Animating Content with Actions 150 Using Shape Nodes 151 Using Image Effect Nodes 153 Adding Physics to SpriteKit Objects 154 Adding Joints to SpriteKit Objects 155 Lighting SpriteKit Scenes 156 Constraints 157 Using Shaders in SpriteKit 157 Using SpriteKit Editor 160 8. SceneKit. 163 SceneKit Structure 164 Working with SceneKit 165 Adding a SceneKit View 165 Adding a Scene 166 Adding a Camera 167 Adding a 3D Object 168 Adding Lights 169 Animating Content in the Scene 170 Creating Text Geometry 172 Combining Animations 173 Working with Materials 174 Normal Mapping 176 Hit Testing 178 Constraints 181 Loading Data from COLLADA Files 182 Adding Physics to the Scene 185 9. Audio and Video. 189 AV Foundation 189 Playing Video with AVPlayer 190 AVPlayerLayer 191 Putting It Together 191 AVKit 195 AVKit on iOS 197 Playing Sound with AVAudioPlayer 199 Speech Synthesis 200 vi | Table of Contents www.itbookshub.com Working with the Photo Library 201 Capturing Photos and Video from the Camera 202 Building a Photo Application 204 The Photo Library 207 10. iCloud and Data Storage. 209 Preferences 209 Registering Default Preferences 210 Accessing Preferences 211 Setting Preferences 211 Working with the Filesystem 212 Using NSFileManager 213 File Storage Locations 217 Working with the Sandbox 217 Enabling Sandboxing 217 Open and Save Panels 218 Security-Scoped Bookmarks 219 iCloud 220 What iCloud Stores 221 Setting Up for iCloud 222 Testing Whether iCloud Works 222 Storing Settings 223 Handling External Changes 224 The iOS Counterpart 225 iCloud Storage 228 iCloud Storage on OS X 228 iCloud Storage on iOS 233 Document Pickers 235 Using iCloud Well 239 11. Cocoa Bindings. 241 Binding Views to Models 241 A Simple Bindings App 242 Binding to Controllers 245 Array and Object Controllers 246 A More Complex Bindings App 247 12. Table Views and Collection Views. 255 Data Sources and Delegates 255 Table Views 256 UITableView on iOS 256 NSTableView on OS X 264 Table of Contents | vii www.itbookshub.com Collection Views 270 UICollectionView on iOS 270 13. Document-Based Applications. 275 The NSDocument and UIDocument Classes 276 Document Objects in MVC 276 Kinds of Documents 277 The Role of Documents 278 Document-Based Applications on OS X 278 Autosaving and Versions 279 Representing Documents with NSDocument 279 Saving Simple Data 280 Saving More Complex Data 282 Document-Based Applications on iOS 286 14. Networking.
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]
  • Noisemaker Lesson02.Pages
    Teaching App Development with Swift NoiseMaker Lesson 2 " NoiseMaker Lesson 2 Description! Add an AVAudioPlayer property to the view controller, and import the AV Foundation framework.! Learning Outcomes! • Practice using the Xcode Documentation and API Reference for technical documentation.! • Discover the AVAudioPlayer class for playing sounds.! • Discover how errors may arise without importing framework dependencies.! Vocabulary! Xcode Documentation and AVAudioPlayer property API Reference optional var framework AV Foundation import Materials! • NoiseMaker Lesson 2 Xcode project! " ! This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, by Yong Bakos.! "1 Teaching App Development with Swift! NoiseMaker Lesson 2! " Opening! Now that we have sound files, what API do we use to play them within our app?! Agenda! • Discuss how we might explore the Xcode Documentation and API Reference to learn how to "play a sound."! • Using the Xcode Documentation and API Reference (⇧⌘0), enter play sound in the search bar, and notice the results shown in the API Reference, SDK Guides and Sample Code sections.! • Using the Xcode Documentation and API Reference (⇧⌘0), explore the AVAudioPlayer class reference.! • Add a controller property for an AVAudioPlayer that is responsible for playing the guitar sound.! var player: AVAudioPlayer? • Discuss declaring the AVAudioPlayer optional type, since the ViewController initializer will not initialize the property with a value.! • Build the project (⌘B), and
    [Show full text]
  • Lecture 14 Slides
    Stanford CS193p Developing Applications for iOS Fall 2011 Stanford CS193p Fall 2011 To d a y Core Data Thread Safety NSManagedObjectContext is not thread-safe. What to do about that. Core Data and Table View Very common way to view data from a Core Data database So it is made very easy with NSFetchedResultsController Big ol’ demo Photomania Browse recent photos by Photographer who took them Stanford CS193p Fall 2011 Core Data Thread Safety NSManagedObjectContext is not thread safe Luckily, Core Data access is usually very fast, so doing it in the main thread is mostly fine. Always safe to access from the thread in which it (or its UIManagedDocument) was created. Feel free to take this approach for your homework (it’s the most straightforward). Another Approach [context performBlock:^{ // o r performBlockAndWait: // do stuff with context }]; This will make sure that the code in the block happens on the context’s safe thread. Note that this might well be the main thread, so you’re not necessarily getting “multithreaded.” Advanced Approach Some contexts (including Core Data ones) have a parentContext (a @property on NSMOC). The parentContext will almost always have its own thread, so you can performBlock: on it. But it is a different context, so you’ll have to save and then refetch to see the changes. Stanford CS193p Fall 2011 Core Data and Table View NSFetchedResultsController Hooks an NSFetchRequest up to a UITableViewController NSFetchedResultsController can answer all of the UITableViewDataSource protocol’s questions! For example ... - (NSUInteger)numberOfSectionsInTableView:(UITableView *)sender { return [[self.fetchedResultsController sections] count]; } - (NSUInteger)tableView:(UITableView *)sender numberOfRowsInSection:(NSUInteger)section { return [[[self.fetchedResultsController sections] objectAtIndex:section] numberOfObjects]; } Stanford CS193p Fall 2011 NSFetchedResultsController Very important method ..
    [Show full text]
  • WWDC14 Media
    Media #WWDC14 Camera Capture: Manual Controls Power to the people Session 508 Brad Ford Camera Software © 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Past Sessions developer.apple.com WWDC 2011 Session 419—Capturing from the Camera on iOS 5 WWDC 2011 Session 417—Introducing AV Foundation Capture for Lion WWDC 2012 Session 520—What’s New in Camera Capture (iOS 6) WWDC 2013 Session 610—What’s New in Camera Capture (iOS 7) Appetzer AVCaptureView on Yosemite iOS Screen Recording Barcode Update Main Course Manual Camera Controls Focus / Exposure / White Balance Dessert Bracketed Capture Appetzer AVCaptureView on Yosemite iOS Screen Recording Barcode Update Main Course Manual Camera Controls Focus / Exposure / White Balance Dessert Bracketed Capture Capture in AVKit Standard user interface for capture on Yosemite AVKit AVCaptureView AVCaptureView AVCaptureView AVCaptureView AVFoundation Capture Objects AVFoundation Capture Objects AVCaptureSession AVFoundation Capture Objects AVCaptureDevice AVCaptureDevice (Camera) (Microphone) AVCaptureDeviceInput AVCaptureDeviceInput AVCaptureSession AVFoundation Capture Objects AVCaptureDevice AVCaptureDevice (Camera) (Microphone) AVCaptureDeviceInput AVCaptureDeviceInput AVCaptureSession AVCaptureMovieFileOutput AVFoundation Capture Objects AVCaptureDevice AVCaptureDevice (Camera) (Microphone) AVCaptureDeviceInput AVCaptureDeviceInput AVCaptureConnection AVCaptureConnection AVCaptureSession AVCaptureMovieFileOutput AVCaptureView
    [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]
  • Screen Capture Tools to Record Online Tutorials This Document Is Made to Explain How to Use Ffmpeg and Quicktime to Record Mini Tutorials on Your Own Computer
    Screen capture tools to record online tutorials This document is made to explain how to use ffmpeg and QuickTime to record mini tutorials on your own computer. FFmpeg is a cross-platform tool available for Windows, Linux and Mac. Installation and use process depends on your operating system. This info is taken from (Bellard 2016). Quicktime Player is natively installed on most of Mac computers. This tutorial focuses on Linux and Mac. Table of content 1. Introduction.......................................................................................................................................1 2. Linux.................................................................................................................................................1 2.1. FFmpeg......................................................................................................................................1 2.1.1. installation for Linux..........................................................................................................1 2.1.1.1. Add necessary components........................................................................................1 2.1.2. Screen recording with FFmpeg..........................................................................................2 2.1.2.1. List devices to know which one to record..................................................................2 2.1.2.2. Record screen and audio from your computer...........................................................3 2.2. Kazam........................................................................................................................................4
    [Show full text]
  • Learning Core Data for Ios Addison-Wesley Learning Series
    Learning Core Data for iOS 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 programming 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 Core Data for iOS Tim Roadley Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their Editor-in-Chief products are claimed as trademarks. Where those designations appear in this book, Mark Taub and the publisher was aware of a trademark claim, the designations have been printed Senior Acquisitions with initial capital letters or in all capitals. Editor The author and publisher have taken care in the preparation of this book, but make Trina MacDonald no expressed or implied warranty of any kind and assume no responsibility for errors Senior Development or omissions.
    [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]
  • Next-Generation Cryptographic Services I’M Going to Tell You, and I Won’T Kill You
    Next-Generation Cryptographic Services I’m going to tell you, and I won’t kill you Session 212 Jon Callas Security Privateer These are confidential sessions—please refrain from streaming, blogging, or taking pictures 1 Introduction • Learn about exciting changes to Apple’s cryptographic architecture • First major reworking of crypto in a decade 2 What You Will Learn • Changes to existing APIs • New Transform API • How to use Apple’s Transform library • How to create your own custom Transforms 3 CDSA Common Data Security Architecture 4 CDSA Is Deprecated • It is a creature of its time • That time is the late 1990s • It is a thinly used, Open Group standard ■ All of the costs, few of the benefits • Only a Mac OS API, not iOS 5 Deprecated Does Not Mean Canceled • CDSA is still available • Start migrating away now • Some parts of Security Framework have layering issues with CDSA ■ Those parts are deprecated, too 6 Requirements for a Replacement Design for the decades ahead • Less code • Faster code • Concurrent code • Flexible programming ■ Crypto includes ciphers, compression, XML, networking, REST, LDAP, databases… 7 New Crypto Architecture • Low-level (pointer, length) Security Framework Core Foundation • Basic core algorithms • FoundationOnly for on FIPS 140 Transforms Core Foundation validation Mac OS • Traditional crypto toolkit CommonCrypto C-language programming • Documentation in man pages ■ man CC_crypto 8 New CommonCrypto Architecture • Starts from Snow Leopard’s CommonCrypto • Recoded internals ■ Both Mac OS, iOS ■ NIST algorithm
    [Show full text]
  • Animation Handbook (PDF)
    Best practices for better design Design Better provides unprecedented access to the insights that power the world’s best design teams. Design Better is brought to you by InVision, the digital customer experience design platform. Learn more at invisionapp.com. Check out the rest of the DesignBetter.co library Design Systems Handbook Design Leadership Handbook Design Thinking Handbook Principles of Product Design Enterprise Design Sprints DesignOps Handbook Animation Handbook The Animation Handbook is the guide to best practices for animation in digital product design. This book uncovers the seven principles of bringing motion into user interface design and explains how animation is the bridge to telling better stories and engaging users in more human and intuitive ways. By bringing elements from our real world experiences into the virtual space, we can build greater trust in our products and better relationships with the people who use them. This book includes stories and interviews with Google, Lyft, Headspace, and Zova Fitness, that put principles into practice, and show how motion can enable stronger design systems and more expressive brands. The Animation Handbook will prime you not just to animate but to craft exceptional and more intuitive digital product interfaces for your customers. Contents Motion’s purpose The impact of animation Principles of animation Making product magic Animation collaboration Scale solutions Taking animation further Small things matter Chapter—01 Motion’s purpose The impact of animation While the standard flavors of salty, sweet, sour, and bitter are obvious to us and easy to experience, the fifth flavor— umami—is ineffable. It’s the salience of parmesan cheese, anchovies, dried tomatoes, fish sauce, and dashi.
    [Show full text]
  • WWDC15 Graphics and Games
    Graphics and Games #WWDC15 Enhancements to SceneKit Session 606 Thomas Goossens Amaury Balliet Sébastien Métrot © 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. GameKit APIs High-Level APIs SceneKit SpriteKit Services Model I/O GameplayKit GameController Low-Level APIs Metal OpenGL SceneKit Since Mountain Lion Since iOS 8 SceneKit Particles Physics Physics Fields SpriteKit Scene Editor Scene Editor Available in Xcode 7 Scene Editor Can open and edit DAE, OBJ, Alembic, STL, and PLY files New native file format (SceneKit archives) Scene Editor SceneKit file format SCNScene archived with NSKeyedArchiver NSKeyedArchiver.archiveRootObject(scnScene, toFile: aFile) SCN Scene Editor Build your game levels Scene Editor Particles Physics Physics Fields Actions Scene Editor Shader Modifiers Ambient Occlusion Demo Scene Editor Amaury Balliet Behind the Scene Thomas Goossens Behind the Scene Concept phase Behind the Scene 3D modeling Behind the Scene Production • Final models • Textures • Lighting • Skinned character Behind the Scene Make it awesome • Particles • 2D overlays • Vegetation • Fog Game Sample Collisions with walls Rendered Mesh Collision Mesh Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Collisions with the Ground Animations Animations Game Sample Animated elements Skinning
    [Show full text]
  • Updating the Sophatarkiosk Software on an Apple TV
    Updating the SophatarKiosk app on Apple TV devices September 2016, v1.0 2 North First St, 5th floor San Jose, CA 95113 844-469-4MY-SOPH (844-469-7674) [email protected] Updating the SophatarKiosk app on Apple TV devices This document describes the steps to update the SophatarKiosk app on your AppleTV’s when Sophatar has informed you that an app update is available. Required: - The Apple TV remote that is paired with the Apple TV for which you want to upgrade the app - Active internet connection of the Apple TV Proprietary Information. Commercial In-Confidence. 1 Updating the SophatarKiosk app on Apple TV devices September 2016, v1.0 Steps: 1. Go to the Apple TV home screen. For instructions on how to do that while your signage is playing, see the Sophatar document ‘Using the Apple TV Remote’. 2. Select and open the TestFlight app on the Home screen (normally 2nd item from the left on top row). Login with the username & password that Sophatar provided to you in their app update email. Once logged into TestFlight you will see SophatarKiosk listed; it will already be the new version. Select it. After that you will see a screen similar to below. Proprietary Information. Commercial In-Confidence. 2 Updating the SophatarKiosk app on Apple TV devices September 2016, v1.0 3. The number between () is the build number of the software (1005 in the picture). This number will increment for every app update and should be the same number as in the app update email you received from Sophatar (if your Apple TV would have lost its internet connection then it may be a previous version still).
    [Show full text]