# iOS API Reference

## recevieMessage

**– (NSString\*)recevieMessage:(NSDictionary\*)msg;**

* 기능\
  AppDelegate(didReceiveRemoteNotification)에서 받은 메세지 내용을 가져옵니다.
* 변수\
  msg : 보내진 푸시의 정보(NSDictionary)
* 결과\
  메세지 문구

{% code title="예제" %}

```objectivec
//메세지 내용을 가져온다.
(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
 
    NSString *message = [_fingerManager recevieMessage:userInfo];
 
}
```

{% endcode %}

## receviveBadge

**– (NSInteger)receviveBadge:(NSDictionary\*)msg;**

* 기능\
  AppDelegate(didReceiveRemoteNotification)에서 받은 메세지에서 뱃지값을 가져옵니다.
* 변수\
  msg : 보내진 푸시의 정보(NSDictionary)
* 결과\
  posts : 뱃지수

{% code title="예제" %}

```objectivec
//메세지를 받았을 때 
(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
 
    application.applicationIconBadgeNumber = [_fingerManager receviveBadge:userInfo];
 
}
```

{% endcode %}

## receviveMessageTag

**– (NSString\*)receviveMessageTag:(NSDictionary\*)msg;**

* 기능\
  AppDelegate(didReceiveRemoteNotification)에서 받은 메세지에서 메세지태그값을 가져옵니다.
* 변수\
  msg : 보내진 푸시의 정보(NSDictionary)
* 결과\
  메세지태그

{% code title="예제" %}

```objectivec
//메세지를 받았을 때 
(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
 
    strTag = [_fingerManager receviveMessageTag:userInfo];
 
}
```

{% endcode %}

## registerUserWithBlock

**– (void)registerUserWithBlock:(NSData \*)token :(void (^)(NSString \*posts, NSError \*error))block;**

{% hint style="danger" %} <mark style="color:red;">DeviceToken 은 OS에 의해 변경될 수 있습니다. 따라서, 앱 실행 시마다 호출해야 합니다.</mark>
{% endhint %}

* 기능\
  핑거푸시 서버에 기기 토큰값을 저장하는 매서드 입니다.
* 변수\
  token : 토큰값 didRegisterForRemoteNotificationsWithDeviceToken에서 받은 deviceToken(NSData)로 입력
* 결과\
  posts : 결과코드 값 리턴

{% code title="예제" %}

```objectivec
//appdelegate에 구현
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
//기기등록
    [_fingerManager registerUserWithBlock:deviceToken :^(NSString *posts, NSError *error) {
        if (!error)
        {
            NSLog(@"기기등록  %@", posts);        
        }else{
            NSLog(@"기기등록 error %@", error);        
        }
    }
    ];
}
```

{% endcode %}

## requestGetAllTagListWithBlock

**– (void)requestGetAllTagListWithBlock:(void (^)(NSArray \*posts, NSError \*error))block;**

* 기능\
  앱에 등록된 모든 태그(그룹)명 조회합니다.
