App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup !...
Transcript of App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup !...
![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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/1.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/5.jpg)
• 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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/6.jpg)
![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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/7.jpg)
WWDC 2014Session 506: Your App, Your Website, and Safari
![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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/9.jpg)
![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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/10.jpg)
The Catch
![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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/14.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/16.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042316/5f0537537e708231d411db34/html5/thumbnails/17.jpg)
http://github.com/meetup/MUSharedWebCredential pod 'MUSharedWebCredential'
I TOTES SOLVED THIS!Disclaimer: Compiles, but does not work in iOS 7