--- title: "iOS SDK" slug: "elsa2-sdk-ios" tags: ["elsa2", "sdk", "ios", "로그 전송"] updated: 2026-09-17T09:23:53Z published: 2026-09-17T09:23:53Z canonical: "guide.ncloud-docs.com/elsa2-sdk-ios" --- > ## 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 Available in Classic and VPC In iOS SDK, it describes how to use iOS SDK, which is provided by Effective Log Search & Analytics 2.0 service. Note iOS SDK uses HTTPS protocol to transfer logs. The following describes how to use SDK. [1. Preparation](/docs/en/elsa2-sdk-ios#1%EC%82%AC%EC%A0%84%EC%A4%80%EB%B9%84) [2. Install SDK](/docs/en/elsa2-sdk-ios#2iOSSDK%EC%84%A4%EC%B9%98) [3. Use SDK](/docs/en/elsa2-sdk-ios#5SDK%EC%82%AC%EC%9A%A9) ## 1. Preparation The following describes the preparations for installing iOS SDK. 1. In NAVER Cloud Platform's console, [Create project](/docs/en/elsa2-project). 2. Check the txtToken value in [Project detail page](/docs/en/elsa2-project#%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EC%83%81%EC%84%B8%EC%A0%95%EB%B3%B4%ED%99%95%EC%9D%B8). 3. [Download](/docs/en/elsa2-sdk-download) SDK for iOS. ## 2. Install iOS SDK The following describes how to install iOS SDK. 1. Unzip the downloaded SDK file. 2. Save the SDK file in the `Frameworks` folder of the iOS project where SDK is to be installed. - Nelo2SDK.framework - CrashReporter.framework 3. Run Xcode to open the project. 4. Click the target to build in **TARGETS**. 5. Select **Build Phases**, and add the following system framework in the **Link Binary With Libraries** field. - UIKit.framework - SystemConfiguration.framework - CoreTelephony.framework - Foundation.framework ## 3. Use SDK Refer to the following actual code examples that use Effective Log Search & Analytics 2.0 iOS SDK and transfer logs to the projects. ``` NSString* appID = @"02b96c3d8bbe_elsa-test"; NSString* appVer= @"1.0.0"; NSString* serverAddr = @"elsa-v2-col.ncloud.com"; //Effective Log Search & Analytics collecting server's address NSString* userID = @"tester"; //userID // Nelo Init [NeloLog init:serverAddr ofProjectName:appID withProjectVersion:appVer forUserId:userID]; // Nelo log transfer [NeloLog info:@"ErrorCode" withMessage:@"Message"]; [NeloLog error:@"ErrorCode" withMessage:@"Message" atLocation:@"test loc"]; ``` ## iOS SDK API details iOS SDK provides the following APIs: - [Initialization API](/docs/en/elsa2-sdk-ios#%EC%B4%88%EA%B8%B0%ED%99%94API) - [Log transferring API](/docs/en/elsa2-sdk-ios#%EB%A1%9C%EA%B7%B8%EC%A0%84%EC%86%A1API) - [Option setting API](/docs/en/elsa2-sdk-ios#%EC%98%B5%EC%85%98%EC%84%A4%EC%A0%95API) ### Initialization API Here are the APIs that initialize. ``` // Default NeloLog init method + (bool) init:(NSString *)serverAddr ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion; + (bool) init:(NSString *)serverAddr ofProjectName:(NSString*)appName withProjectVersion:(NSString*)appVersion forUserId:(NSString*)userId; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `serverAddr` | Log collecting server's address - Collector server address: elsa-col.ncloud.com | | `appName` | Project ID | | `appVersion` | The version information of the app to transfer logs - Mapping with the symbol file when symbolicating in this version | | `userId` | User ID | Note onPort and byProtocol parameters are deleted from SDK Version 0.32. ``` NSString* appID = @"02b96c3d8bbe_elsa-test"; NSString* appVer= @"1.0.0"; NSString* serverAddr = @"elsa-v2-col.ncloud.com"; //Effective Log Search & Analytics 2.0 collecting server's address NSString* userID = @"tester"; //userID // Nelo Init [NeloLog init:serverAddr ofProjectName:appID withProjectVersion:appVer forUserId:userID]; ``` ### Log transferring API Here are the APIs that transfer logs. ``` // 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; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `errorCode` | The value that is mapped to NELO's `errorCode` field (Length limit: 128 characters) | | `message` | The value that is mapped to NELO's `body` field (No length limit, but there is a total log capacity limit) | | `location` | The value that is mapped to NELO's `location` field (Transfers the location where `error` occurs) | ``` [NeloLog info:@"ErrorCode" withMessage:@"Message"]; ``` ### Option setting API Here are the Option setting APIs. #### Set user ID Here are the APIs that set user ID. ``` + (void) setUserId:(NSString*)userId; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `userId` | User ID | #### Set log type Here are the APIs that set logType. ``` + (void) setLogType:(NSString*)logType; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `logType` | logType information | #### Crash callback You can call the user-defined functions before sending the crash log when a crash occurs. Here are the crash callback APIs. ``` + (void) setCrashBlock:(void (^) (void))block; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `block` | Sets the crash transfer method when an app crash occurs | ``` [NeloLog setCrashBlock:^{ NSLog(@"crashed"); [NeloLog setCustomField:@"MyValue" forKey:@"MyKey"]; }]; ``` #### Set loglevel Here are the APIs that transfer logs over the loglevel. Note - Uses functions by logLevel. - logLevel: Fatal, Error, Warn, Info, and Debug - The value is defined as the following constant value: - NELO2_LOGLEVEL_DEBUG (Default) - NELO2_LOGLEVEL_INFO - NELO2_LOGLEVEL_WARN - NELO2_LOGLEVEL_ERROR - NELO2_LOGLEVEL_FATAL ``` + (void) setLogLevelFilter:(NSString*)logLevelFilter; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `logLevelFilter` | Transfers logs over logLevel to NELO | ``` [NeloLog setLogLevelFilter:NELO2_LOGLEVEL_WARN]; ``` #### Set log transfer method Here are the APIs that set log transfer method. ``` + (void) setNeloSendMode:(NSString*)sendMode; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `sendMode` | Set log transfer method | The following shows the log transfer method by network, depending on the parameter setting value. - When setting to `ALL` | Network status | Transfer method | | --- | --- | | 3g | Transfer | | Wi-Fi | Transfer | | Not Connected | Not sent | - When setting to `WIFI` | Network status | Transfer method | | --- | --- | | 3g | Not sent | | Wi-Fi | Transfer | | Not Connected | Not sent | #### Set symbolication execution Here are the APIs that set whether to execute symbolication at the client. Note - The default settings value of SDK is as follows: - iOS SDK: `false` (Not executing symbolication task at the client) - mac SDK: `true` (Executing symbolication task at the client) - When executing the symbolication task at the client, a bit of delay occurs when the app stops if a crash occurs. ``` + (void) enableClientSideSymbolication:(bool)enable; ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `enable` | Sets whether to execute symbolication at the client |