Introducing the Contacts Framework

Similar documents
ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

Address Book for iphone

Getting the Most Out of HealthKit

What s New in Notifications

Monetize and Promote Your App with iad

Seamless Linking to Your App

Data Delivery with Drag and Drop

WatchKit In-Depth, Part 2

Accessibility on OS X

CloudKit Tips And Tricks

Enhancing your apps for the next dimension of touch

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

What s New in CloudKit

What's New in Core Spotlight

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Camera, Events, and Contacts. Dr. Sarah Abraham

Creating Complications with ClockKit Session 209

Mysteries of Auto Layout, Part 1

What s New in HomeKit

Introducing the Photos Frameworks

Using and Extending the Xcode Source Editor

Introducing CloudKit. A how-to guide for icloud for your Apps. Frameworks #WWDC14. Session 208 Olivier Bonnet CloudKit Client Software

Networking with NSURLSession

What s New in Xcode App Signing

What s New in NSCollectionView Session 225

Using Grouped Notifications

Cocoa Touch Best Practices

Creating Great App Previews

Thread Sanitizer and Static Analysis

Mastering Drag and Drop

New Ways to Work with Workouts

What s New in tvos 12

Implementing UI Designs in Interface Builder

Cross Platform Nearby Networking

Introducing the Modern WebKit API

imessage Apps and Stickers, Part 2

App Extension Best Practices

Advanced Scrollviews and Touch Handling Techniques

Introducing Password AutoFill for Apps

Building for Voice with Siri Shortcuts

Introducing On Demand Resources

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in Foundation for Swift Session 207

Kevin van Vechten Core OS

What s New in Cocoa for macos

Quick Interaction Techniques for watchos

What s New in Testing

Mastering UIKit on tvos

Extending Your Apps with SiriKit

Creating Extensions for ios and OS X, Part Two

Media and Gaming Accessibility

Building Faster in Xcode

Designing Great Apple Watch Experiences

Introducing MusicKit. Media #WWDC17. Tim Parthemore, MusicKit Services Joel Lopes Da Silva, ios Music

Getting Started with CareKit

Designing for Apple Watch

Working with Metal Overview

Improving your Existing Apps with Swift

Multitasking Support on the ios Platform

What s New in imessage Apps

Swift API Design Guidelines

Advanced Notifications

Storyboards and Controllers on OS X

What s New in watchos

Mastering Xcode for iphone OS Development Part 1. Todd Fernandez Sr. Manager, IDEs

Profiling in Depth. Do you know where your code is? Session 412. Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer

Introduction to Siri Shortcuts

Audio Unit Extensions

Creating Audio Apps for watchos

Your Apps and the Future of macos Security

itunes Connect Development to distribution #WWDC15 Distribution Session 304

Touch Bar Fundamentals

What s New in Metal, Part 2

Apple Watch Design Tips and Tricks

New UIKit Support for International User Interfaces

What s New in SiriKit

CS193P - Lecture 13. iphone Application Development. Address Book - Putting People in Your App

Introducing Search APIs

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

Advances in AVFoundation Playback

Getting the Most out of Playgrounds in Xcode

Modern User Interaction on ios

Adopting Advanced Features of the New UI

What's New in UIKit Dynamics and Visual Effects Session 229

Optimizing Swift Performance Session 409

Core Data Best Practices

Building Apps with Dynamic Type

What s New in Core Data?

Writing Great Alerts. Design #WWDC17. Natalie Calvert, Designer

Localizing with Xcode 9

Finding Bugs Using Xcode Runtime Tools

Introducing Swift Playgrounds

Vision Framework. Building on Core ML. Media #WWDC17. Brett Keating, Apple Manager Frank Doepke, He who wires things together

Mastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Advanced Debugging and the Address Sanitizer

Writing Energy Efficient Apps

Power, Performance, and Diagnostics

Integrating Apps and Content with AR Quick Look

Enabling Your App for CarPlay

Transcription:

App Frameworks #WWDC15 Introducing the Contacts Framework For OS X, ios, and watchos Session 223 Bruce Stadnyk ios Contacts Engineer Dave Dribin OS X Contacts Engineer Julien Robert ios Contacts Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

What is Contacts Framework?

