본문으로 건너뛰기

서비스 인증 재시도

ServiceAuthType에 해당하는 서비스의 인증을 다시 요청합니다.

API 참고

Swift
/// Retries authentication for the specified service.
/// - Parameters:
///   - service: The service whose authentication should be retried.
///   - completion: A closure that is called when the operation completes.
///     - success: `true` if the operation was successful; otherwise `false`.
///     - error: An `NSError` object that describes the error that occurred, or `nil` if the operation was successful.
func retryServiceAuth(
    _ service: ServiceAuthType,
    completion: AIBudsCompletionHandler?
)

retryServiceAuth를 참고하세요.

SwiftObjective-C서비스
.starBurstAIBudsServiceAuthTypeStarBurstStarBurst AI 서비스
.onDeviceVoiceAssistantAIBudsServiceAuthTypeOnDeviceVoiceAssistant오프라인 음성 비서
Swift
guard let device = device as? DeviceServiceAuthAPI else { return }
device.retryServiceAuth(.starBurst) { success, error in
    if !success { print(error?.localizedDescription ?? "Authorization retry failed") }
}

completion은 재시도 요청의 접수 성공 또는 실패만 나타냅니다. 서비스가 인증되었다고 판단하기 전에 갱신된 인증 상태를 읽거나 SDK 인증 콜백을 처리하세요.