You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
0 B

2 years ago
//
// PPGetAddressBook.h
// PPGetAddressBook
//
// Created by AndyPang on 16/8/17.
// Copyright © 2016年 AndyPang. All rights reserved.
//
/*
*********************************************************************************
*
* PP-iOS学习交流群: 323408051 !!!
*
* 使 PPGetAddressBook bug或有更好的建议,,
* bug,.
*
* Weibo : jkpang-
* Email : jkpang@outlook.com
* QQ : 323408051
* GitHub: https://github.com/jkpang
*
* PS:,使!
* 1.AFNetworking 3.x YYCache的二次封装,,FMDB:
* GitHub:https://github.com/jkpang/PPNetworkHelper
* 2.仿,,使:
* GitHub:https://github.com/jkpang/PPNumberButton
*
* PPGetAddressBook ,Star支持, !
*********************************************************************************
*/
#import <Foundation/Foundation.h>
#import "PPAddressBookHandle.h"
#import "PPPersonModel.h"
/**
* Block
*/
typedef void(^AddressBookArrayBlock)(NSArray<PPPersonModel *> *addressBookArray);
/**
* A~Z顺序排列的所有联系人的Block
*
* @param addressBookDict ->key对应装有多个联系人模型的数组->.
* @param peopleNameKey
*/
typedef void(^AddressBookDictBlock)(NSDictionary<NSString *,NSArray *> *addressBookDict,NSArray *nameKeys);
@interface PPGetAddressBook : NSObject
/**
* APP访问通讯录的权限,APPDeletegate.m中的didFinishLaunchingWithOptions方法中调用
*/
+ (void)requestAddressBookAuthorization;
/**
*
*
* @param addressBookArray Block回调
*/
+ (void)getOriginalAddressBook:(AddressBookArrayBlock)addressBookArray authorizationFailure:(AuthorizationFailure)failure;
/**
* A~Z顺序排列的所有联系人
*
* @param addressBookInfo A~Z排序的联系人字典Block回调
* @param failure Block
*/
+ (void)getOrderAddressBook:(AddressBookDictBlock)addressBookInfo authorizationFailure:(AuthorizationFailure)failure;
@end