Contents

XCTWaiter

Waits for the fulfillment of a group of expectations.

Declaration

class XCTWaiter

Overview

You can use waiters with or without a delegate to respond to events such as completion, timeout, or invalid expectation fulfillment. XCTestCase automatically conforms to the XCTWaiterDelegate protocol and automatically reports timeouts and other unexpected events as test failures.

You can use waiters without a delegate or any association with a test case instance. This allows test support libraries to provide convenience methods for waiting without having to pass test cases through those APIs.

Topics

Creating a Waiter

Waiting for Expectations

Responding to Expectation Fulfilment