GREYDispatchQueueIdlingResource

@interface GREYDispatchQueueIdlingResource : NSObject <GREYIdlingResource>

Idling resource that tracks blocks sent to a dispatch queue.

  • Creates an idling resource backed by the specified @c queue.

    @c dispatch_sync blocks and dispatch_sync_f tasks sent to @c queue are tracked. @c dispatch_async blocks and @c dispatch_async_f tasks sent to @c queue are tracked. @c dispatch_after blocks and @c dispatch_after_f tasks sent to @c queue are tracked if they are delayed no more than the delay amount set for the @c kGREYConfigKeyTrackableDispatchAfterDuration configuration. A weak reference is held to @c queue. If @c queue is deallocated, then the idling resource will deregister itself from the UI thread executor.

    Declaration

    Objective-C

    + (instancetype)resourceWithDispatchQueue:(dispatch_queue_t)queue
                                         name:(NSString *)name;

    Swift

    convenience init!(dispatchQueue queue: Any!, name: Any!)

    Parameters

    queue

    The dispatch queue that will be tracked by the resource.

    name

    A descriptive name for the idling resource.

    Return Value

    An idling resource backed by the specified dispatch queue.

  • @remark init is not an available initializer. Use the other initializers.

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()