세그먼트 등록 | 메시지, 인앱, 푸시 마케팅 | Appbox iOS SDK 가이드
세그먼트 등록
개인화 세그먼트
AppBox.shared.setSegment(segment:completion:)
Swift
1
AppBox.shared.setSegment(segment: "") { value, error in
2
guard error == nil else { return }
3
print(value)
4
}
1
[AppBox.shared setSegmentWithSegment:@"" completion:^(BOOL value, NSError *error) {
2
if (error) { return; }
3
NSLog(@"%d", value);
4
}];
Request 항목 정의
| Request 항목 | 필수여부 | 설명 | 기본값 |
|---|---|---|---|
segment | 필수 | 콘솔에서 정의한 세그먼트를 key-value로 전달합니다 | - |
completion | 필수 | 결과를 받는 콜백. 메인 스레드에서 한 번 호출됩니다 | - |
Response 항목 정의
| Response 결과값 | |
|---|---|
| 값 | Bool |
| 오류 | 실패 원인. NSError |
화면 불필요. 인자가 [String: String]으로 타입이 고정돼 있습니다. 개인정보나 인증 정보를 넣지 마세요
웹 브릿지에서는 세그먼트 등록의 message.setSegment입니다.