TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Mattt.
vCardSerialization
encodes and decodes between vCard and AddressBook records, following the API conventions of Foundation's NSJSONSerialization
class.
@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];
NSArray *records = ...;
NSDate *data = [vCardSerialization vCardDataWithAddressBookRecords:records error:nil];
Mattt Thompson
vCardSerialization is available under the MIT license. See the LICENSE file for more info.