Latest 0.0.1
Homepage https://github.com/meetup/MUSharedWebCredential
License MIT
Platforms ios 7.0, requires ARC
Frameworks Security
Authors

MUSharedWebCredential is a little class that takes all the pain out of working with passwords saved by Safari AutoFill. It lets you work with those passwords in Swift apps, and neatly hides the fact that the necessary API methods don’t exist in iOS 7 and Xcode 5.


How to use this class

Before you can use this class, you must set up your app-website association. See the 2014 WWDC video “Your App, Your Website, and Safari” for instructions.

Requesting a password from Safari AutoFill
requires user approval

[MUSharedWebCredential requestCredentialWithSuccess:^(NSString *username, NSString *password, NSString *domain) {
    [MULoginManager logInWithUsername:username password:password];
} failure:^(NSError *error) {
    [self showError:error];
}];

Saving a password in Safari AutoFill
requires user approval if editing an existing credential

[MUSharedWebCredential saveCredentialWithUsername:username
                                         password:password
                                           domain:@"meetup.com"
                                       completion:NULL];

Deleting a password from Safari AutoFill
requires user approval

[MUSharedWebCredential deleteCredentialWithUsername:username
                                             domain:@"meetup.com"
                                         completion:NULL];

Generating a strong, unique password

NSString *randomPassword = [MUSharedWebCredential randomPassword];

Latest podspec

{
    "name": "MUSharedWebCredential",
    "version": "0.0.1",
    "summary": "MUSharedWebCredential is a little class that takes all the pain out of working with passwords saved by Safari AutoFill.",
    "description": "                   MUSharedWebCredential is a little class that takes all the pain out of working with passwords saved by Safari AutoFill. It lets you work with those passwords in Swift apps, and neatly hides the fact that the necessary API methods don't exist in iOS 7 and Xcode 5.nn                   Before you can use this class, you must set up your app-website association. See the 2014 WWDC video u201cYour App, Your Website, and Safariu201d for instructions.n",
    "homepage": "https://github.com/meetup/MUSharedWebCredential",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Phil Tang": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/meetup/MUSharedWebCredential.git",
        "tag": "v0.0.1"
    },
    "source_files": "Classes/**/*.{h,m}",
    "frameworks": "Security",
    "requires_arc": true
}

Pin It on Pinterest

Share This