UIViewController에서 시작합니다.
AppBox 화면 시작 | 초기화 및 화면 | Appbox iOS SDK 가이드
AppBox 화면 시작
AppBox 화면 시작
AppBox.start(from: UIViewController, completion: ((Bool, NSError?) -> Void)?)
Swift
1
AppBox.start(from: self) { success, error in
2
if !success {
3
print(error?.localizedDescription ?? "AppBox 화면 시작 실패")
4
}
5
}
1
[AppBox startFrom:self completion:^(BOOL success, NSError *error) {
2
if (!success) {
3
NSLog(@"%@", error.localizedDescription ?: @"AppBox 화면 시작 실패");
4
}
5
}];
Request 항목 정의
| Request 항목 | 필수여부 | 설명 | 기본값 |
|---|---|---|---|
viewController | 필수 | AppBox 화면을 표시할 UIViewController | - |
completion | 선택 | 화면 시작 요청 처리 결과 | nil |
Response 항목 정의
| Response 결과값 | |
|---|---|
success | 화면 시작 요청이 SDK에 전달되면 true |
error | 시작 요청 실패 원인 |
webView 초기화 결과가 .INITIALIZED인지 먼저 확인합니다. UI를 표시할 수 있는 시점에 현재 화면 계층의 view controller를 전달합니다. success == true는 웹 페이지 로딩 완료를 의미하지 않습니다.