227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and...
Transcript of 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and...
![Page 1: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/1.jpg)
© 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
#WWDC14
Creating Modern Cocoa Apps
Session 227 Tony Parker Software Engineer, Cocoa Frameworks
Frameworks
![Page 2: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/2.jpg)
A Modern Cocoa App
![Page 3: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/3.jpg)
A Modern Cocoa App
![Page 4: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/4.jpg)
Introducing Lister
Built with • Storyboards
• Auto Layout
• NSDocument
OS X and iOS
Objective-C and Swift
![Page 5: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/5.jpg)
adding to do items
![Page 6: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/6.jpg)
adding to do items
![Page 7: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/7.jpg)
![Page 8: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/8.jpg)
![Page 9: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/9.jpg)
![Page 10: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/10.jpg)
![Page 11: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/11.jpg)
![Page 12: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/12.jpg)
![Page 13: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/13.jpg)
![Page 14: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/14.jpg)
![Page 15: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/15.jpg)
![Page 16: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/16.jpg)
![Page 17: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/17.jpg)
![Page 18: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/18.jpg)
![Page 19: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/19.jpg)
Agenda
![Page 20: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/20.jpg)
Agenda
Getting started
![Page 21: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/21.jpg)
Agenda
Getting started
Adding more features
![Page 22: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/22.jpg)
Agenda
Getting started
Adding more features
Where to go next
![Page 23: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/23.jpg)
Getting Started
![Page 24: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/24.jpg)
Model, View, Controller
![Page 25: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/25.jpg)
Model, View, Controller
Model
![Page 26: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/26.jpg)
Model, View, Controller
View
Model
![Page 27: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/27.jpg)
Model, View, Controller
View
Controller
Model
![Page 28: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/28.jpg)
Storyboards
![Page 29: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/29.jpg)
Storyboards
Starting point for creating views and controllers
![Page 30: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/30.jpg)
Storyboards
Starting point for creating views and controllers
Consist of two parts
![Page 31: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/31.jpg)
Storyboards
Starting point for creating views and controllers
Consist of two parts• Scenes
- Part of your user interface
![Page 32: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/32.jpg)
Storyboards
Starting point for creating views and controllers
Consist of two parts• Scenes
- Part of your user interface
• Segues
- Transition from one scene to next
![Page 33: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/33.jpg)
![Page 34: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/34.jpg)
![Page 35: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/35.jpg)
![Page 36: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/36.jpg)
Storyboards
Great for rapid prototyping
![Page 37: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/37.jpg)
Storyboards
Great for rapid prototyping
Compose to form more complicated interfaces
![Page 38: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/38.jpg)
Related Sessions
• Storyboards and Controllers for OS X Pacific Heights Tuesday 4:30PM
![Page 39: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/39.jpg)
Auto Layout
![Page 40: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/40.jpg)
Auto Layout
How views are placed in user interface
![Page 41: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/41.jpg)
Auto Layout
How views are placed in user interface
Changes size and placement of views as content changes
![Page 42: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/42.jpg)
Auto Layout
How views are placed in user interface
Changes size and placement of views as content changes
Specify relationships between views using constraints
![Page 43: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/43.jpg)
![Page 44: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/44.jpg)
Fixed Width
![Page 45: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/45.jpg)
Fixed Width
Fixed to Edges
![Page 46: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/46.jpg)
Fixed Width
Fixed Width
Fixed to Edges
![Page 47: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/47.jpg)
Same Width
Fixed Width
Fixed Width
Fixed to Edges
![Page 48: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/48.jpg)
Same Width
Fixed Width
Fixed Width
Fixed to Edges
Left Aligned
![Page 49: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/49.jpg)
![Page 50: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/50.jpg)
Auto Layout
Allows flexibility as design changes
![Page 51: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/51.jpg)
Auto Layout
Allows flexibility as design changes
Simplifies localization
![Page 52: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/52.jpg)
Auto Layout
Allows flexibility as design changes
Simplifies localization
Xcode has rich interface for working with Auto Layout • Adding new constraints
• Understanding how constraints interact
• Previewing results
• Debugging issues
![Page 53: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/53.jpg)
Related Sessions
• Taking Control of Auto Layout in Xcode 5 WWDC 2013
![Page 54: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/54.jpg)
Documents and Data
![Page 55: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/55.jpg)
Documents and Data
The reason to use your app
![Page 56: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/56.jpg)
Documents and Data
The reason to use your app
Deciding how to store data will drive design
![Page 57: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/57.jpg)
Documents and Data
The reason to use your app
Deciding how to store data will drive design
Two major kinds of data storage in a Cocoa app • Shoebox
• Document-based
![Page 58: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/58.jpg)
Shoebox Apps
![Page 59: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/59.jpg)
Shoebox Apps
Store data in library or container • Usually hidden from user
![Page 60: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/60.jpg)
Shoebox Apps
Store data in library or container • Usually hidden from user
Presents data in single window
![Page 61: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/61.jpg)
Shoebox Apps
Store data in library or container • Usually hidden from user
Presents data in single window
Great for mix and match of data
![Page 62: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/62.jpg)
Shoebox Apps
Store data in library or container • Usually hidden from user
Presents data in single window
Great for mix and match of data
Cocoa provides Core Data
![Page 63: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/63.jpg)
Core Data
![Page 64: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/64.jpg)
Core Data
Generalized object graph and persistence framework
![Page 65: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/65.jpg)
Core Data
Generalized object graph and persistence framework
Efficient performance
![Page 66: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/66.jpg)
Core Data
Generalized object graph and persistence framework
Efficient performance
Change tracking and undo
![Page 67: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/67.jpg)
Core Data
Generalized object graph and persistence framework
Efficient performance
Change tracking and undo
Relationship maintenance
![Page 68: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/68.jpg)
Core Data
Generalized object graph and persistence framework
Efficient performance
Change tracking and undo
Relationship maintenance
Schema migration
![Page 69: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/69.jpg)
Core Data
Generalized object graph and persistence framework
Efficient performance
Change tracking and undo
Relationship maintenance
Schema migration
Query compilation
![Page 70: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/70.jpg)
Related Sessions
• What’s New in Core Data Pacific Heights Thursday 9:00AM
![Page 71: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/71.jpg)
Document-Based Apps
![Page 72: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/72.jpg)
Document-Based Apps
Stores user data in named file container
![Page 73: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/73.jpg)
Document-Based Apps
Stores user data in named file container
Documents may be local or in iCloud
![Page 74: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/74.jpg)
Document-Based Apps
Stores user data in named file container
Documents may be local or in iCloud
Documents are not generally related to each other
![Page 75: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/75.jpg)
Document-Based Apps
Stores user data in named file container
Documents may be local or in iCloud
Documents are not generally related to each other
Users are interested in a few at a time
![Page 76: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/76.jpg)
Document-Based Apps
Stores user data in named file container
Documents may be local or in iCloud
Documents are not generally related to each other
Users are interested in a few at a time
Cocoa provides a document architecture
![Page 77: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/77.jpg)
Cocoa Document Architecture
![Page 78: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/78.jpg)
Cocoa Document Architecture
Provides core features with little or no additional code • Auto Save and Versions
• iCloud
• Asynchronous reading and writing
• Undo
![Page 79: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/79.jpg)
Cocoa Document Architecture
Provides core features with little or no additional code • Auto Save and Versions
• iCloud
• Asynchronous reading and writing
• Undo
Customizable to your app’s needs
![Page 80: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/80.jpg)
Cocoa Document Architecture
Provides core features with little or no additional code • Auto Save and Versions
• iCloud
• Asynchronous reading and writing
• Undo
Customizable to your app’s needs
Start by subclassing NSDocument • Creates, presents, and stores document data
![Page 81: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/81.jpg)
NSDocumentSubclass and enable iCloud, Auto Save, and Versions
![Page 82: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/82.jpg)
NSDocumentSubclass and enable iCloud, Auto Save, and Versions
class ListDocument : NSDocument {
![Page 83: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/83.jpg)
NSDocumentSubclass and enable iCloud, Auto Save, and Versions
class ListDocument : NSDocument { // Default is an empty list var list = List()
![Page 84: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/84.jpg)
NSDocumentSubclass and enable iCloud, Auto Save, and Versions
class ListDocument : NSDocument { // Default is an empty list var list = List() override class func autosavesInPlace() -> Bool { return true }
![Page 85: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/85.jpg)
NSDocumentProvide data to be stored on disk
override func dataOfType(typeName: String, error outError: NSErrorPointer) -> NSData? {}
![Page 86: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/86.jpg)
NSDocumentProvide data to be stored on disk
override func dataOfType(typeName: String, error outError: NSErrorPointer) -> NSData? { if let data = NSKeyedArchiver.archivedDataWithRootObject(list) { return data } }
![Page 87: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/87.jpg)
NSDocumentProvide data to be stored on disk
override func dataOfType(typeName: String, error outError: NSErrorPointer) -> NSData? { if let data = NSKeyedArchiver.archivedDataWithRootObject(list) { return data } // Set error here return nil;}
![Page 88: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/88.jpg)
NSDocumentCreate document from data on disk
override func readFromData(data: NSData, ofType typeName: String, error outError: NSErrorPointer) -> Bool { }
![Page 89: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/89.jpg)
NSDocumentCreate document from data on disk
override func readFromData(data: NSData, ofType typeName: String, error outError: NSErrorPointer) -> Bool { if let deserializedList = NSKeyedUnarchiver.unarchiveObjectWithData(data) as? List { } else { } }
![Page 90: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/90.jpg)
NSDocumentCreate document from data on disk
override func readFromData(data: NSData, ofType typeName: String, error outError: NSErrorPointer) -> Bool { if let deserializedList = NSKeyedUnarchiver.unarchiveObjectWithData(data) as? List { list = deserializedList return true } else { } }
![Page 91: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/91.jpg)
NSDocumentCreate document from data on disk
override func readFromData(data: NSData, ofType typeName: String, error outError: NSErrorPointer) -> Bool { if let deserializedList = NSKeyedUnarchiver.unarchiveObjectWithData(data) as? List { list = deserializedList return true } else { // Set error here return false } }
![Page 92: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/92.jpg)
Related Sessions
• Auto Save and Versions in Mac OS X 10.7 Lion WWDC 2011
![Page 93: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/93.jpg)
Other User Data
![Page 94: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/94.jpg)
Other User Data
Preferences—NSUserDefaults • Application preferences
• System preferences
- Language
- Locale
![Page 95: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/95.jpg)
Other User Data
Preferences—NSUserDefaults • Application preferences
• System preferences
- Language
- Locale
Network—NSURLSession
![Page 96: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/96.jpg)
Other User Data
Preferences—NSUserDefaults • Application preferences
• System preferences
- Language
- Locale
Network—NSURLSession
iCloud key-value store—NSUbiquitousKeyValueStore • Small amounts of data, available on all iCloud devices
![Page 97: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/97.jpg)
Other User Data
Preferences—NSUserDefaults • Application preferences
• System preferences
- Language
- Locale
Network—NSURLSession
iCloud key-value store—NSUbiquitousKeyValueStore • Small amounts of data, available on all iCloud devices
CloudKit
![Page 98: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/98.jpg)
DemoGetting started in Lister
Alex Migicovsky Developer Publications Engineer
![Page 99: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/99.jpg)
Adding More Features
![Page 100: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/100.jpg)
Auto Localization
![Page 101: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/101.jpg)
Auto Localization
Built on top of Auto Layout
![Page 102: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/102.jpg)
Auto Localization
Built on top of Auto Layout
Shares the same UI design but replaces the strings
![Page 103: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/103.jpg)
Auto Localization
Built on top of Auto Layout
Shares the same UI design but replaces the strings
Resizes views appropriately when words are different lengths
![Page 104: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/104.jpg)
Auto Localization
Built on top of Auto Layout
Shares the same UI design but replaces the strings
Resizes views appropriately when words are different lengths
Support both left to right and right to left
![Page 105: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/105.jpg)
![Page 106: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/106.jpg)
![Page 107: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/107.jpg)
![Page 108: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/108.jpg)
Application Bundle Layout
Lister.app/ Contents/ Resources/
![Page 109: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/109.jpg)
Application Bundle Layout
Lister.app/ Contents/ Resources/
Base.lproj/ Main.storyboardc UI, development language
![Page 110: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/110.jpg)
Application Bundle Layout
Lister.app/ Contents/ Resources/
Base.lproj/ Main.storyboardc UI, development language
es.lproj/ Main.strings Spanish strings
![Page 111: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/111.jpg)
Strings File
"key" = "value";
![Page 112: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/112.jpg)
Strings File
"9eV-3V-M02.title" = "Artstay:";
![Page 113: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/113.jpg)
Strings File
"9eV-3V-M02.title" = "Artstay:";
![Page 114: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/114.jpg)
Strings File
"9eV-3V-M02.title" = "Artstay:";
![Page 115: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/115.jpg)
Strings File
"9eV-3V-M02.title" = "Artstay:";
![Page 116: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/116.jpg)
Strings File
"9eV-3V-M02.title" = "Artstay:"; !
"P3b-i2-9LW.title" = "Endway:";
![Page 117: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/117.jpg)
Handoff
Start working on one device and continue on another
![Page 118: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/118.jpg)
Handoff
Start working on one device and continue on another
Support is built in to NSDocument and UIDocument
![Page 119: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/119.jpg)
Handoff
Start working on one device and continue on another
Support is built in to NSDocument and UIDocument
Requires only a small amount of code to enable
![Page 120: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/120.jpg)
Info.plist
![Page 121: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/121.jpg)
Info.plist
![Page 122: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/122.jpg)
Info.plist
![Page 123: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/123.jpg)
Handoff
Lower-level API—NSUserActivity • Native app to web app
• Web app to native app
• Provide additional state beyond document content
• Send custom data using streams
![Page 124: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/124.jpg)
Related Sessions
• Adopting Handoff on iOS and OS X Mission Wednesday 2:00PM
![Page 125: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/125.jpg)
Sharing
Provide a way to share with social networks • Twitter
• …and more
• Single sign-on
![Page 126: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/126.jpg)
Sharing
Provide a way to share with social networks • Twitter
• …and more
• Single sign-on
Integration with extensions from other applications
![Page 127: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/127.jpg)
![Page 128: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/128.jpg)
![Page 129: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/129.jpg)
NSSharingServicePicker
![Page 130: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/130.jpg)
NSSharingServicePicker
Shares NSImage, NSURL, NSString, NSAttributedString
![Page 131: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/131.jpg)
NSSharingServicePicker
Shares NSImage, NSURL, NSString, NSAttributedString
Two steps to sharing • Put a share button in your app
• Present the picker and specify the data to share
![Page 132: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/132.jpg)
NSSharingServicePicker
- (IBAction)shareIt:(NSButton *)sender {}
![Page 133: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/133.jpg)
NSSharingServicePicker
- (IBAction)shareIt:(NSButton *)sender { NSString *greeting = @"Hello, world!";}
![Page 134: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/134.jpg)
NSSharingServicePicker
- (IBAction)shareIt:(NSButton *)sender { NSString *greeting = @"Hello, world!"; NSSharingServicePicker *picker = [[NSSharingServicePicker alloc] initWithItems:@[greeting]];}
![Page 135: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/135.jpg)
NSSharingServicePicker
- (IBAction)shareIt:(NSButton *)sender { NSString *greeting = @"Hello, world!"; NSSharingServicePicker *picker = [[NSSharingServicePicker alloc] initWithItems:@[greeting]]; [picker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSMinYEdge];}
![Page 136: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/136.jpg)
More About Sharing
Your app can provide extensions too • Action
• Finder
• Sharing
• Today
![Page 137: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/137.jpg)
Related Sessions
• Creating Extensions for iOS and OS X, Part 1 Mission Tuesday 2:00PM
• Creating Extensions for iOS and OS X, Part 2 Mission Wednesday 11:30AM
• Integrating with Facebook, Twitter, and Sina Weibo
WWDC 2012
![Page 138: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/138.jpg)
DemoSharing in Lister
!
Alex Migicovsky Developer Publications Engineer
![Page 139: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/139.jpg)
What to Do Next
![Page 140: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/140.jpg)
Adding More Features
Feature Cocoa Class
Undo NSUndoManager
Drag & Drop, Copy & Paste NSPasteboard
Printing NSPrinting
![Page 141: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/141.jpg)
Adding More Features
Feature Cocoa Class
Undo NSUndoManager
Drag & Drop, Copy & Paste NSPasteboard
Printing NSPrinting
![Page 142: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/142.jpg)
Adding More Features
Feature Cocoa Class
Undo NSUndoManager
Drag & Drop, Copy & Paste NSPasteboard
Printing NSPrinting
![Page 143: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/143.jpg)
Adding More Features
Feature Cocoa Class
Undo NSUndoManager
Drag & Drop, Copy & Paste NSPasteboard
Printing NSPrinting
![Page 144: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/144.jpg)
Adding More Features
Energy efficiency
![Page 145: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/145.jpg)
Adding More Features
Energy efficiency
Three key rules for better battery life • Stay idle as long as possible
• Avoid unnecessary work
• Return to idle as quickly as possible
![Page 146: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/146.jpg)
Related Sessions
• Writing Energy Efficient Code, Part 1 Russian Hill Wednesday 10:15AM
![Page 147: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/147.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 148: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/148.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 149: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/149.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 150: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/150.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 151: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/151.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 152: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/152.jpg)
Adding More Features
Feature Cocoa Class
Full screen NSWindow
Resume NSWindowRestoration
Progress reporting NSProgress
Gestures NSGestureRecognizer
Accessibility NSAccessibility
![Page 153: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/153.jpg)
Summary
![Page 154: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/154.jpg)
Summary
Get started with a great foundation
![Page 155: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/155.jpg)
Summary
Get started with a great foundation
Take advantage of the features the frameworks provide
![Page 156: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/156.jpg)
Summary
Get started with a great foundation
Take advantage of the features the frameworks provide
Your app will be in great shape for the future
![Page 157: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/157.jpg)
More Information
Jake Behrens App Frameworks Evangelist [email protected]
Documentation Start Developing Mac Apps Today http://developer.apple.com
Lister https://developer.apple.com/library/ios/lister_objchttps://developer.apple.com/library/ios/lister_swifthttps://developer.apple.com/library/mac/lister_objchttps://developer.apple.com/library/mac/lister_swift
Apple Developer Forums http://devforums.apple.com
![Page 158: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/158.jpg)
Related Sessions
• Accessibility on OS X Russian Hill Tuesday 2:00PM
• Full Screen and Aqua Changes WWDC 2011
• Resume and Automatic Termination in Lion WWDC 2011
![Page 159: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/159.jpg)
Labs
• View Controllers and Cocoa Lab Frameworks Lab B Thursday 11:30AM
• Extensions Lab Frameworks Lab B Thursday 2:00PM
• Cocoa Lab Frameworks Lab B Thursday 4:30PM
![Page 160: 227 Creating Modern Cocoa Apps DF - Apple Inc. · NSString *greeting = @"Hello, world!"; ... and Sina Weibo WWDC 2012. Demo Sharing in Lister! Alex Migicovsky Developer Publications](https://reader030.fdocuments.us/reader030/viewer/2022040409/5ec65bb8ce7e467dd94e7d97/html5/thumbnails/160.jpg)