What is Contacts Framework? Objective-C and Swift API

What is Contacts Framework? Objective-C and Swift API Optimized for thread-safe, read only usage

What is Contacts Framework? Objective-C and Swift API Optimized for thread-safe, read only usage One API, multiple platforms

What is Contacts Framework? Objective-C and Swift API Optimized for thread-safe, read only usage One API, multiple platforms AddressBook API being deprecated

What are Contacts?

What are Contacts? Everyone has Contacts

What are Contacts? Everyone has Contacts Phone, Mail, Messages,

What are Contacts? Everyone has Contacts Phone, Mail, Messages,

What are Contacts? Everyone has Contacts Phone, Mail, Messages, Central to the user experience

Contact Properties

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties John Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone)

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Properties contact.imagedata John contact.givenname Appleseed contact.familyname john@example.com (home) j.appleseed@icloud.com (work) contact.emailaddresses (408) 555-0126 (iphone) contact.phonenumbers

Contact Objects

Contact Objects CNContact

Contact Objects CNContact CNMutableContact

Contact Objects CNContact CNLabeledValue CNMutableContact

Creating a New Contact import Contacts

Creating a New Contact import Contacts // create mutable for adding to the contact let contact = CNMutableContact()

Creating a New Contact import Contacts // create mutable for adding to the contact let contact = CNMutableContact() contact.imagedata = // profile picture as NSData

Creating a New Contact import Contacts // create mutable for adding to the contact let contact = CNMutableContact() contact.imagedata = // profile picture as NSData

Creating a New Contact import Contacts // create mutable for adding to the contact let contact = CNMutableContact() contact.imagedata = // profile picture as NSData contact.givenname = "John" contact.familyname = "Appleseed"

Creating a New Contact Labeled Values let homeemail = CNLabeledValue(label: CNLabelHome, value: "john@example.com") let workemail = CNLabeledValue(label: CNLabelWork, value: "j.appleseed@icloud.com")

Creating a New Contact Labeled Values let homeemail = CNLabeledValue(label: CNLabelHome, value: "john@example.com") let workemail = CNLabeledValue(label: CNLabelWork, value: "j.appleseed@icloud.com") contact.emailaddresses = [homeemail, workemail]

Creating a New Contact Labeled Values let homeemail = CNLabeledValue(label: CNLabelHome, value: "john@example.com") let workemail = CNLabeledValue(label: CNLabelWork, value: "j.appleseed@icloud.com") contact.emailaddresses = [homeemail, workemail] contact.phonenumbers = [CNLabeledValue( label: CNLabelPhoneNumberiPhone, value: CNPhoneNumber(stringValue: "(408) 555-0126"))]

Creating a New Contact Labeled Values let address = CNMutablePostalAddress() address.street = "774 Loma Vista Ave" address.city = "Los Gatos" address.state = "CA" address.postalcode = "95032"

Creating a New Contact Labeled Values let address = CNMutablePostalAddress() address.street = "774 Loma Vista Ave" address.city = "Los Gatos" address.state = "CA" address.postalcode = "95032" contact.postaladdresses = [CNLabeledValue(label: CNLabelHome, value: address)]

Creating a New Contact Dates let birthday = NSDateComponents() birthday.day = 1 birthday.month = 4 birthday.year = 1988 // can omit for a year-less birthday

Creating a New Contact Dates let birthday = NSDateComponents() birthday.day = 1 birthday.month = 4 birthday.year = 1988 // can omit for a year-less birthday contact.birthday = birthday

Formatting Contact Data

Formatting Contact Data let fullname = CNContactFormatter.stringFromContact(contact, style:.fullname)

Formatting Contact Data let fullname = CNContactFormatter.stringFromContact(contact, style:.fullname) print(fullname) // John Appleseed

Formatting Contact Data let fullname = CNContactFormatter.stringFromContact(contact, style:.fullname) print(fullname) // John Appleseed let postalstring = CNPostalAddressFormatter.stringFromPostalAddress(address)

Formatting Contact Data let fullname = CNContactFormatter.stringFromContact(contact, style:.fullname) print(fullname) // John Appleseed let postalstring = CNPostalAddressFormatter.stringFromPostalAddress(address) print(postalstring) // 774 Loma Vista Ave // Los Gatos, CA 95032

