JLAddressBook 1.2.5

JLAddressBook 1.2.5

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2014年12月

Joe Laws 维护。



  • 作者:
  • Joe Laws

需求

iOS 7.0

安装

用法

要运行示例项目;克隆仓库,运行 pod install,然后打开 JLAddressBookExample.xcworkspace。

您需要创建一个符合此协议的实体类型

@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

然后使用 JLCoreDataContactManager 或定义一个联系人管理器来跟踪这些实体

@protocol JLContactManager<NSObject>

@required

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

@end

然后您调用 JLAddressBook syncContacts 以更新您的联系人信息

@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

作者

项目

以下是一些使用这个库的 iPhone 应用程序列表

Faysee - Faysee 主页

许可证

JLAddressBook 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。