QR 보기 팝업 | 스캔 및 코드 생성 | Appbox iOS SDK 가이드
QR 보기 팝업
QR을 팝업으로 노출
AppBox.shared.qrcodePopupOpen(qr:animation:haptic:completion:)
Swift
1
AppBox.shared.qrcodePopupOpen(qr: "https://appboxapp.com", animation: true, haptic: true) { value, error in
2
guard error == nil else { return }
3
print(value)
4
}
1
[AppBox.shared qrcodePopupOpenWithQr:@"https://appboxapp.com" animation:YES haptic:YES completion:^(BOOL value, NSError *error) {
2
if (error) { return; }
3
NSLog(@"%d", value);
4
}];
Request 항목 정의
| Request 항목 | 필수여부 | 설명 | 기본값 |
|---|---|---|---|
qr | 필수 | QR로 그릴 문자열 | - |
animation | - | 표시 애니메이션 사용 여부 | true |
haptic | - | 표시할 때 진동 여부 | true |
completion | 필수 | 결과를 받는 콜백. 메인 스레드에서 한 번 호출됩니다 | - |
Response 항목 정의
| Response 결과값 | |
|---|---|
| 값 | Bool |
| 오류 | 실패 원인. NSError |
화면 필요. 축약형 (qr:completion:)
웹 브릿지에서는 QR 보기 팝업의 ui.qrcodePopupOpen입니다.