百度定位SDK for iOS v1.5 类参考
BMKLocationAuth.h
1 //
2 // BMKLocationAuth.h
3 // LocationComponent
4 //
5 // Created by baidu on 2017/4/10.
6 // Copyright © 2017年 baidu. All rights reserved.
7 //
8 
9 #ifndef BMKLocationAuth_h
10 #define BMKLocationAuth_h
11 
13 typedef NS_ENUM(NSInteger, BMKLocationAuthErrorCode) {
14  BMKLocationAuthErrorUnknown = -1,
15  BMKLocationAuthErrorSuccess = 0,
16  BMKLocationAuthErrorNetworkFailed = 1,
17  BMKLocationAuthErrorFailed = 2,
18 
19 };
21 @protocol BMKLocationAuthDelegate <NSObject>
22 @optional
23 
28 - (void)onCheckPermissionState:(BMKLocationAuthErrorCode)iError;
29 @end
30 
31 
33 @interface BMKLocationAuth : NSObject
34 
36 @property(nonatomic, readonly, assign) BMKLocationAuthErrorCode permisionState;
37 
42 
43 
49 -(void)checkPermisionWithKey:(NSString*)key authDelegate:(id<BMKLocationAuthDelegate>)delegate;
50 
51 
52 @end
53 
54 
55 
56 #endif /* BMKLocationAuth_h */
BMKLocationAuthErrorCode permisionState
鉴权状态0:成功; 1:网络错误; 2:授权失败
Definition: BMKLocationAuth.h:36
BMKLocationAuth类。用于鉴权
Definition: BMKLocationAuth.h:33
BMKLocationAuth * sharedInstance()
得到BMKLocationAuth的单例