Lecture 7 Mac OS X and Ios Operating Systems Saving Data In

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 7 Mac OS X and Ios Operating Systems Saving Data In Mac OS X and iOS operating systems Lecture 7 Saving data in iOS Tomasz Idzi Agenda NSString and NSData NSFileManager Property List JSON Core Data Mac OS X and iOS operating systems Tomasz Idzi iOS Directories App Documents Inbox Library Caches temp Mac OS X and iOS operating systems Tomasz Idzi iOS Directories Directory Description Backed up by iTunes AppName.app This directory contains the app and all of its resources. NO Documents/ Use this directory to store user-generated content. YES Use this directory to access files that your app was asked to open Documents/Inbox YES by outside entities. Such as mail’s attachments. This is the top-level directory for any files that are not user data Library YES files. Library/Caches Subfolder of Library for any caching files. NO Use this directory to write temporary files that don’t need to persist Tmp/ NO between launches of your app. Mac OS X and iOS operating systems Tomasz Idzi Accessing File Paths NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString *docPath = [paths firstObject]; NSString *path = [docPath stringByAppendingComponent:@”myFile.txt”]; Mac OS X and iOS operating systems Tomasz Idzi Writing NSData BOOL success = [data writeToFile:path options:NSDataWritingAtomic error:&error]; NSDataWritingAtomic - create temp file first NSDataWritingWithoutOverwriting - prevent overwriting an existing file Mac OS X and iOS operating systems Tomasz Idzi Reading NSData [NSData alloc] initWithContentsOfFile: path options:NSDataReadingMappedIfSafe error:&error]; NSDataReadingMappedIfSafe - file should be mapped into virtual memory, if possible and safe NSDataReadingUncached - file should not be stored in the file-system caches NSDataReadingMappedAlways - map the file, if possible. Mac OS X and iOS operating systems Tomasz Idzi Writing NSString BOOL success = [myString writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:&error]; NSUTF8StringEncoding - 8-bit representation of Unicode characters NSASCIIStringEncoding - Strict 7-bit ASCII encoding within 8-bit chars. Mac OS X and iOS operating systems Tomasz Idzi Reading NSString [NSData alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; Mac OS X and iOS operating systems Tomasz Idzi Writing/Reading NSString and NSData DEMO Mac OS X and iOS operating systems Tomasz Idzi NSFileManager NSFileManager *fileManager = [NSFileManager defaultManager]; Providing a convenient way to: create read move copy delete files and directories. Mac OS X and iOS operating systems Tomasz Idzi NSFileManager NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDir ectory, NSUserDomainMask, YES) firstObject]; NSString *filePath = [documentsPath stringByAppendingPathComponent:@"file.txt"]; BOOL fileExists = [fileManager fileExistsAtPath:filePath]; Mac OS X and iOS operating systems Tomasz Idzi NSFileManager - list of files NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *urls = [fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; NSArray *files = [fileManager contentsOfDirectoryAtURL: [urls firstObject] includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsHiddenFiles error:&error]; Mac OS X and iOS operating systems Tomasz Idzi NSFileManager - list of files [fileManager contentsOfDirectoryAtURL:[urls firstObject] includingPropertiesForKeys:nil options:NSFileBusy error:&error]; NSFileAppendOnly - The key in a file attribute dictionary whose value indicates whether the file is read-only. NSFileBusy - The key in a file attribute dictionary whose value indicates whether the file is busy. NSFileCreationDate - The key in a file attribute dictionary whose value indicates the file's creation date NSFileType - The key in a file attribute dictionary whose value indicates the file's type. NSDirectoryEnumerationSkipsHiddenFiles - Do not enumerate hidden files. Mac OS X and iOS operating systems Tomasz Idzi NSFileManager - list of files NSPredicate *predicate = [NSPredicate predicateWithFormat:@"pathExtension == 'png'"]; for (NSURL *fileURL in [contents filteredArrayUsingPredicate:predicate]) { // Enumerate each .png file in directory } Mac OS X and iOS operating systems Tomasz Idzi NSFileManager - create/delete directory NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; NSString *imagesPath = [documentsPath stringByAppendingPathComponent:@"images"]; if (![fileManager fileExistsAtPath:imagesPath]) { [fileManager createDirectoryAtPath:imagesPath withIntermediateDirectories:NO attributes:nil error:nil]; } BOOL deleteSucess = [fileManager removeItemAtPath:imagesPath error:&error]; Mac OS X and iOS operating systems Tomasz Idzi NSFileManager - copy/move directory BOOL success = [fileManager moveItemAtPath:source toPath:destination error:&error]; BOOL success = [fileManager copyItemAtURL:source toURL:destination error:&error]; Mac OS X and iOS operating systems Tomasz Idzi NSFileManager DEMO Mac OS X and iOS operating systems Tomasz Idzi Property List Mac OS X and iOS operating systems Tomasz Idzi Property List XML Property List Standard Property List Editable by hand Device Independent Binary Property List Fast loading ASCII Legacy Property List Read only Mac OS X and iOS operating systems Tomasz Idzi Property List - supported types Abstract type XML element Cocoa class Core Foundation type array <array> NSArray CFArray dictionary <dict> NSDictionary CFDictionary string <string> NSString CFString data <data> NSData CFData date <date> NSDate CFDate number - integer <integer> NSNumber (intValue) CFNumber number - floating point <real> NSNumber (floatValue) CFNumber NSNumber (boolValue == Boolean <true/> or <false/> CGBoolean YES or boolValue == NO) Mac OS X and iOS operating systems Tomasz Idzi Property List - reading [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:&format error:&error]; NSPropertyListImmutable - Specifies that the property list should be immutable. NSPropertyListMutableContainers - Causes the returned property list to have mutable containers but immutable leaves. NSPropertyListMutableContainersAndLeaves - Causes the returned property list to have mutable containers and leaves. Mac OS X and iOS operating systems Tomasz Idzi Property List - reading [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:&format error:&error]; NSPropertyListOpenStepFormat - Specifies the ASCII property list format inherited from the OpenStep APIs. NSPropertyListXMLFormat_v1_0 - Specifies the XML property list format. NSPropertyListBinaryFormat_v1_0 - Specifies the binary property list format. Mac OS X and iOS operating systems Tomasz Idzi Property List - writing [NSPropertyListSerialization dataWithPropertyList:plist format:NSPropertyListXMLFormat_v1_0 options:0 error:&error]; Property list must have one object as the root object. The option parameter is currently unused. Unsupported types will fail with an error. Mac OS X and iOS operating systems Tomasz Idzi Property List DEMO Mac OS X and iOS operating systems Tomasz Idzi JSON JSON stands for JavaScript Object Notation. It is a human readable format used to transmit data. JSON is formatted in attribute-value pairs. It is an alternative to XML for sending data across the network. Mac OS X and iOS operating systems Tomasz Idzi JSON - types Primitive JavaScript Types: String, Boolean, Number, Null Arrays are indicated by brackets - [] Objects are indicated by braces - {} Objects are collection of name-value pairs. Use commas to add additional fields. Mac OS X and iOS operating systems Tomasz Idzi JSON - NSJSONSerialization Convert JSON to foundation objects or can convert foundation to JSON The top level object is an NSArray or an NSDictionary All objects are insentence of NSString, NSNumber, NSArray, NSDictionary or NSNull All dictionary keys are NSString Mac OS X and iOS operating systems Tomasz Idzi JSON - Decoding +JSONObjectWithData:options:error: +JSONObjectWithStream:options:error: Mac OS X and iOS operating systems Tomasz Idzi JSON - Encoding +dataWithJSONObject:options:error +writeJSONObject:toStream:options:error Mac OS X and iOS operating systems Tomasz Idzi JSON DEMO Mac OS X and iOS operating systems Tomasz Idzi Core Data Managed Object Context Presistent Store Managed Objects Modeling Objects Fetch Request Mac OS X and iOS operating systems Tomasz Idzi.
Recommended publications
  • Chapter 1. Origins of Mac OS X
    1 Chapter 1. Origins of Mac OS X "Most ideas come from previous ideas." Alan Curtis Kay The Mac OS X operating system represents a rather successful coming together of paradigms, ideologies, and technologies that have often resisted each other in the past. A good example is the cordial relationship that exists between the command-line and graphical interfaces in Mac OS X. The system is a result of the trials and tribulations of Apple and NeXT, as well as their user and developer communities. Mac OS X exemplifies how a capable system can result from the direct or indirect efforts of corporations, academic and research communities, the Open Source and Free Software movements, and, of course, individuals. Apple has been around since 1976, and many accounts of its history have been told. If the story of Apple as a company is fascinating, so is the technical history of Apple's operating systems. In this chapter,[1] we will trace the history of Mac OS X, discussing several technologies whose confluence eventually led to the modern-day Apple operating system. [1] This book's accompanying web site (www.osxbook.com) provides a more detailed technical history of all of Apple's operating systems. 1 2 2 1 1.1. Apple's Quest for the[2] Operating System [2] Whereas the word "the" is used here to designate prominence and desirability, it is an interesting coincidence that "THE" was the name of a multiprogramming system described by Edsger W. Dijkstra in a 1968 paper. It was March 1988. The Macintosh had been around for four years.
    [Show full text]
  • Darwin: Mac OS X's Core OS
    ADC April 2001 3/8/01 1:57 PM Page 1 Apple Developer Connection Direct Darwin: Mac OS X’s Core OS eneath Mac OS X’s user-friendly and attractive user interface, Most of the reference documents can be Aqua, and the application frameworks (Classic, Carbon and found in the /Developer/Documentation/ BCocoa) is Darwin: Mac OS X’s core OS. Unseen by users, Kernel directory on any Mac OS X system Darwin provides a strong yet flexible foundation with features like with the Mac OS X Developer Tools package preemptive multitasking, protected memory and real-time support installed. that make Mac OS X a truly modern operating system. The focus of this article is to provide a brief overview of Components of Darwin Darwin and its components as well as give an introduction to Just like in the old Reese’s Peanut Butter developing kernel extensions—modules that extend Darwin’s Cups commercials (“You’ve got chocolate in functionality. For more in-depth information, you should read my peanut butter… No, you’ve got peanut butter on my choco- Inside Mac OS X: Kernel Environment which is available, along late!”), Darwin blends a mixture of mature industry standard com- with other documents referred to in this article, on the Apple ponents such as Mach and BSD with Apple-engineered components Developer Connection (ADC) web site in the Mac OS X to provide Mac OS X with a stable, reliable and extensible founda- Documentation section: tion. Darwin consists of five main components: Mach, I/O Kit, File http://developer.apple.com/techpubs/macosx/macosx.html System, Networking and BSD.
    [Show full text]
  • Managing OS X with Configuration Profiles
    Apple Technical White Paper Managing OS X with Configuration Profiles Apple Technical White Paper Managing OS X with Configuration Profiles OS X Lion v 10.7.3 1 Apple Technical White Paper Managing OS X with Configuration Profiles Table of Contents About Configuration Profiles .......................................................................................3 Creating Configuration Profiles ..................................................................................8 Deploying Configuration Profiles ...............................................................................13 Appendix A: Profile Reference .....................................................................................25 Appendix B: Service Port Reference ..........................................................................28 Appendix C: Example Profiles ......................................................................................29 2 Apple Technical White Paper Managing OS X with Configuration Profiles About Configuration Profiles Introduction On iOS devices, preferences and preconfigured settings are managed with Mobile Device Management (MDM) technologies and configuration profiles. Beginning with OS X Lion, Apple has brought the configuration profile and MDM technologies from iOS to OS X. Configuration profiles not only allow for the same preference policies to be deployed as the Managed Preferences system, but they also bring powerful new configuration options such as directory service binding, 802.1X configuration, and certificate
    [Show full text]
  • Dell Encryption Enterprise for Mac Administrator Guide V10.9
    Dell Encryption Enterprise for Mac Administrator Guide v10.9 March 2021 Rev. A02 Notes, cautions, and warnings NOTE: A NOTE indicates important information that helps you make better use of your product. CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2012-2021 Dell Inc. All rights reserved. Registered trademarks and trademarks used in the Dell Encryption and Endpoint Security Suite Enterprise suite of documents: Dell™ and the Dell logo, Dell Precision™, OptiPlex™, ControlVault™, Latitude™, XPS®, and KACE™ are trademarks of Dell Inc. Cylance®, CylancePROTECT, and the Cylance logo are registered trademarks of Cylance, Inc. in the U.S. and other countries. McAfee® and the McAfee logo are trademarks or registered trademarks of McAfee, Inc. in the US and other countries. Intel®, Pentium®, Intel Core Inside Duo®, Itanium®, and Xeon® are registered trademarks of Intel Corporation in the U.S. and other countries. Adobe®, Acrobat®, and Flash® are registered trademarks of Adobe Systems Incorporated. Authen tec® and Eikon® are registered trademarks of Authen tec. AMD® is a registered trademark of Advanced Micro Devices, Inc. Microsoft®, Windows®, and Windows Server®, Windows Vista®, Windows 7®, Windows 10®, Active Directory®, Access®, BitLocker®, BitLocker To Go®, Excel®, Hyper-V®, Outlook®, PowerPoint®, Word®, OneDrive®, SQL Server®, and Visual C++® are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. VMware® is a registered trademark or trademark of VMware, Inc. in the United States or other countries.
    [Show full text]
  • Clustering and Backing up Hyper-V 2012 R2 on Oracle Zfs Storage Appliance
    Clustering and Backing Up Hyper-V 2012 R2 with the Oracle ZFS Storage Appliance ORACLE WHITE PAPER | APRIL 2016 Table of Contents Introduction 3 Target Audience 3 Solution Overview 4 Oracle ZFS Storage Appliance Storage Tiering Overview 5 Prerequisites 6 Provisioning iSCSI LUN(s) on Oracle ZFS Storage Appliance 7 Creating a Pool 7 Enabling iSCSI Service 11 Configuring the iSCSI Network 11 Creating an iSCSI Target 12 Registering iSCSI Initiators 15 Creating a Project 19 Creating iSCSI LUNs 20 Connecting Hyper-V Hosts to Oracle ZFS Storage Appliance iSCSI LUN(s) 21 Configuring the iSCSI Network Interface 22 Installing Hyper-V Role, Failover Cluster, and MPIO Features 25 Connecting Hyper-V Hosts to the Oracle ZFS Storage iSCSI Target 30 Configure MPIO for iSCSI Devices Support 36 Creating the Hyper-V Cluster 37 Creating and Validating the Cluster 37 Creating Cluster Shared Volumes (CSV) for Highly Available Virtual Machines 41 Creating a Test Virtual Machine 42 Testing Failover and Failback 47 Monitoring the Oracle ZFS Storage Appliance with DTrace Analytics 50 1 CLUSTERING AND BACKING UP HYPER-V 2012 R2 ON ORACLE ZFS STORAGE APPLIANCE Backing Up Hyper-V VMs Using Commvault Simpana and Intellisnap Plug- for Oracle ZFS Storage Appliance 53 Setting Up the Array Information 53 Installing Agent Software on the Hyper-V Clustered Hosts 53 Configuring the Hyper-V Clients in CommCell Console 53 Creating a Storage Library for the Snapshots 54 Creating a Storage Policy 54 Creating the Snapshot 54 Performing a Backup 55 Restoration 55 Conclusion 55 Appendix A: Reference Architecture for Example Configuration 56 Appendix B: Benchmark Results 58 SPC-2 Results 58 Oracle Quality Awards for NAS 58 Appendix C: Additional References 59 2 CLUSTERING AND BACKING UP HYPER-V 2012 R2 ON ORACLE ZFS STORAGE APPLIANCE Introduction The costs of traditional servers – their deployment, maintenance and recovery time, data center space usage, power and cooling – are key reasons that have led to high adoption rates for virtualization solutions.
    [Show full text]
  • Automator Applescript Actions Tutorial
    Automator AppleScript Actions Tutorial Apple Applications > Automator 2007-07-18 IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, Apple Inc. MERCHANTABILITY, OR FITNESS FOR A © 2005, 2007 Apple Inc. PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED “AS IS,” AND All rights reserved. YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND No part of this publication may be ACCURACY. reproduced, stored in a retrieval system, or IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, transmitted, in any form or by any means, OR CONSEQUENTIAL DAMAGES mechanical, electronic, photocopying, RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if recording, or otherwise, without prior advised of the possibility of such damages. written permission of Apple Inc., with the THE WARRANTY AND REMEDIES SET following exceptions: Any person is hereby FORTH ABOVE ARE EXCLUSIVE AND IN authorized to store documentation on a LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, single computer for personal use only and or employee is authorized to make any to print copies of documentation for modification, extension, or addition to this warranty. personal use provided that the Some states do not allow the exclusion or documentation contains Apple’s copyright limitation of implied warranties or liability for notice. incidental or consequential damages, so the above limitation or exclusion may not apply to The Apple logo is a trademark of Apple Inc. you. This warranty gives you specific legal rights, and you may also have other rights which Use of the “keyboard” Apple logo vary from state to state.
    [Show full text]
  • The Netbsd Logical Volume Manager
    The NetBSD Logical Volume Manager Adam Hamsik The NetBSD Foundation [email protected] Abstract LVM is a method of allocating disk space on a disk storage devices. Which is more flexible than conventional ones. Logical Volume Manager can usually stripe, mirror or otherwise combine disk partitions to bigger virtual partitions which can be easily moved, resized or manipulated in different ways while in use. Volume Management is one form of disk storage virtualization used in Operating Systems. The NetBSD LVM has two parts user land tools and a kernel driver. Kernel driver is called device- mapper. User land part is based on Linux lvm tools developed by a community managed by Redhat inc. The Device-mapper driver can create virtual disk devices according to device table loaded to it. This table specifies which devices are used as a backend, on which offset on particular device virtual device starts. Device-mapper configuration is not persistent and must be loaded to kernel after each reboot by lvm the tools. 1 Introduction 2 Table of Contents 1. Introduction ........................................................................................................................................... 2 2. Background .......................................................................................................................................... 2 2.1. Volume Management Design .................................................................................................... 2 2.2. Volume Manager Features .......................................................................................................
    [Show full text]
  • A Fast Method for Implementation of The
    International Journal of Programming Languages and Applications ( IJPLA ) Vol.3, No.2, April 2013 A FAST METHOD FOR IMPLEMENTATION OF THE PROPERTY LISTS IN PROGRAMMING LANGUAGES Hassan Rashidi1 1 Department of Electrical, Computer and IT Engineering, Islamic Azad University, Qazvin Branch, Iran [email protected];[email protected] ABSTRACT One of the major challenges in programming languages is to support different data structures and their variations in both static and dynamic aspects. One of the these data structures is the property list which applications use it as a convenient way to store, organize, and access standard types of data. In this paper, the standards methods for implementation of the Property Lists, including the Static Array, Link List, Hash and Tree are reviewed. Then an efficient method to implement the property list is presented. The experimental results shows that our method is fast compared with the existing methods. KEYWORDS Programming Languages, Property List, Static Array, Link List, Set, Hash, Tree. 1. INTRODUCTION Many applications and databases require some mechanisms for storing variable-size data objects of information in some situations [1]. A variable-size data objects is one in which the number of components in an object may change dynamically during program execution. Some of the major types of variable-size data structures are list, list structure, stack, queue, tree, directed graph and property list. We focus on the property list, which is a list of alternating names and values. As a formal definition for the property list in the standard textbook [1], a record with a varying number of components is termed as property list if the number of components may vary without restriction.
    [Show full text]
  • Copyrighted Material
    Part I Mac OS X Basics COPYRIGHTED MATERIAL 995363c01.indd5363c01.indd 1 11/25/09/25/09 44:39:27:39:27 PPMM 995363c01.indd5363c01.indd 2 11/25/09/25/09 44:39:27:39:27 PPMM CHAPTER 1 Mac OS X Architecture This chapter begins by addressing many of the basics of a Mac OS X system. This includes the general architecture and the tools necessary to deal with the architecture. It then addresses some of the security improvements that come with version 10.5 “Leopard”, the most recent version of Mac OS X. Many of these security topics will be discussed in great detail throughout this book. Basics Before we dive into the tools, techniques, and security of Mac OS X, we need to start by discussing how it is put together. To understand the details of Leopard, you need fi rst to understand how it is built, from the ground up. As depicted in Figure 1-1, Mac OS X is built as a series of layers, including the XNU kernel and the Darwin operating system at the bottom, and the Aqua interface and graphical applications on the top. The important components will be discussed in the following sections. 3 995363c01.indd5363c01.indd 3 11/25/09/25/09 44:39:27:39:27 PPMM 4 Part I ■ Mac OS X Basics Applications Safari, Mail, iCal, etc. GUI Aqua Application Environments BSD, X11, Carbon, Cocoa, AWT, Swing Libraries URL parsing, Networking, Core Audio, HTML rendering, etc. Kernel BSD (signals, sockets, etc.) Mach (virtual memory, IPC, etc.) Firmware EFI Hardware Apple hardware Figure 1-1: Basic architecture of a Mac OS X system XNU The heart of Mac OS X is the XNU kernel.
    [Show full text]
  • Property List Programming Guide Contents
    Property List Programming Guide Contents Introduction to Property Lists 5 Organization of This Document 5 Quick Start for Property Lists 7 Create the XML Property List 7 Define Storage for the Property-List Objects 8 Create the User Interface 9 Read in the Property List 11 Write Out the Property List 12 Run and Test the Application 13 About Property Lists 14 What is a Property List? 14 When to Use Property Lists 16 Property List Representations 16 Creating Property Lists Programmatically 17 Creating a Property List in Objective-C 17 Creating a Property List in Core Foundation 19 About Numbers and Property Lists in Core Foundation 21 Understanding XML Property Lists 24 Serializing a Property List 26 Saving and Restoring a Property List in Objective-C 26 Saving and Restoring a Property List in Core Foundation 28 Using Property List Services with Cocoa 34 Reading and Writing Property-List Data 36 Using Objective-C Methods to Read and Write Property-List Data 36 Using Core Foundation Functions to Read and Write Property-List Data 38 Old-Style ASCII Property Lists 40 NSString 40 2010-03-24 | Copyright © 2010 Apple Inc. All Rights Reserved. 2 Contents NSData 40 NSArray 41 NSDictionary 41 Document Revision History 42 2010-03-24 | Copyright © 2010 Apple Inc. All Rights Reserved. 3 Tables and Listings Quick Start for Property Lists 7 Listing 1-1 Implementation code for table view’s data source 10 Listing 1-2 Reading in and converting the XML property list 11 Listing 1-3 Converting and writing the property list to the application bundle 12 About
    [Show full text]
  • A Deep Dive Into Macos MDM (And How It Can Be Compromised) by Jesse Endahl & Max Bélanager
    A Deep Dive into macOS MDM (and how it can be compromised) by Jesse Endahl & Max Bélanager August 2018 Version 1.0 About the authors 4 Acknowledgements 4 Summary 4 Basics 5 What is MDM? 5 Setup process 5 What is DEP? 6 Setup process 6 What are configuration profiles? 7 Overview 8 Entities 8 Protocols & Authentication 9 MDM 9 MDM network communication 11 MDM authentication 12 DEP 13 DEP Reseller API 13 DEP “cloud service” API 15 DEP internal API 16 DEP authentication 16 DEP Reseller API Authentication 16 DEP “cloud service” API Authentication 17 DEP internal API Authentication 18 SCEP 18 SCEP Authentication 18 APNs 19 Establishment of trust 20 MDM 20 Establishment of trust between MDM vendor and Apple 20 Establishment of trust between Customer, MDM vendor, and Apple 20 DEP 21 Establishment of trust between Reseller and Apple 21 Establishment of trust between Reseller and Customer 21 Establishment of trust between MDM Vendor and Apple 22 Establishment of trust between Device and Apple 22 Establishment of trust between Device and MDM Vendor 22 Putting it all together: Device bootstrap overview (DEP + MDM) 25 Deep Dive 25 Architecture 26 ConfigurationProfiles.framework 26 Step 4: Retrieving the activation record 27 Step 5: Retrieving the activation profile 29 Step 6: Installing the activation profile 30 Step 7: Listening for commands 33 Vulnerability: InstallApplication 33 Fix: InstallEnterpriseApplication 37 Conclusion 38 Takeaways 38 MDM Vendor Product Security Checklist 38 Recommendations for Apple 39 Appendix 40 Trust hierarchy on macOS 40 Authentication methods 40 List of macOS binaries related to MDM 41 List of Apple server URLs 45 openssl output 47 About the authors Jesse Endahl Jesse Endahl is co-founder, CPO, and CSO at Fleetsmith.
    [Show full text]
  • This Technical Note Was Created for Application Developers Interested in Writing Software That Is Compatible with Mac OS X
    This Technical Note was created for application developers interested in writing software that is compatible with Mac OS X. This list includes changes that affect API level programming and product testing, it is not intended to be an exhaustive list of all the changes in this software update. CONTENTS CoreFoundation CFNetwork Apple Help CFString AppleScript CFURL Scripting Additions Dock Script Editor File Systems Script Runner Tools AFP Server Finder Scripting AppleShare Client HFS Audio HFS+ MSDOS Audio HAL NFS Audio Toolbox ISO 9660 AudioUnit SMB IOAudioFamily UDF Sound Manager WebDAV Speech Recognition Manager Graphics BSD Commands Carbon ColorSync Draw Sprocket Alias Manager ImageCapture Appearance Manager OpenGL / OpenGL Carbon / AGL Apple Type Services (ATS) Printing ATSUI Quartz 2D Apple events QuickTime Carbon Core Code Fragment Manager Hardware/Devices Component Manager Control Manager Disk Arbitration Date & Time Utilities IOKit Dialog Manager KEXT Management Drag Manager Mass Storage Event Manager PCCard Support File Manager SCSI Architecture Model (SAM) Folder Manager Font Manager Java FontSync Gestalt Manager AWT Help Tags Bridge Technology Icon Services Embedding Menu Manager Graphics MLTE HotSpot Navigation Services Swing Process Manager Kernel QuickDraw Script Manager BSD Kernel Text Encoding Converter Mach Kernel Text Services Manager Launch Services Unicode Utilities Window Manager LoginWindow Networking Classic Runtime Cocoa AppleTalk DHCP and BOOTP AppKit Directory Services Foundation Internet Config NSDrawer LDAP Plug-in NSFileManager PPP NSFileWrapper URL Access NSOpenPanel NSSavePanel Security NSScrollView NSSplitView Authorization NSString CSP NSTableView Keychain NSTabView Security Framework NSTextField NSTextStorage Tools NSTextView NSToolbar gdb NSToolTip gcc NSView Interface Builder NSWindow Objective C Runtime Printing (AppKit) Performance Tools Keyboard UI (Cocoa) Project Builder References Downloadables [Oct 15 2001] Apple Help Apple Help provides system-wide instructional help services for virtuallyall aspects of Mac OS.
    [Show full text]