투케이2K

140. (Objective-C/objc) ifdef DEBUG 사용해 빌드 타입 디버그 및 운영 모드 구분 수행 본문

Objective-C

140. (Objective-C/objc) ifdef DEBUG 사용해 빌드 타입 디버그 및 운영 모드 구분 수행

투케이2K 2023. 11. 18. 17:54
반응형

[개발 환경 설정]

개발 툴 : XCODE

개발 언어 : OBJECTIVE-C

 

[소스 코드]

    // -----------------------------------------
    // [SEARCH FAST] : [빌드 타입 확인 실시]
    // -----------------------------------------
    #ifdef DEBUG
    [S_Log _D_WithC_:[NSString stringWithFormat:@"%s", __FILE__]
            M_:[NSString stringWithFormat:@"%s :: %d", __FUNCTION__, __LINE__]
            description:@"빌드 타입 확인 실시 : DEBUG 실행" data:nil];
    #else
    [S_Log _D_WithC_:[NSString stringWithFormat:@"%s", __FILE__]
            M_:[NSString stringWithFormat:@"%s :: %d", __FUNCTION__, __LINE__]
            description:@"빌드 타입 확인 실시 : RELEASE 실행" data:nil];
    #endif
    // -----------------------------------------

[결과 출력]


반응형
Comments