Latest 0.0.1
Homepage https://github.com/mattt/vCardSerialization
License MIT
Platforms ios 5.0, requires ARC
Authors

vCardSerialization encodes and decodes between vCard and AddressBook records, following the API conventions of Foundation’s NSJSONSerialization class.

Usage

Decoding

@import AddressBookUI;

#import "vCardSerialization.h"

NSURL *URL = [[NSBundle mainBundle] URLForResource:@"contact" withExtension:@"vcf"];
NSData *data = [NSData dataWithContentsOfURL:URL];

ABPersonViewController *viewController = [[ABPersonViewController alloc] init];
viewController.displayedPerson = (__bridge ABRecordRef)[[vCardSerialization addressBookRecordsWithVCardData:data error:nil] firstObject];
ABPeoplePickerNavigationController *navigationController = [[ABPeoplePickerNavigationController alloc] initWithRootViewController:viewController];
[self.navigationController presentViewController:navigationController animated:YES completion:nil];

Encoding

NSArray *records = ...;
NSData *data = [vCardSerialization vCardDataWithAddressBookRecords:records error:nil];

Contact

Mattt Thompson

License

vCardSerialization is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "vCardSerialization",
    "version": "0.0.1",
    "license": "MIT",
    "summary": "Encodes and decodes between vCard files and AddressBook records.",
    "homepage": "https://github.com/mattt/vCardSerialization",
    "social_media_url": "https://twitter.com/mattt",
    "authors": {
        "Mattt Thompson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mattt/vCardSerialization.git",
        "tag": "0.0.1"
    },
    "source_files": "vCardSerialization",
    "requires_arc": true,
    "ios": {
        "frameworks": "AddressBook"
    },
    "platforms": {
        "ios": "5.0"
    }
}

Pin It on Pinterest

Share This