Latest 1.2.5
Homepage https://github.com/jlaws/JLAddressBook
License MIT
Platforms ios 7.0, requires ARC
Frameworks AddressBook
Authors

Version
Platform

Requirements

iOS 7.0

Installation

JLAddressBook is available through CocoaPods, to install
it simply add the following line to your Podfile:

pod "JLAddressBook"

Usage

To run the example project; clone the repo, run pod install, then open JLAddressBookExample.xcworkspace.

All you need to do is create an entity type that conforms to this protocol

@protocol JLContact<NSObject>

@optional

@property(nonatomic, strong) NSString *firstName;
@property(nonatomic, strong) NSString *lastName;
@property(nonatomic, strong) NSArray *phoneNumbers;    // NSString's
@property(nonatomic, strong) NSArray *emails;          // NSString's
@property(nonatomic, strong) NSArray *addressBookIDs;  // NSNumbers's
@property(nonatomic, strong) UIImage *thumbnail;
@property(nonatomic, strong) UIImage *photo;

@end

and then use the JLCoreDataContactManager or define a contact manager to keep track of these entities yourself:

@protocol JLContactManager<NSObject>

@required

- (id<JLContact>)newContact;
- (NSArray *)existingContacts;

@end

then you call JLAddressBook syncContacts to update your contacts from the iphone address book

@interface JLAddressBook : NSObject

- (instancetype)initWithContactManager:(id<JLContactManager>)contactManager;

+ (BOOL)authorized;
+ (void)attemptToAuthorize:(AuthorizationBlock)block;

- (NSArray *)syncContacts;

- (UIImage *)photoForContact:(id<JLContact>)contact;
- (UIImage *)thumbnailForContact:(id<JLContact>)contact;

- (void)addContactToDevice:(id<JLContact>)contact;
- (void)addContactToDevice:(id<JLContact>)contact withPhoto:(UIImage *)photo;

@end

Author

Projects

Here is a list of iPhone apps utilizing this library:

FayseeFaysee Homepage

License

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

Latest podspec

{
    "name": "JLAddressBook",
    "version": "1.2.5",
    "summary": "An iOS ABAddressBook wrapper.",
    "description": "                       An iOS ABAddressBook wrapper to easily map contacts to CoreData (or any class) entities.n",
    "homepage": "https://github.com/jlaws/JLAddressBook",
    "license": "MIT",
    "authors": {
        "Joe Laws": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jlaws/JLAddressBook.git",
        "tag": "1.2.5"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "JLAddressBook",
    "frameworks": "AddressBook"
}

Pin It on Pinterest

Share This