Using Contacts in Your App Dave Dribin OS X Contacts Engineer

Using Contacts in Your App CNContactStore

Fetching User's Contacts class CNContactStore : NSObject { func unifiedcontactsmatchingpredicate( predicate: NSPredicate, keystofetch: [CNKeyDescriptor]) -> [CNContact] throws... }

Predicates let predicate = CNContact.predicateForContactsMatchingName("Appleseed")

Predicates let predicate = CNContact.predicateForContactsMatchingName("Appleseed") John Jane Craig Appleseed Appleseed Bromley john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) April 1, 1988 (birthday) jane@example.com (home) (505) 555-0155 (home) (408) 555-0166 (work) cbromley@icloud.com (work) (465) 555-0199 (iphone) Jun 21 (birthday)

Predicates let predicate = CNContact.predicateForContactsMatchingName("Appleseed") John Jane Craig Appleseed Appleseed Bromley john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) April 1, 1988 (birthday) jane@example.com (home) (505) 555-0155 (home) (408) 555-0166 (work) cbromley@icloud.com (work) (465) 555-0199 (iphone) Jun 21 (birthday)

Keys to Fetch let keystofetch = ["givenname", "familyname"] imagedata John Jane givenname Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) April 1, 1988 (birthday) Appleseed jane@example.com (home) (505) 555-0155 (home) (408) 555-0166 (work) familyname emailaddresses phonenumbers birthday

Keys to Fetch let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] imagedata John Jane givenname Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) April 1, 1988 (birthday) Appleseed jane@example.com (home) (505) 555-0155 (home) (408) 555-0166 (work) familyname emailaddresses phonenumbers birthday

Keys to Fetch let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] imagedata John Jane givenname Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) April 1, 1988 (birthday) Appleseed jane@example.com (home) (505) 555-0155 (home) (408) 555-0166 (work) familyname emailaddresses phonenumbers birthday

How to Fetch let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey]

How to Fetch let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] let store = CNContactStore() let contacts = try store.unifiedcontactsmatchingpredicate(predicate, keystofetch: keystofetch)

How to Fetch let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] let store = CNContactStore() let contacts = try store.unifiedcontactsmatchingpredicate(predicate, keystofetch: keystofetch) for contact in contacts { } print("\(contact.givenname) \(contact.familyname)")

Keeping UI Responsive Main Queue Background Queue Fetch Contacts CNContact CNContact CNContact

Keeping UI Responsive Main Queue Background Queue Fetch Contacts CNContact CNContact CNContact CNContact CNContact CNContact

Data Privacy

Data Privacy class CNContactStore : NSObject { } func requestaccessforentitytype(..., completionhandler:) Privacy and Your App Pacific Heights Tuesday 2:30PM

Partial Contacts let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] John John givenname Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) familyname April 1, 1988 (birthday) April 1, 1988 (birthday)

Partial Contacts let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] John John givenname Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) Appleseed john@example.com (home) j.appleseed@icloud.com (work) (408) 555-0126 (iphone) familyname phonenumbers April 1, 1988 (birthday) April 1, 1988 (birthday)

Partial Contacts if (contact.iskeyavailable(cncontactphonenumberskey)) { } print("\(contact.phonenumbers)")

Partial Contacts if (contact.iskeyavailable(cncontactphonenumberskey)) { print("\(contact.phonenumbers)") } else { let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey, CNContactPhoneNumbersKey] var refetchedcontact = try store.unifiedcontactwithidentifier( contact.identifier, keystofetch: keystofetch) print("\(refetchedcontact.phonenumbers)") }

Formatting Partial Contacts let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey] Mr. John nameprefix givenname middlename Appleseed Sr. familyname namesuffix

Formatting Partial Contacts let keystofetch = [CNContactGivenNameKey, CNContactFamilyNameKey, CNContactNamePrefixKey, CNContactMiddleNameKey,...] Mr. John nameprefix givenname middlename Appleseed Sr. familyname namesuffix

Formatting Partial Contacts let keystofetch = [CNContactFormatter.descriptorForRequiredKeysForStyle(.FullName)] Mr. John nameprefix givenname middlename Appleseed Sr. familyname namesuffix + Any Others

