문자보내기 | SNS 로그인, 외부 연동, 공유 | Appbox iOS SDK 가이드
문자보내기
문자 앱 실행하기
AppBox.shared.sendSMS(target:message:completion:)
Swift
1
AppBox.shared.sendSMS(target: "01012345678", message: "저장했습니다") { value, error in
2
guard error == nil else { return }
3
print(value)
4
}
1
[AppBox.shared sendSMSWithTarget:@"01012345678" message:@"저장했습니다" completion:^(BOOL value, NSError *error) {
2
if (error) { return; }
3
NSLog(@"%d", value);
4
}];
Request 항목 정의
| Request 항목 | 필수여부 | 설명 | 기본값 |
|---|---|---|---|
target | 필수 | 받는 사람 전화번호 | - |
message | 필수 | 문자 본문 | - |
completion | 필수 | 결과를 받는 콜백. 메인 스레드에서 한 번 호출됩니다 | - |
Response 항목 정의
| Response 결과값 | |
|---|---|
| 값 | Bool |
| 오류 | 실패 원인. NSError |
화면 불필요. 메시지 앱을 채워서 엽니다. 직접 발송하지 않습니다
웹 브릿지에서는 문자보내기의 phone.sendSMS입니다.