기기 고유 식별자 획득
DoveRunner Mobile App Security SDK는 각 기기에 대한 고유 식별자를 생성하고 관리합니다. DoveRunner Mobile App Security SDK를 사용하는 고객은 필요한 경우 DoveRunner Mobile App Security의 인터페이스를 사용하여 기기 고유 식별자를 확인할 수 있습니다. 그리고 DoveRunner Mobile App Security에서 제공하는 해킹 데이터 서비스를 사용하는 비즈니스에 사용할 수 있습니다.
기기 고유 식별자 표시
Section titled “기기 고유 식별자 표시”먼저 Xcode 프로젝트를 열고 “ViewController.swift” 파일을 엽니다. swift 파일을 연 후 다음 코드를 넣습니다 (ViewController.swift 파일에 이미 ‘viewDidAppear’ 메서드가 포함되어 있다면 ‘super.viewDidAppear( animated );’ 줄 아래에 다음 코드의 본문만 삽입하세요.)
Swift 프로젝트용 ‘ViewController.swift’에 넣을 간단한 UI 코드
override func viewDidAppear(_ animated: Bool){ super.viewDidAppear( animated );
let inst: AppSealingInterface = AppSealingInterface(); let appSealingDeviceID = String.init( cString: inst._GetAppSealingDeviceID() ); let alertController = UIAlertController( title: "DoveRunner Mobile App Security 기기 ID", message: appSealingDeviceID, preferredStyle: .alert );
alertController.addAction( UIAlertAction( title: "확인", style: .default )); self.present( alertController, animated: true, completion: nil );}
샘플 코드는 “AppSealingiOS.mm” 파일에도 포함되어 있으므로 해당 파일에서 복사하여 붙여넣을 수 있습니다.
프로젝트가 Objective-C 기반인 경우 다음 코드를 사용하여 간단한 UI를 표시할 수 있습니다.
Objective-C 프로젝트용 ‘ViewController.mm’에 넣을 간단한 UI 코드
#include "AppsealingiOS.h"
char _appSealingDeviceID[64];- (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated];
if ( ObjC_GetAppSealingDeviceID( _appSealingDeviceID ) == 0 ) { UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"DoveRunner Mobile App Security 기기 ID" message:[[NSString alloc] initWithUTF8String:_appSealingDeviceID] preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"확인" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { }]; [alert addAction:confirm]; [self presentViewController:alert animated:YES completion:nil]; }}
앱을 실행하면 다음과 같은 간단한 알림 상자가 표시됩니다.
기기 식별자 활용
Section titled “기기 식별자 활용”획득한 기기 고유 식별자는 다음과 같은 용도로 사용할 수 있습니다:
- 사용자 기기 추적 및 분석
- 해킹 시도 데이터와 연관된 기기 식별
- 고객 지원 시 기기 특정
- 비즈니스 분석 및 보고서 생성
이 식별자는 각 기기마다 고유하며, DoveRunner Mobile App Security 서비스 전반에 걸쳐 일관되게 사용됩니다.