* 변수
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestGetAllTagListWithBlock:^(NSArray *posts, NSError *error) {
     
    NSLog(@"posts %@ / error : %@", posts,error);
         
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//post 결과
{
    date = "2014-08-14 16:35:11.0";            //등록일
    tag = tag2;                                //태그명
},
{
    date = "2014-08-14 16:35:06.0";            //등록일
    tag = tag1;                                //태그명
}
```

{% endcode %}

## requestGetAppReportWithBlock

**– (void)requestGetAppReportWithBlock:(void (^)(NSDictionary \*posts, NSError \*error))block;**

* 기능\
  핑거푸시의 등록된 앱의 버전 정보 등 모든 정보를 가져옵니다.
* 변수
* 결과\
  posts : 결과코드\
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestGetAppReportWithBlock:^(NSDictionary *posts, NSError *error) {
 
    NSLog(@"posts : %@  error : %@",posts,error);
 
}];
```

{% endcode %}

{% code title="결과" %}

```
//결과 항목
code : 결과코드(200 : 정상처리, 403 : 권한 없음, 404 : 해당 디바이스에 등록된 식별자 없음, 500 : 처리중 에러, 503 : 필수값없음) 
message : 결과 메세지 
info : 결과 내용
    - user_id : 앱 등록자 아이디 
    - app_name : 앱 이름
    - appid : 앱 아이디 
    - icon : 앱 아이콘
    - category : 앱 카테고리명 
    - environments : 앱 구동 환경 : Development/Production 
    - beios : IOS 기기 지원여부 : Y/N 
    - beandroid : Android 기기 지원 여부 : Y/N 
    - ios_version : IOS 버전 
    - ios_int_version : IOS 숫자 버전 
    - ios_last_int_version : IOS 마지막 숫자 버전 
    - android_version : Android 버전 
    - android_int_version : Android 숫자 버전 
    - android_last_int_version : Android 마지막 숫자 버전 
    - ios_upd_link IOS : 업데이트 링크 
    - android_upd_link : Android 업데이트 링크 
    - beupdalert_i : IOS 버전 강제 업데이트 여부 Y/N 
    - beupdalert_a : Android 버전 강제 업데이트 여부 Y/N 
    - ver_update_date_i : IOS 버전 업데이트 일 
    - ver_update_date_a : Android 버전 업데이트 일
```

{% endcode %}

## requestGetDeviceTagListWithBlock

**– (void)requestGetDeviceTagListWithBlock:(void (^)(NSArray \*posts, NSError \*error))block;**

* 기능\
  기기가 등록된 태그명 리스트를 조회합니다.
* 변수
* 결과\
  posts : 태그리스트(Array) \
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestGetDeviceTagListWithBlock:^(NSArray *posts, NSError *error) {
         
    NSLog(@"posts %@ / error : %@", posts,error);
         
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//post 결과
{
    date = "2014-08-14 16:35:11.0";            //등록일
    tag = tag2;                                //태그명
},
{
    date = "2014-08-14 16:35:06.0";            //등록일
    tag = tag1;                                //태그명
}
```

{% endcode %}

## requestPushCheckWithBlock

**– (void)requestPushCheckWithBlock:(NSDictionary\*)param :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  통계를 위한 메세지 수신확인 서버에 보내는 매서드 입니다.
* 변수\
  param : 푸시 메세지 리스트에서 받은 메세지
* 결과\
  posts : 결과 코드

{% code title="예제" %}

```objectivec
[fingerManager  requestPushCheckWithBlock:dic :^(NSString *posts, NSError *error) { 
    if (!error) {
        NSLog(@"check : %@", posts);
    }else{
        NSLog(@"check error %@", error);
    }
)];
```

{% endcode %}

## requestPushContentWithBlock

**-(void)requestPushContentWithBlock:(NSString\*)strMsgTag :(NSString\*)strMsgMode :(void (^)(NSDictionary \*posts, NSError \*error))block;**

* 기능\
  핑거푸시 서버에서 발송된 푸시 내용을 가져옵니다.
* 변수\
  strMsgTag : 보내진 푸시의 고유 태그 \
  strMsgMode : 보내진 푸시 메세지의 모드(DEFT,LNGT,STOS)
* 결과\
  posts : 보낸메세지(NSDictionary) 내용

{% code title="예제" %}

```objectivec
NSString *msgTag = pushList["msgTag"];
 
[[finger sharedData] requestPushContentWithBlock:msgTag :@"DEFT" :^(NSDictionary *posts, NSError *error){
 
        NSLog(@"posts : %@  error : %@",posts,error);
 
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//posts내용
{
    content = “test1”;             //메세지 내용
    date = 20140820142304; ;       //메세지 보낸 날짜
    imgUrl = "";                   //보낸 이미지 url  
    link = "";                     //링크
    lngt_message" = "";            //롱텍스트
    mode = DEFT;                   //메세지 모드 (DEFT,LNGT,STOS)
    msgTag = 447;                  //메세지 고유 태그
    title = 201408201422;          //메세지 제목        
    type = "";                     //메세지타입(현재 사용하고 있지않음)
    label_name = "";               //라벨 이름
    cd1 = “cv1”                    //커스텀 테이터1
    cd2 = “cv2”                    //커스텀 테이터2
    cd3 = “cv3”                    //커스텀 테이터3
}
```

{% endcode %}

## requestPushContentWithBlock

**– (void)requestPushContentWithBlock:(NSDictionary\*)param :(void (^)(NSDictionary \*posts, NSError \*error))block;**

* 기능\
  핑거푸시 서버에서 보내진 푸시 내용을 가져옵니다.
* 변수\
  param: 푸시 메세지 리스트에서 받은 메세지
* 결과\
  posts : 보낸 메세지(NSDictionary) 내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestPushContentWithBlock:dic :^(NSDictionary *posts, NSError *error) {
        
        NSLog(@"posts : %@  error : %@",posts,error);
 
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//posts내용
{
    content = “안녕하세요";        //메세지 내용
    date = 20140408115537;      //메세지 보낸 날짜
    imgUrl = "";                //보낸 이미지 url
    link = "";                  //링크
    lngt_message" = "";         //롱텍스트
    mode = DEFT;                //메세지 모드 (DEFT,LNGT,STOS)
    msgTag = 64;                //메세지 고유 태그
    title = “”;                 //메세지 제목
    type = "";                  //메세지 타입
    label_name = "";            //라벨 이름
}
```

{% endcode %}

## requestPushInfoWithBlock

**– (void)requestPushInfoWithBlock:(void (^)(NSDictionary \*posts, NSError \*error))block;**

* 기능\
  기기 설정 정보를 요청합니다.
* 변수
* 결과\
  posts : 해당 기기 설정 정보

{% code title="예제" %}

```objectivec
[[finger sharedData] requestPushInfoWithBlock:^(NSDictionary *posts, NSError *error) {
         
    NSLog(@"posts : %@  error : %@",posts,error);
         
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//posts 내용
{    
    activity = A;                                //푸시 수신 활성화상태 (A : 활성화 , D : 비활성화) 
    ad_activity = A;                             //광고 푸시 수신 활성화상태 (A : 활성화 , D : 비활성화)
    appid = 4DYLX09CM9EOED7GBTEPS8GR841YVUNT;    //핑거푸시 앱아이디 
    "device_type" = I;                           //디바이스타입 (i:IOS , A : ANDROID)
    identity = “testId";                         //디바이스 식별자
    appver = "1.0.1";                            //앱 버전명
    country = "South Korea";                     //국가명
    osver = "11.4.1";                            //iOS 버전
    timezone = 540;                              //타임존
    appintver = 22;                              //앱설정코드(plist에서 설정)
}
```

{% endcode %}

## requestPushListPageWithBlock

**– (void)requestPushListPageWithBlock:(int)page Cnt:(int)cnt :(void (^)(NSDictionary \*posts, NSError \*error))block;**

* 기능\
  서버에서 보내진 푸시 리스트를 페이징으로 요청합니다.&#x20;
* 변수\
  page : 호출할 페이지 \
  cnt : 한 페이지에 리스트 갯수
* 결과\
  posts : 보낸 메세지(NSDictionary)의 내역(NSArray) 리스트
* 메시지 모드 \
  DEFT : 일반 푸시 짧은 텍스트 \
  LNGT : 일반 푸시 긴 텍스트 \
  STOS : 서버투서버

{% code title="예제" %}

```objectivec
[[finger sharedData] requestPushListPageWithBlock:2 Cnt:10 :^(NSDictionary *posts, NSError *error) {
 
        NSLog(@"posts : %@  error : %@",posts,error);
 
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//호출한 메세지 (posts)
{
    msgTag = 49;            // 메세지 고유 태그
    date = 20140407164931;  // 일자
    title = “”;             // 메세지 제목
    content = "test ";      // 메세지 내용
    opened = N;             // 수신확인여부
    mode = DEFT;            // 메세지 모드
    image_yn = N            // 이미지 첨부 여부(Y/N)
    imgUrl = “”             // 이미지 url
    lcode = “”              // 메세지 라벨 코드
    link = “”               // 웹 링크
    code_yn = N             // 커스텀 테이터 사용 여부(Y/N)
    // ※ 커스텀 데이터가 있을 경우만 노출
    custom_key_1 : custom_value_1
    custom_key_2 : custom_value_2
    custom_key_3 : custom_value_3
}
{
    msgTag = 49;            // 메세지 고유 태그
    date = 20140407164931;  // 일자
    title = “”;             // 메세지 제목
    content = "test ";      // 메세지 내용
    opened = N;             // 수신확인여부
    mode = DEFT;            // 메세지 모드
    image_yn = N            // 이미지 첨부 여부(Y/N)
    imgUrl = “”             // 이미지 url
    lcode = “”              // 메세지 라벨 코드
    link = “”               // 웹 링크
    code_yn = N             // 커스텀 테이터 사용 여부(Y/N)
    // ※ 커스텀 데이터가 있을 경우만 노출
    custom_key_1 : custom_value_1
    custom_key_2 : custom_value_2
    custom_key_3 : custom_value_3
}
{
    ...
        ...
        ...
}
```

{% endcode %}

## requestPushListWithBlock

**– (void)requestPushListWithBlock:(void (^)(NSArray \*posts, NSError \*error))block;**

* 기능\
  서버에서 발송된 푸시 리스트를 요청합니다.
* 변수
* 결과\
  posts : 보낸메세지(NSDictionary)의 내역(NSArray) 리스트
* 메시지 모드

  DEFT : 일반 푸시 짧은 텍스트

  LNGT : 일반 푸시 긴 텍스트

  STOS : 서버투서버

{% code title="예제" %}

```objectivec
[[finger sharedData] requestPushListWithBlock:^(NSArray *posts, NSError *error) {
 
        NSLog(@"posts : %@  error : %@",posts,error);
 
}];
```

{% endcode %}

{% code title="결과" %}

```objectivec
//호출한 메세지 (posts)
    {
        msgTag = 49;            // 메세지 고유 태그
        date = 20140407164931;  // 일자
        title = “”;             // 메세지 제목
        content = "test ";      // 메세지 내용
        opened = N;             // 수신확인여부
        mode = DEFT;            // 메세지 모드
        image_yn = N            // 이미지 첨부 여부(Y/N)
        imgUrl = “”             // 이미지 url
        lcode = “”              // 메세지 라벨 코드
        link = “”               // 웹 링크
        code_yn = N             // 커스텀 테이터 사용 여부(Y/N)
        // ※ 커스텀 데이터가 있을 경우만 노출
        custom_key_1 : custom_value_1
        custom_key_2 : custom_value_2
        custom_key_3 : custom_value_3
    }
    {
        msgTag = 49;            // 메세지 고유 태그
        date = 20140407164931;  // 일자
        title = “”;             // 메세지 제목
        content = "test ";      // 메세지 내용
        opened = N;             // 수신확인여부
        mode = DEFT;            // 메세지 모드
        image_yn = N            // 이미지 첨부 여부(Y/N)
        imgUrl = “”             // 이미지 url
        lcode = “”              // 메세지 라벨 코드
        link = “”               // 웹 링크
        code_yn = N             // 커스텀 테이터 사용 여부(Y/N)
        // ※ 커스텀 데이터가 있을 경우만 노출
        custom_key_1 : custom_value_1
        custom_key_2 : custom_value_2
        custom_key_3 : custom_value_3
    }
    {
     ...
     ...
     ...
    }
```

{% endcode %}

## requestRecevieImgWithBlock

**– (void)requestRecevieImgWithBlock:(NSDictionary\*)msg :(void (^)(NSData \*posts, NSError \*error))block;**

* 기능\
  푸시 리스트나 푸시 내용에서 이미지를 가져옵니다.
* 변수\
  msg : 보내진 푸시의 정보(NSDictionary)
* 결과\
  posts : 이미지 데이터&#x20;

{% code title="예제" %}

```objectivec
//메시지를 받았을 경우에 이미지를 가져온다
[fingerManager requestRecevieImgWithBlock:posts :^(NSData *posts, NSError *error) {
    if (!error) {
        //이미지로 변환
        UIImage* img = [UIImage imageWithData:posts];
        [imgv setImage:img];
    }
}];
```

{% endcode %}

## requestRegIdWithBlock

**– (void)requestRegIdWithBlock:(NSString\*)param :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  기기의 아이디를 설정합니다.(타겟팅 푸시에서 사용)
* 변수\
  param : 등록할 아이디명(아이디 길이는 50byte이내)
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestRegIdWithBlock:@"fingerPush@kissoft.co.kr" :^(NSString *posts, NSError *error) {
    if (!error){
        NSLog(@"requestRegIdWithBlock %@", posts);
    }else{
        NSLog(@"error requestRegIdWithBlock %@", error);
    }
}];
```

{% endcode %}

## requestRegUniqIdWithBlock

**– (void)requestRegUniqIdWithBlock:(NSString\*)identity isAlram:(BOOL)isAlram msg:(NSString\*)AlramMsg :(void (^)(NSString \*posts, NSError \*error))block;**

{% hint style="danger" %} <mark style="color:red;">requestRegIdWithBlock을 사용하다 requestRegUniqIdWithBlock로 변경하시면 타켓팅 푸시 수신이 정상적으로 안될 수 있습니다.</mark>
{% endhint %}

{% hint style="info" %}
SDK 3.0.4 이후 가능합니다.
{% endhint %}

* 기능\
  기기의 고유 식별자(아이디)를 설정합니다.(다른 기기에 등록된 식별자는 삭제됩니다.)
* 변수\
  identity : 등록할 식별자명(아이디 길이는 50byte이내) \
  isAlram : 기존에 등록된 식별자(삭제될 기기)에 메세지(삭제안내) 발송 여부 \
  AlramMsg : 기존에 등록된 식별자(삭제될 기기)에 메세지(삭제안내) 내용. \
  &#x20;                   nil 거나 @"" 일 경우 기본메세지 내용으로 발송 \
  &#x20;                   기본메세지 : "다른 기기에서 식별자가 설정 되었습니다."
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestRegUniqIdWithBlock:@"fingerPush@kissoft.co.kr" isAlram:YES msg:@"delete your push id" :^(NSString *posts, NSError *error) {
    if (!error){
        NSLog(@"requestRegUniqIdWithBlock: %@", posts);
    }else{
        NSLog(@"error requestRegUniqIdWithBlock: %@", error);
    }
}];
```

{% endcode %}

## requestInitTagWithBlock

**– (void)requestInitTagWithBlock:(NSArray\*)param :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  기기의 태그(그룹)를 설정합니다.\
  빈 값 또는 null 입력 시 설정된 모든 태그를 제거합니다.
* 변수\
  param : 등록할 그룹명(NSArray)
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
NSArray *arrParam = [txtTagNm.text componentsSeparatedByString:@","]; //태그 저장        
     
[[finger sharedData] requestInitTagWithBlock:arrParam :^(NSString *posts, NSError *error) {
    //posts 결과코드
    if (!error) {
        NSLog(@"requestInitTagWithBlock %@", posts);
    }else{ 
        NSLog(@"error requestInitTagWithBlock %@", error);
    }
}];
```

{% endcode %}

## requestAddTagWithBlock

**– (void)requestAddTagWithBlock:(NSArray\*)param :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  기기의 태그(그룹)를 추가합니다.
* 변수\
  param : 등록할 그룹명(NSArray)
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
NSArray *arrParam = [txtTagNm.text componentsSeparatedByString:@","]; //태그 저장        
     
[[finger sharedData] requestAddTagWithBlock:arrParam :^(NSString *posts, NSError *error) {
    //posts 결과코드
    if (!error) {
        NSLog(@"requestAddTagWithBlock %@", posts);
    }else{ 
        NSLog(@"error requestAddTagWithBlock %@", error);
    }
}];
```

{% endcode %}

## requestRemoveIdWithBlock

**– (void)requestRemoveIdWithBlock:(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  기기의 아이디를 삭제합니다.(서버투서버에서 사용)
* 변수
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
[[finger sharedData] requestRemoveIdWithBlock:^(NSString *posts, NSError *error) {
    if (!error) {
        NSLog(@"requestRemoveIdWithBlock %@", posts);
        strIdenti = @"";
        self.tableView reloadData];
    }else{ 
        NSLog(@"error requestRemoveIdWithBlock %@", error);
    }
    [self.refreshControl endRefreshing];
];
```

{% endcode %}

## requestRemoveTagWithBlock

**– (void)requestRemoveTagWithBlock:(NSArray\*)param :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  기기의 태그(그룹)를 삭제합니다.
* 변수\
  param : 삭제 할 그룹명(NSArray)
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
NSArray *arrParam = [txtTagNm.text componentsSeparatedByString:@","]; //태그 저장        
     
[[finger sharedData] requestRemoveTagWithBlock:arrParam :^(NSString *posts, NSError *error) {
    //posts 결과코드
    if (!error) {
        NSLog(@"requestRemoveTagWithBlock %@", posts);
    }else{ 
        NSLog(@"error requestRemoveTagWithBlock %@", error);
    }
}];
```

{% endcode %}

## requestSetAdPushEnable

**– (void)requestSetAdPushEnable:(BOOL)is\_ :(void (^)(NSString \*posts, NSError \*error))block;**

{% hint style="warning" %}
푸시 수신(setEnable) 여부가 활성화된 상태에서만 광고 푸시가 수신됩니다.
{% endhint %}

* 기능\
  푸시 광고수신 활성화 on-off 가능
* 변수\
  is\_ : YES - 활성화 , NO – 비활성화
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
//푸시 광고수신 활성화
[fingerManager requestSetAdPushEnable:YES :^(NSString *posts, NSError *error) {
    if (!error){
        //성공시
        NSLog(@"push set : %@", posts);
    }else{
        //실패시
            NSLog(@"posts set error %@", error);
    }
}];
```

{% endcode %}

{% code title="예제" %}

```objectivec
//푸시 광고수신 기능 비활성화
[fingerManager requestSetAdPushEnable:NO :^(NSString *posts, NSError *error) {
    if (!error){
        //성공시
        NSLog(@"push set : %@", posts);
    }else{
        //실패시
        NSLog(@"posts set error %@", error);
    }
}];
```

{% endcode %}

## setEnable

**– (void)setEnable:(BOOL)is\_ :(void (^)(NSString \*posts, NSError \*error))block;**

* 기능\
  푸시 활성화 on-off 가능
* 변수\
  is\_ : YES - 활성화 , NO – 비활성화
* 결과\
  posts : 결과코드 \
  error : error내용

{% code title="예제" %}

```objectivec
//푸시기능 활성화
[fingerManager setEnable:YES :^(NSString *posts, NSError *error) {
    if (!error){
        //성공시
        NSLog(@"push set : %@", posts);
    }else{
        //실패시
        NSLog(@"posts set error %@", error);
    }
}];
```

{% endcode %}

{% code title="예제" %}

```objectivec
//푸시기능 비활성화
[fingerManager setEnable:NO :^(NSString *posts, NSError *error) {
    if (!error){
        //성공시
        NSLog(@"push set : %@", posts);
    }else{
        //실패시
        NSLog(@"posts set error %@", error);
    }
}];
```

{% endcode %}

## receviveCode

**+ (NSDictionary\*)receviveCode:(NSDictionary\*)msg;**

* 기능\
  AppDelegate(didReceiveRemoteNotification)에서 받은 푸시 메세지에서 푸시 정보를 NSDictionary형태로 가져옵니다.
* 변수\
  msg : 보내진 푸시의 정보(NSDictionary)
* 결과\
  posts : (NSDictionary\*) 푸시 정보 \
  예) \
  CD:0; //앱링크 존재 여부(1:있음 0:없음) \
  IM:0; //이미지 존재 여부(1:있음 0:없음) \
  WL:0; //웹링크 존재 여부(1:있음 0:없음) \
  PT:DEFT; //메세지 타입(DEFT:일반푸시, STOS:Server to Server, LNGT:롱푸시)

{% code title="예제" %}

```objectivec
//메세지를 받았을 때 
 NSDictionary* dicCode = [finger receviveCode:userInfo];
```

{% endcode %}

## keyChainNotUse

**+ (void)keyChainNotUse**

* 기능\
  키체인 미사용(defualt 키체인 사용) \
  앱 시작 시 해당 API를 호출하면, 앱 삭제 후 재설치 시 이전 설치에서 설정한 데이터(identity, tag, list 등)들을 가져오지 못하고 새로운 기기로 인식합니다. \
  다시 키체인을 사용할 경우 +(void)keyChainUse를 사용합다.

{% code title="예제" %}

```objectivec
//didFinishLaunchingWithOptions:
 [finger keyChainNotUse];
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.fingerpush.com/app-push/api-reference/ios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
