--- title: "iOS SDK" slug: "game-gamepot3-ios-sdk" tags: ["GAMEPOT 3.0"] updated: 2026-09-17T09:07:47Z published: 2026-09-17T09:07:47Z canonical: "guide.ncloud-docs.com/game-gamepot3-ios-sdk" stale: true --- > ## 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 환경에서 이용 가능합니다. iOS에서 게임을 개발하기 위한 GAMEPOT iOS SDK 사용법에 대해 설명합니다. SDK를 설치하고 환경을 구성함으로써 게임과 대시보드를 연동할 수 있습니다. ## 요구 사양 iOS용 GAMEPOT SDK를 사용하기 위한 요구 사양은 다음과 같습니다. - 최소 사양: iOS 15.1 이상 (하위 버전의 iOS 지원이 필요하면 [문의채널](https://www.ncloud.com/support/question)로 문의해 주십시오. ) ## SDK 설치 및 환경 구성 iOS SDK를 설치한 후 환경을 구성하여 GAMEPOT 대시보드와 게임을 연동하고 게임 개발에 필요한 기능을 사용할 수 있습니다. GAMEPOT SDK에서 지원하는 언어는 아래와 같습니다. - 한국어, 영어, 이탈리아어, 태국어, 베트남어, 일본어, 중국어(간체/번체), 인도네시아어, 독일어, 스페인어, 프랑스어 게임팟 초기화 시 등록한 언어로 자동 표기되며, 미지원 언어는 영어로 표시됩니다. ### SDK 설치 GAMEPOT iOS SDK를 설치하고 프로젝트를 구성하려면 다음 절차를 따르십시오. 1. iOS 프로젝트 폴더 내 CocoaPods를 통해 Podfile을 생성해 주십시오. Terminal: ``` pod init ``` 2. podfile 파일에 NBase SDK를 추가해 주십시오. Podfile 정의 내용은 아래 [Podfile 설정](/docs/game-gamepot3-ios-sdk#Podfile%EC%84%A4%EC%A0%95) 항목을 참고해 주십시오. 3. NBase SDK를 CocoaPods를 통해 설치해 주십시오. Terminal: ``` pod install ``` 참고 iOS SDK의 경우 [cocoapods](https://cocoapods.org)를 설치하셔야만 정상 설치가 가능합니다. #### Podfile 설정 편집기로 Podfile을 열어 GAMEPOT SDK에 필요한 프레임워크를 추가합니다. ``` platform :ios, '15.0' # 프로젝트 메인 타겟 target '프로젝트 메인 타겟' do ... pod 'NBase' ... end ``` 구글 로그인과 페이스북 로그인을 함께 사용하는 경우에는 다음 예시를 참고해 주십시오. ``` platform :ios, '15.0' target 'GAMEPOT_GAME' do use_frameworks! # Pods for Nbase SDK pod 'NBase' pod 'NBaseAdapterProviderGoogle' pod 'NBaseAdapterProviderFacebook' end ``` 지원 가능한 iOS 종속 모듈은 다음과 같습니다. | Name | Description | Dependeny modules | | --- | --- | --- | | NBase | 게임팟 기본 모듈 | X | | NBaseAdapterProviderGoogle | 구글 로그인 | X | | NBaseAdapterProviderFacebook | 페이스북 로그인 | FBSDKLoginKit (17.4.0) | | NBaseAdapterProviderNaver | 네이버 로그인 | X | | NBaseAdapterProviderLine | 라인 로그인 | X | | NBaseAdapterProviderKakao | 카카오 로그인 | X | | NBaseAdapterProviderX | X 로그인 | X | 이메일, 애플, 게스트 로그인의 경우 기본 모듈에 적용되어 있습니다. 주의 일부 종속 프레임워크들은 Swift Package Manager을 통해서만 추가가 가능합니다. 아래는 Swift Package Manager로 추가가 필요한 필수 종속 프레임워크를 수동으로 추가하는 방법입니다. 1. Xcode에서 프로젝트 설정으로 이동한 후 Package Dependencies 설정으로 진입해 주십시오. ![gamepot-UnitySDK05.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-UnitySDK05.png?sv=2026-02-06&spr=https&st=2026-11-14T06%3A18%3A35Z&se=2026-11-14T07%3A18%3A35Z&sr=c&sp=r&sig=GfsxhTdobYj4IH8ff5F75DrmoJy3N3YG3dFkaTHwS04%3D) 2. 우측 상단 URL 입력란에 `https://github.com/apollographql/apollo-ios.git`을 추가한 뒤 검색하여 apollo-ios를 선택하고 Add Package로 추가해 주십시오. 3. 노출되는 모달에서 Apollo와 ApolloAPI 모듈을 프로젝트의 메인 타깃(Unity-iPhone)에 추가해 주십시오. ![gamepot-UnitySDK06.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-UnitySDK06.png?sv=2026-02-06&spr=https&st=2026-11-14T06%3A18%3A35Z&se=2026-11-14T07%3A18%3A35Z&sr=c&sp=r&sig=GfsxhTdobYj4IH8ff5F75DrmoJy3N3YG3dFkaTHwS04%3D) 아래 표는 Swift Package Manager로 추가하는 종속 모듈을 설명합니다. | Name | Dependency modules | Location | Version | Framework | | --- | --- | --- | --- | --- | | NBase | Apollo | https://github.com/apollographql/apollo-ios.git | 1.15.2 | Apollo, ApolloAPI | ### 사전 준비 SDK를 적용하기 전에 필요한 필수 설정 항목을 다음과 같이 확인해 주십시오. 1. 프로젝트 ID와 프로젝트 키는 **대시보드** > **프로젝트 설정**에서 복사해 주십시오. 2. 로그인, 스토어, 연동에 대한 환경 설정은 **대시보드** > **프로젝트 설정**에서 수행할 수 있습니다. 3. 로그인별로 [로그인 수단별 환경 설정](/docs/game-gamepot3-google-integration)을 참조하여, 콘솔에 설정하고 대시보드에 추가해 주십시오. 4. 인앱 결제 시에 [스토어별 환경 설정](/docs/game-gamepot3-apple-store)을 참조하여, 콘솔에 설정하고 대시보드에 추가해 주십시오. 5. 인앱 결제를 위한 스토어마다 아이템을 등록해 주십시오. **대시보드** > **결제** > **인앱**에서 추가해 주십시오. ### 초기화 초기화를 수행하려면 게임을 시작할 때 로드되는 첫 장면에 사용되는 개체에 아래 코드를 추가해 주십시오. Swift: ``` import NBase NBase.initialize([projectId], projectKey: [projectKey], storeId: [storeId], language: [language], region: [region]) { result in switch result { case .success(let data): NBase.showToast(message: data?.encodeToJson() ?? "") case .failure(let error): NBase.showToast(message: error.errorDescription ?? "") } } ``` Objective-C: ``` [NBaseBridge.shared initialize:[projectId] projectKey:[projectKey] storeId:[storeId] language:[language] region:[region] :^(NSDictionary * _Nullable result, NSError * _Nullable error) { if (error) { NSLog(@"Initialization Error: %@", error.localizedDescription); } else { NSLog(@"Initialization succeeded with result: %@", result); } }]; ``` - **Parameters** 다음 표는 초기화에 필요한 매개변수를 설명합니다. | Key | Type | Description | Required | | --- | --- | --- | --- | | projectId | String | 프로젝트 ID (대시보드 → 프로젝트 설정) | O | | projectKey | String | 프로젝트 키 (대시보드 → 프로젝트 설정) | O | | storeId | String | 스토어명 (apple) | O | | language | String | 언어 (en, ko, jp 등) | O | | region | String | 리전명 (kr, jp, sg, us, eu, preview) | O | - **Callback** 다음 표는 초기화 콜백으로 전달되는 정보를 설명합니다. | Key | Type | Description | | --- | --- | --- | | status | Bool | 상태 | | language | String | 언어 | | country | String | 국가 | | remote_ip | String | IP | | platform | String | 플랫폼 | | sandbox | Bool | 샌드박스 여부 | ## 로그인 기능 로그인 기능을 이용하여 다양한 인증 수단으로 사용자를 인증하는 방법을 설명합니다. ### 로그인 기능 사용 개발사에서 구현한 로그인 UI에 따라 로그인 버튼을 클릭했을 때 동작하는 SDK 로그인 기능을 사용하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.signIn(serviceType: .google) { result in switch result { case .success(let data): // signIn Success print("signIn Success: \(data)") break case .failure(let error): // signIn failed print("signIn Failed: \(error)") case .maintenance(let data): // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("maintenance: \(data)") case .update(let data): // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("update: \(data)") } } ``` Objective-C: ``` [NBaseBridge.shared signIn:google :^(NSDictionary * _Nullable result, NSError * _Nullable error, NSDictionary * _Nullable errorData) { if (error) { // signIn failed NSLog(@"signIn Failed: %@", error.localizedDescription); } else if (result) { NSDictionary *appStatus = result[@"appStatus"]; if (appStatus && appStatus[@"type"]) { NSString *statusType = appStatus[@"type"]; if ([statusType isEqualToString:@"maintenance"]) { // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"maintenance: %@", appStatus); } else if ([statusType isEqualToString:@"update"]) { // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"update: %@", appStatus); } } else { // signIn success NSLog(@"signIn Success: %@", result); } } }]; ``` 업데이트 또는 점검 시 SDK에서 제공하는 자체 팝업을 사용하려면 아래 코드를 추가해 주십시오. Swift: ``` NBase.showAppStatusPopup(status: appStatus){ status, e in if status.close { // App Close } if status.next{ // Next, Optional update } } ``` Objective-C: ``` [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { if (popupError) { // showAppStatusPopup Error } else if (popupResult) { BOOL shouldClose = [[popupResult objectForKey:@"close"] boolValue]; BOOL shouldProceedNext = [[popupResult objectForKey:@"next"] boolValue]; if (shouldClose) { // App Close } else if (shouldProceedNext) { // Next, Optional update } } }]; ``` - **Provider** 다음 표는 로그인 기능에서 사용할 서비스 타입을 설명합니다. | Key | Description | | --- | --- | | SignInServiceType.google | 구글 | | SignInServiceType.anonymous | 게스트 | | SignInServiceType.facebook | 페이스북 | | SignInServiceType.apple | 애플 | | SignInServiceType.kakao | 카카오 | | SignInServiceType.x | X | | SignInServiceType.line | 라인 | | SignInServiceType.naver | 네이버 | | SignInServiceType.github | 깃허브 | | SignInServiceType.microsoft | 마이크로소프트 | | SignInServiceType.huawei | 화웨이 | - **User** 다음 표는 User 객체의 필드를 설명합니다. | Key | Type | Description | | --- | --- | --- | | id | string | 유저의 고유 ID | | socialId | string | 소셜 ID | | name | string | 이름 (제공해 주는 경우) | | email | string | 이메일 (제공해 주는 경우) | | token | string | 토큰 | | age | int | 나이 (제공해 주는 경우) | | profile | string | 프로필 (제공해 주는 경우) | | customField | string | 커스텀 필드 | | isSignUp | bool | 가입 여부 | | appStatus | AppStatus | 점검/업데이트 상태 | - **AppStatus** 다음 표는 AppStatus 객체의 필드를 설명합니다. | Key | Type | Description | | --- | --- | --- | | message | string | 메시지 | | startedAt | long | 시작 시간 | | endedAt | long | 종료 시간 | | currentAppVersion | string | 현재 앱 버전 | | updateAppVersion | string | 업데이트 앱 버전 | | currentAppVersionCode | string | 현재 앱 버전 코드 | | updateAppVersionCode | string | 업데이트 앱 버전 코드 | | isForce | bool | 강제 업데이트 여부 | | url | string | 점검/업데이트 등록된 URL | ### SDK 자체 제공 로그인 UI GAMEPOT SDK가 제공하는 완성된 형태의 로그인 UI를 사용할 수 있습니다. SDK가 제공하는 로그인 UI를 호출하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.openSignInUI { result in switch result { case .success(let data): // openSignInUI Success print("openSignInUI Success: \(data)") break case .failure(let error): // openSignInUI failed print("openSignInUI Failed: \(error)") case .maintenance(let data): // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("maintenance: \(data)") case .update(let data): // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("update: \(data)") } } ``` Objective-C: ``` [NBaseBridge.shared openSignInUI:^(NSDictionary * _Nullable result, NSError * _Nullable error, NSDictionary * _Nullable errorData) { if (error) { // openSignInUI Error NSLog(@"openSignInUI Error: %@", error.localizedDescription); } else if (result) { NSDictionary *appStatus = result[@"appStatus"]; if (appStatus && appStatus[@"type"]) { NSString *statusType = appStatus[@"type"]; if ([statusType isEqualToString:@"maintenance"]) { // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"maintenance: %@", appStatus); return; } else if ([statusType isEqualToString:@"update"]) { // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"update: %@", appStatus); return; } } else { // openSignInUI Success NSLog(@"openSignInUI Success: %@", result); } } }]; ``` ### 자동 로그인 (옵션) 초기화한 후 마지막으로 로그인한 인증 수단으로 자동 로그인을 시도할 수 있습니다. 자동 로그인을 시도하기 전에 마지막 로그인 Provider 타입을 확인하는 것이 좋습니다. Swift: ``` // 마지막 로그인 Provider 타입 확인 let lastProviderType = NBase.getLastProviderType() if lastProviderType != .none { // 마지막 로그인 정보가 있는 경우에만 자동 로그인 시도 NBase.signInLastLoggedIn(completionHandler: { result in switch result { case .success(let data): // signInLastLoggedIn Success print("signInLastLoggedIn Success: \(data)") case .failure(let error): // signInLastLoggedIn failed print("signInLastLoggedIn Failed: \(error)") case .maintenance(let data): /* maintenance case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("maintenance: \(data)") case .update(let data): /* update case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("update: \(data)") } }) } else { print("No last login provider found") } ``` Objective-C: ``` // 마지막 로그인 Provider 타입 확인 SignInServiceType lastProviderType = [NBaseBridge.shared getLastProviderType]; if (lastProviderType != SignInServiceTypeNone) { // 마지막 로그인 정보가 있는 경우에만 자동 로그인 시도 [NBaseBridge.shared signInLastLoggedIn:^(NSDictionary * _Nullable result, NSError * _Nullable error, NSDictionary * _Nullable errorData) { if (error) { // signInLastLoggedIn failed NSLog(@"signInLastLoggedIn Failed: %@", error.localizedDescription); } else if (result) { NSDictionary *appStatus = result[@"appStatus"]; if (appStatus && appStatus[@"type"]) { NSString *statusType = appStatus[@"type"]; if ([statusType isEqualToString:@"maintenance"]) { // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"maintenance: %@", appStatus); return; } else if ([statusType isEqualToString:@"update"]) { // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"update: %@", appStatus); return; } } else { // signInLastLoggedIn success NSLog(@"signInLastLoggedIn Success: %@", result); } } }]; } else { NSLog(@"No last login provider found"); } ``` **getLastProviderType()** 메서드는 마지막으로 로그인한 Provider 타입을 반환합니다. **signInLastLoggedIn()** 메서드는 마지막으로 로그인한 인증 수단으로 자동 로그인을 시도합니다. - **Callback** 다음 표는 자동 로그인 콜백으로 전달되는 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | data | NBUser | 로그인 성공 시 사용자 정보 | | error | NBaseError | 로그인 실패 시 에러 정보 | ### 로그아웃 게임팟 사용자 계정을 로그아웃하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.signOut() { result in switch result { case .success(let status): // signOut Success print("signOut Success: \(status ?? false)") case .failure(let error): // signOut Failed print("signOut Failed: \(error.errorCode), \(error.errorDescription ?? "")") } } ``` Objective-C: ``` [NBaseBridge.shared signOut:^(NSNumber *result, NSError *error) { if (error) { // signOut Failed NSLog(@"signOut Failed: %ld, %@", (long)error.code, error.localizedDescription); } else { // signOut Success NSLog(@"signOut Success: %@", result.boolValue ? @"YES" : @"NO"); } }]; ``` - **Callback** 다음 표는 로그아웃 콜백으로 전달되는 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | status | Bool | 성공 여부 | ### 회원 탈퇴 SDK 회원탈퇴 기능을 사용하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.deleteMember() { result in switch result { case .success(let status): // deleteMember Success print("deleteMember Success: \(status ?? false)") case .failure(let error): // deleteMember Failed print("deleteMember Failed: \(error.errorCode), \(error.errorDescription ?? "")") } } ``` Objective-C: ``` [NBaseBridge.shared deleteMember:^(NSNumber *result, NSError *error) { if (error) { // deleteMember Failed NSLog(@"deleteMember Failed: %ld, %@", (long)error.code, error.localizedDescription); } else { // deleteMember Success NSLog(@"deleteMember Success: %@", result.boolValue ? @"YES" : @"NO"); } }]; ``` - **Callback** 다음 표는 회원 탈퇴 콜백 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | status | Bool | 회원 탈퇴 성공 여부 | ### 자체 아이디 비밀번호 인증 (옵션) 사용자가 이메일 주소와 비밀번호를 사용하여 로그인할 수 있게 하는 인증 메서드입니다. 사용자의 이메일 주소와 비밀번호를 기반으로 사용자 인증을 수행합니다. Swift: ``` NBase.signInWithPassword(username: [username], password: [password], options: [option]) { result in switch result { case .success(let user): NBase.showToast(message: user?.encodeToJson() ?? "") case .failure(let error): NBase.showToast(message: error.errorDescription ?? "") } } ``` Objective-C: ``` [NBaseBridge.shared signInWithPassword:[username] password:[password] options:[options] :^(NSDictionary * _Nullable result, NSError * _Nullable error) { if (error) { NSLog(@"signInWithPassword Error: %@", error.localizedDescription); } else { NSLog(@"signInWithPassword succeeded with result: %@", result); } }]; ``` ### 자격 증명으로 로그인 (옵션) 외부에서 획득한 소셜 계정의 자격 증명(Access Token)을 사용하여 로그인하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.signInWithCredential(providerId: providerId, accessToken: accessToken, options: options) { result in switch result { case .success(let data): // signInWithCredential Success print("signInWithCredential Success: \(data)") case .failure(let error): // signInWithCredential Failed print("signInWithCredential Failed: \(error.errorCode), \(error.errorDescription ?? "")") case .maintenance(let data): /* maintenance case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("maintenance: \(data)") case .update(let data): /* update case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: (data?.appStatus)) { status, e in // Popup handling } */ print("update: \(data)") } } ``` Objective-C: ``` [NBaseBridge.shared signInWithCredential:providerId accessToken:accessToken options:options :^(NSDictionary * _Nullable result, NSError * _Nullable error, NSDictionary * _Nullable errorData) { if (error) { // signInWithCredential Failed NSLog(@"signInWithCredential Failed: %ld, %@", (long)error.code, error.localizedDescription); } else if (result) { NSDictionary *appStatus = result[@"appStatus"]; if (appStatus && appStatus[@"type"]) { NSString *statusType = appStatus[@"type"]; if ([statusType isEqualToString:@"maintenance"]) { /* maintenance case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"maintenance: %@", appStatus); return; } else if ([statusType isEqualToString:@"update"]) { /* update case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:appStatus :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"update: %@", appStatus); return; } } else { // signInWithCredential success NSLog(@"signInWithCredential Success: %@", result); } } }]; ``` - **Parameter** 다음 표는 자격 증명 로그인에 필요한 매개변수를 설명합니다. | Key | Type | Description | Required | | --- | --- | --- | --- | | providerId | String | Provider ID (예: "google", "facebook" 등) | O | | accessToken | String | 소셜 계정의 Access Token | O | | options | String | 추가 옵션 (선택사항) | X | - **Callback** 다음 표는 자격 증명 로그인 콜백 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | data | NBUser | 로그인 성공 시 사용자 정보 | | error | NBaseError | 로그인 실패 시 에러 정보 | ## 외부 계정 연동 기능 GAMEPOT 사용자 계정에 외부 소셜 계정을 연동하고 관리하는 기능을 안내합니다. ### 외부 계정 연동 기능 사용 현재 게임팟 사용자 계정에 다른 소셜 계정을 연동하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.createLinking(serviceType: .google) { result in switch result { case .success(let linkingId): // createLinking Success print("createLinking Success: \(linkingId ?? "")") // 계정 연동 성공 후 처리 로직 case .failure(let error): // createLinking Failed print("createLinking Failed: \(error.errorCode), \(error.errorDescription ?? "")") } } ``` Objective-C: ``` [NBaseBridge.shared createLinking:google :^(NSDictionary * _Nullable result, NSError * _Nullable error) { if (error) { // createLinking Failed NSLog(@"createLinking Failed: %ld, %@", (long)error.code, error.localizedDescription); } else { // createLinking Success NSLog(@"createLinking Success: %@", result); // 계정 연동 성공 후 처리 로직 } }]; ``` - **Parameter** 다음 표는 계정 연동에 필요한 매개변수를 설명합니다. | Key | Type | Description | Required | | --- | --- | --- | --- | | serviceType | SignInServiceType | 연동할 Provider 타입 (예: .google, .facebook 등) | O | - **Callback** 다음 표는 계정 연동 콜백 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | linkingId | String | 연동 성공 시 반환되는 연동 ID | ### 연동 리스트 확인 현재 게임팟 사용자 계정에 연동된 소셜 계정 목록을 확인하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.getLinkedLists() { result in switch result { case .success(let linkings): // getLinkedLists Success print("getLinkedLists Success: \(linkings)") // 연동 목록 확인 후 처리 로직 case .failure(let error): // getLinkedLists Failed print("getLinkedLists Failed: \(error.errorCode), \(error.errorDescription ?? "")") } } ``` Objective-C: ``` [NBaseBridge.shared getLinkedLists:^(NSDictionary * _Nullable result, NSError * _Nullable error) { if (error) { // getLinkedLists Failed NSLog(@"getLinkedLists Failed: %ld, %@", (long)error.code, error.localizedDescription); } else { // getLinkedLists Success NSLog(@"getLinkedLists Success: %@", result); // 연동 목록 확인 후 처리 로직 } }]; ``` - **Callback** 다음 표는 계정 연동 목록 확인 시 제공되는 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | linkings | Array | 연동된 계정 목록 | - **Linking** 다음 표는 Linking 객체의 필드를 설명합니다. | Key | Type | Description | | --- | --- | --- | | id | String | 연동 ID (계정 연동 해제 시 사용) | | username | String | 소셜 ID | | provider | String | 소셜 provider 타입 | ### 연동 해제 현재 게임팟 사용자 계정에서 특정 소셜 계정 연동을 해제하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.deleteLinking(linkingId: linkingId) { result in switch result { case .success(let status): // deleteLinking Success print("deleteLinking Success: \(status ?? false)") // 연동 해제 성공 후 처리 로직 case .failure(let error): // deleteLinking Failed print("deleteLinking Failed: \(error.errorCode), \(error.errorDescription ?? "")") } } ``` Objective-C: ``` [NBaseBridge.shared deleteLinking:linkingId :^(NSNumber * _Nullable result, NSError * _Nullable error) { if (error) { // deleteLinking Failed NSLog(@"deleteLinking Failed: %ld, %@", (long)error.code, error.localizedDescription); } else { // deleteLinking Success NSLog(@"deleteLinking Success: %@", result.boolValue ? @"YES" : @"NO"); // 연동 해제 성공 후 처리 로직 } }]; ``` - **Parameter** 다음 표는 계정 연동 해제에 필요한 매개변수를 설명합니다. | Key | Type | Description | Required | | --- | --- | --- | --- | | linkingId | String | 해제할 연동 ID (createLinking 또는 getLinkedLists에서 획득) | O | - **Callback** 다음 표는 계정 연동 해제 콜백 값을 설명합니다. | Key | Type | Description | | --- | --- | --- | | status | Bool | 성공 여부 | ## 앱 상태 확인 현재 클라이언트의 점검/업데이트 상태를 확인하려면 아래 코드를 사용해 주십시오. Swift: ``` NBase.checkAppStatus() { status in switch status { case .success(let data): if let data = data { switch data { case .maintenance(let maintenance): // Maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: data) { status, e in // Popup handling } */ case .update(let update): // Update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup NBase.showAppStatusPopup(status: data) { status, e in // Popup handling } */ } } else { // AppStatus Success print("checkAppStatus success") } case .failure(let error): print("checkAppStatus error: \(error)") } } ``` Objective-C: ``` [NBaseBridge.shared checkAppStatus:^(NSDictionary * _Nullable result, NSError * _Nullable error, NSDictionary * _Nullable errorData) { if (error) { NSLog(@"checkAppStatus error: \(error.localizedDescription)"); } else if (result) { NSString *type = result[@"type"]; if ([type isEqualToString:@"maintenance"]) { // maintenance /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:result :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"maintenance: %@", result); } else if ([type isEqualToString:@"update"]) { // update /* case 1: Use in-game popup implemented directly by the developer case 2: Call the code below to use the SDK's own popup [NBaseBridge.shared showAppStatusPopup:result :^(NSDictionary * _Nullable popupResult, NSError * _Nullable popupError) { // Popup handling }]; */ NSLog(@"update: %@", result); } } else { // AppStatus Success NSLog(@"Normal Status - No maintenance or update required"); } }]; ``` ## 문제 해결 자주 발생하는 오류와 해결 방법을 안내합니다. Q. Authorization failed: Error Domain=AKAuthenticationError Code=-7026 A. **TARGETS** > **+Capability**를 클릭하여 **Sign in with Apple**을 추가해 주십시오. ![gamepot-UnitySDK14.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-UnitySDK14.png?sv=2026-02-06&spr=https&st=2026-11-14T06%3A18%3A35Z&se=2026-11-14T07%3A18%3A35Z&sr=c&sp=r&sig=GfsxhTdobYj4IH8ff5F75DrmoJy3N3YG3dFkaTHwS04%3D)