Key Descriptors let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [ CNContactFormatter.descriptorForRequiredKeysForStyle(.FullName), CNContactEmailAddressesKey]

Key Descriptors let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [ CNContactFormatter.descriptorForRequiredKeysForStyle(.FullName), CNContactEmailAddressesKey] let contacts = try store.unifiedcontactsmatchingpredicate(predicate, keystofetch: keystofetch)

Key Descriptors let predicate = CNContact.predicateForContactsMatchingName("Appleseed") let keystofetch = [ CNContactFormatter.descriptorForRequiredKeysForStyle(.FullName), CNContactEmailAddressesKey] let contacts = try store.unifiedcontactsmatchingpredicate(predicate, keystofetch: keystofetch) for contact in contacts { let fullname = CNContactFormatter.stringFromContact( contact, style:.fullname)?? "No Name" print("\(fullname): \(contact.emailaddresses)") }

Unified Contacts icloud Facebook John John Appleseed Appleseed j.appleseed@icloud.com (work) john@example.com (home) (408) 555-0126 (iphone) April 1, 1988 (birthday)

Unified Contacts icloud Facebook Unified John John John Appleseed j.appleseed@icloud.com (work) (408) 555-0126 (iphone) Appleseed john@example.com (home) Appleseed j.appleseed@icloud.com (work) john@example.com (home) (408) 555-0126 (iphone) April 1, 1988 (birthday) April 1, 1988 (birthday)

Adding a New Contact let john = CNMutableContact() john.givenname = "John" john.familyname = "Appleseed"

Adding a New Contact let john = CNMutableContact() john.givenname = "John" john.familyname = "Appleseed" let saverequest = CNSaveRequest() saverequest.addcontact(john, tocontainerwithidentifier: nil) try store.executesaverequest(saverequest)

Updating an Existing Contact let updatedcontact = contact.mutablecopy() let newemail = CNLabeledValue(label: CNLabelHome, value: "john@example.com") updatedcontact.emailaddresses.append(newemail)

Updating an Existing Contact let updatedcontact = contact.mutablecopy() let newemail = CNLabeledValue(label: CNLabelHome, value: "john@example.com") updatedcontact.emailaddresses.append(newemail) let saverequest = CNSaveRequest() saverequest.updatecontact(updatedcontact) try store.executesaverequest(saverequest)

Contacts in the UI Julien Robert ios Contacts Engineer

ContactsUI New framework

ContactsUI New framework ios OS X

ContactsUI New framework ios OS X CNContactPickerViewController CNContactPicker

ContactsUI New framework ios OS X CNContactPickerViewController CNContactPicker CNContactViewController CNContactViewController

Picking Contacts CNContactPickerViewController

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController Must be presented, not pushed

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController Must be presented, not pushed Always out of process, no contacts access dialog

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController Must be presented, not pushed Always out of process, no contacts access dialog May return partial contacts

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController Must be presented, not pushed Always out of process, no contacts access dialog May return partial contacts Behavior based on delegate methods and predicates

Picking Contacts CNContactPickerViewController Modern replacement for ABPeoplePickerNavigationController Must be presented, not pushed Always out of process, no contacts access dialog May return partial contacts Behavior based on delegate methods and predicates Supports multi-selection

Picking Contacts Delegate methods

Picking Contacts Delegate methods Single contact

Picking Contacts Delegate methods Single contact contactpicker(picker, didselectcontact contact: CNContact)

Picking Contacts Delegate methods Single contact contactpicker(picker, didselectcontact contact: CNContact) Single property contactpicker(picker, didselectcontactproperty property: CNContactProperty)

Picking Contacts Delegate methods Single contact contactpicker(picker, didselectcontact contact: CNContact) Single property contactpicker(picker, didselectcontactproperty property: CNContactProperty) class CNContactProperty { var contact: CNContact var key: NSString var value: AnyObject? var identifier: NSString? }

Picking Contacts Delegate methods

Picking Contacts Delegate methods Multiple contacts

Picking Contacts Delegate methods Multiple contacts contactpicker(picker, didselectcontacts contacts: [CNContact])

