App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup !...

Post on 11-Jun-2020

8 views 0 download

Transcript of App Login with Safari AutoFill · App Login with Safari AutoFill Phil Tang, iOS Engineer @ Meetup !...

App Login with Safari AutoFillPhil 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!

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

What You Can Do

everyou

want

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

WHAT

(with user permission)

• Create Passwords!

• Get Passwords (with user permission)!

• Modify Passwords (with user permission)!

• Delete Passwords (with user permission)

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

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

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

The Catch

http://openradar.appspot.com/18195030

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

SecAddSharedWebCredential() SecRequestSharedWebCredential() SecCreateSharedWebCredentialPassword()

The API

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

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

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

Phil Tang @tangphillip

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