app login with safari autofill · app login with safari autofill phil tang, ios engineer @ meetup !...

18
App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup Presented at the New York iOS Developer Meetup, 9/3/2014

Upload: others

Post on 11-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

App Login with Safari AutoFillPhil Tang, iOS Engineer @ Meetup

!Presented at the New York iOS Developer Meetup, 9/3/2014

Page 2: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

Wait, what?Your users no longer have to

type their passwords into both the browser and the app!

Page 3: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

Page 4: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

What You Can Do

everyou

want

*!!!!!!!!!!!

WHAT

(with user permission)

Page 5: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

• Create Passwords!

• Get Passwords (with user permission)!

• Modify Passwords (with user permission)!

• Delete Passwords (with user permission)

WHATEver You Want!!!!!!!!!!!*

Page 6: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014
Page 7: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

WWDC 2014Session 506: Your App, Your Website, and Safari

Page 8: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

https://www.meetup.com/apple-app-site-association

Page 9: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014
Page 10: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

The Catch

Page 11: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

http://openradar.appspot.com/18195030

Page 12: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

Page 13: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

Page 14: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

Page 15: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

Page 16: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

SecRequestSharedWebCredential(nil, nil) { (credentialsCFArray: CFArray!, error: CFError!) -> Void in let credentialsArray = credentialsCFArray as NSArray if let credentials = credentialsArray.firstObject as? NSDictionary { if let password = credentials[kSecSharedPassword] as? String { // Do stuff }

Type 'Unmanaged<AnyObject>!' does not conform to protocol 'NSCopying'

http://openradar.appspot.com/18189750

Page 17: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

http://github.com/meetup/MUSharedWebCredential pod 'MUSharedWebCredential'

I TOTES SOLVED THIS!Disclaimer: Compiles, but does not work in iOS 7

Page 18: App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup ! Presented at the New York iOS Developer Meetup, 9/3/2014

Phil Tang @tangphillip

We’re Hiring! http://www.meetup.com/jobs