--- title: "iOS SDK 사용 방법 " slug: "elsa-elsa-1-5-3" tags: ["SDK 사용 가이드", "effective log search & analytics"] updated: 2026-09-17T09:07:51Z published: 2026-09-17T09:07:51Z canonical: "guide.ncloud-docs.com/elsa-elsa-1-5-3" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # iOS SDK 사용 방법 Classic/VPC 환경에서 이용 가능합니다. 이 장에서는 Effective Log Search & Analytics NELO iOS SDK의 사용법을 설명합니다. Effective Log Search & Analytics NELO iOS는 다음의 기기와 OS를 지원합니다. ``` iPhone 4S, 5, 5c, 5s 이상 (armv7/arm64) iOS 8.0 이상 ``` ## 다운로드 최신 배포 버전은 Fat 바이너리 형태로 제공됩니다. iOS는 i386 시뮬레이터와 (armv7/arm64) 디바이스 아키텍처용 바이너리를 포함하고 있습니다. - [iOS SDK 다운로드](/docs/elsa-elsa-2) ## API 목록 “NeloLog” 클래스에서 아래와 같은 API를 제공합니다. ``` // Default NeloLog init method + (bool) init:(NSString *)server ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion; + (bool) init:(NSString *)server ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion forUserId:(NSString*)userId; // send log method + (void) debug:(NSString*)errorCode withMessage:(NSString*)message; + (void) error:(NSString*)errorCode withMessage:(NSString*)message; + (void) fatal:(NSString*)errorCode withMessage:(NSString*)message; + (void) info:(NSString*)errorCode withMessage:(NSString*)message; + (void) warn:(NSString*)errorCode withMessage:(NSString*)message; + (void) debug:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) error:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) fatal:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) info:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) warn:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) setUserId:(NSString*)userId; + (void) setLogType:(NSString*)logType; + (void) setLogSource:(NSString*) logSource; + (void) setCrashBlock:(void (^)(void))block; + (void) setLogLevelFilter:(NSString*)logLevelFilter; + (void) setNeloSendMode:(NSString*)sendMode; + (void) enableClientSideSymbolication:(bool)enable; + (NSArray *) getReservedFields; + (NSDictionary *) getNeloSendMode; + (NSDictionary *) getNeloLogLevel; ``` ## NELO SDK 사용법 ### Nelo SDK Framework 추가 1. “Frameworks”에 NELO2SDK.framework와 CrashReporter.framework를 추가합니다. ![elsa-1-4-2_ko.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/elsa-1-4-2_ko.png?sv=2026-02-06&spr=https&st=2026-10-27T03%3A09%3A01Z&se=2026-10-27T04%3A09%3A01Z&sr=c&sp=r&sig=YfCAst8GJdSx8OSKPYJMgweSNg29NDFfBfEp98hMW84%3D) [그림 - Framweorks에 추가된 NELO iOS SDK] 2. “Build Phases”의 “Link Binary With Libraries” 항목에 아래 시스템 프레임워크를 추가합니다. ``` UIKit.framework SystemConfiguration.framework CoreTelephony.framework Foundation.framework ``` ![elsa-1-4-3_ko.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/elsa-1-4-3_ko.png?sv=2026-02-06&spr=https&st=2026-10-27T03%3A09%3A01Z&se=2026-10-27T04%3A09%3A01Z&sr=c&sp=r&sig=YfCAst8GJdSx8OSKPYJMgweSNg29NDFfBfEp98hMW84%3D) [그림 - Build Phases에 추가된 시스템프레임워크] ## API 상세 설명 ### 초기화 함수 ``` // Default NeloLog init method + (bool) init:(NSString *)server ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion; + (bool) init:(NSString *)server ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion forUserId:(NSString*)userId; ``` 참고 SDK Version 0.32부터 onPort, byProtocol 파라미터가 제거되었습니다. **Parameters** ``` * server : Effective Log Search & Analytics 수집서버의 주소(아래 전송서버 참고) * appName : Effective Log Search & Analytics에 등록된 프로젝트 아이디 * appVersion : Effective Log Search & Analytics에 전송할 App의 버전. 이 버전을 가지고 Symbolication시 심볼파일과 매핑 * userId : 사용자의 ID정보 ``` **전송 서버** iOS SDK는 HTTPS 프로토콜을 이용하여 로그를 전송합니다. - Collector 서버 주소 - elsa-col.ncloud.com ### 로그 전송 ``` // send log method + (void) debug:(NSString*)errorCode withMessage:(NSString*)message; + (void) error:(NSString*)errorCode withMessage:(NSString*)message; + (void) fatal:(NSString*)errorCode withMessage:(NSString*)message; + (void) info:(NSString*)errorCode withMessage:(NSString*)message; + (void) warn:(NSString*)errorCode withMessage:(NSString*)message; + (void) debug:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) error:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) fatal:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) info:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; + (void) warn:(NSString*)errorCode withMessage:(NSString*)message atLocation:(NSString*)location; ``` **Parameters** - errorCode : NELO의 errorCode필드에 매핑됨. 길이 제한 있음(128자). - message : NELO의 body필드에 매핑됨. 길이 제한 없음(전체 로그 용량 제한이 있음). - location : NELO의 location필드에 매핑. error가 발생한 위치를 전송. **사용법** ``` [NeloLog info:@"ErrorCode" withMessage:@"Message"]; ``` ### 기타 함수 ``` + (void) setUserId:(NSString*)userId; + (void) setLogType:(NSString*)logType; + (void) setLogSource:(NSString*) logSource; + (void) setCrashBlock:(void (^)(void))block; + (void) setLogLevelFilter:(NSString*)logLevelFilter; + (void) setNeloSendMode:(NSString*)sendMode; // Client Side Symbolication + (void) enableClientSideSymbolication:(bool)enable; ``` **setCrashBlock** - Crash Callback 함수 - 해당 block 함수에 Crash 발생 시 동작할 코드를 작성하면, 크래시가 발생하여 크래시 전송 시 해당 코드를 실행한 후 전송함 - 코드 예 ``` [NeloLog setCrashBlock:^{ NSLog(@"crashed"); [NeloLog setCustomField:@"MyValue" forKey:@"MyKey"]; }]; ``` **setLogLevelFilter** - 특정 로그 이상만 전송하도록 로그 레벨을 설정하는 함수 - 아래 정의된 레벨만 설정 가능하며, 설정된 레벨 이상의 로그만 전송함 - DEBUG < INFO < WARN < ERROR < FATAL - 값은 아래의 Constant값으로 정의되어 있음 - NELO2_LOGLEVEL_DEBUG - NELO2_LOGLEVEL_INFO - NELO2_LOGLEVEL_WARN - NELO2_LOGLEVEL_ERROR - NELO2_LOGLEVEL_FATAL - 기본값은 DEBUG - 코드 예 ``` [NeloLog setLogLevelFilter:NELO2_LOGLEVEL_WARN]; ``` **setNeloSendMode** - IOS SDK는 아래와 같은 전송 모드를 지원함 - ALL: 네트워크에 연결되어 있다면 로그 전송 - WIFI: 네트워크가 WIFI 상태일 때만 로그 전송 - 기본값은 ALL **enableClientSideSymbolication** - Symbolication을 클라이언트에서 수행할지 여부 설정 - 기본값은 아래와 같음 - IOS SDK: false(클라이언트에서 Symbolication 작업하지 않음) - MAC SDK: true(클라이언트에서 Symbolication 작업을 수행함) - 클라이언트에서 Symbolication 작업을 수행하면, 크래시 발생 시 앱이 중지될 때 약간의 지연이 발생 ## Effective Log Search & Analytics iOS SDK 기본 사용 예 ``` NSString* appID = @"02b96c3d8bbe_elsa-test"; NSString* appVer= @"1.0.0"; NSString* serverAddr = @"elsa-col.ncloud.com"; //Effective Log Search & Analytics 수집 서버 주소 NSString* userID = @"tester"; //사용자 ID // Nelo Init [NeloLog init:serverAddr ofProjectName:appID withProjectVersion:appVer forUserId:userID]; // Nelo 로그 전송 [NeloLog info:@"ErrorCode" withMessage:@"Message"]; [NeloLog error:@"ErrorCode" withMessage:@"Message" atLocation:@"test loc"]; ``` ## FAQ ### 1. bitcode enabled 앱의 dSYMs(Symbol)은 어디서 받나요? Xcode 또는 iTunes Connect에서 받을 수 있습니다. - iTunes Connect를 사용해서 Debug Symbols을 다운로드할 경우 "My Apps"의 앱의 빌드 목록에서 원하는 버전을 선택합니다. "Download dSYM"을 선택하면 다운로드합니다.