Picking Contacts Delegate methods Multiple contacts contactpicker(picker, didselectcontacts contacts: [CNContact]) Multiple properties contactpicker(picker, didselectcontactproperties properties: [CNContactProperty])

Picking Contacts Predicates

Picking Contacts Predicates predicateforenablingcontact Which contacts are available Evaluated on CNContact

Picking Contacts Predicates predicateforenablingcontact Which contacts are available Evaluated on CNContact

Picking Contacts Predicates predicateforenablingcontact Which contacts are available Evaluated on CNContact let predicate = NSPredicate(format: "familyname LIKE[cd] 'parker'")

Picking Contacts Predicates predicateforenablingcontact Which contacts are available Evaluated on CNContact let predicate = NSPredicate(format: "familyname LIKE[cd] 'parker'") contactpicker.predicateforenablingcontact = predicate

Picking Contacts Predicates

Picking Contacts Predicates predicateforselectionofcontact Which contacts are returned when tapped, others push the card

Picking Contacts Predicates predicateforselectionofcontact Which contacts are returned when tapped, others push the card predicateforselectionofproperty Which properties are returned when tapped, others perform the default action Evaluated on CNContactProperty

Picking Contacts Predicates predicateforselectionofcontact Which contacts are returned when tapped, others push the card predicateforselectionofproperty Which properties are returned when tapped, others perform the default action Evaluated on CNContactProperty Coherence between predicates and delegate methods

Viewing Contacts CNContactViewController

Viewing Contacts CNContactViewController One class to replace ABPersonViewController ABNewPersonViewController ABUnknownPersonViewController

Viewing Contacts CNContactViewController

Viewing Contacts CNContactViewController Use appropriate creation method

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact:

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact: viewcontrollerfornewcontact:

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact: viewcontrollerfornewcontact: viewcontrollerforunknowncontact:

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact: viewcontrollerfornewcontact: viewcontrollerforunknowncontact:

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact: viewcontrollerfornewcontact: viewcontrollerforunknowncontact: Always out of process

Viewing Contacts CNContactViewController Use appropriate creation method viewcontrollerforcontact: viewcontrollerfornewcontact: viewcontrollerforunknowncontact: Always out of process Contact must be fetched with descriptorforrequiredkeys

Viewing Contacts Example let contact = try contactstore.unifiedcontactwithidentifier(identifier, keystofetch: [CNContactViewController.descriptorForRequiredKeys])

Viewing Contacts Example let contact = try contactstore.unifiedcontactwithidentifier(identifier, keystofetch: [CNContactViewController.descriptorForRequiredKeys]) let viewcontroller = CNContactViewController(forContact: contact)

Viewing Contacts Example let contact = try contactstore.unifiedcontactwithidentifier(identifier, keystofetch: [CNContactViewController.descriptorForRequiredKeys]) let viewcontroller = CNContactViewController(forContact: contact) viewcontroller.contactstore = self.contactstore viewcontroller.delegate = self

Viewing Contacts Example let contact = try contactstore.unifiedcontactwithidentifier(identifier, keystofetch: [CNContactViewController.descriptorForRequiredKeys]) let viewcontroller = CNContactViewController(forContact: contact) viewcontroller.contactstore = self.contactstore viewcontroller.delegate = self self.pushviewcontroller(viewcontroller)

Viewing Contacts Example let contact = try contactstore.unifiedcontactwithidentifier(identifier, keystofetch: [CNContactViewController.descriptorForRequiredKeys]) let viewcontroller = CNContactViewController(forContact: contact) viewcontroller.contactstore = self.contactstore viewcontroller.delegate = self self.pushviewcontroller(viewcontroller) func contactviewcontroller(vc, didcompletewithcontact: contact) { } // do something with the modified contact

Demo Picking and Viewing Contacts Meow

Summary A new modern Contacts API Common across all platforms Adopt now!

More Information Documentation Contacts Framework Reference ContactsUI Framework Reference http://developer.apple.com/library Technical Support Apple Developer Forums http://developer.apple.com/forums General Inquiries Paul Marcos, App Frameworks Evangelist pmarcos@apple.com

Labs Contacts, Calendar and Reminders Lab Frameworks Lab A Thursday 4:30PM Contacts, Calendar and Reminders Lab Frameworks Lab A Friday 9:00AM