Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.
Functions and constants
get · iOS 13.0+receiveCompletion
TypeScriptget receiveCompletion(): (((arg0: Subscribers_Completion<SDKHandle>) => Promise<boolean>)) | null
Swift declarationlet receiveCompletion: ((Subscribers.Completion<Publishers.Breakpoint<Upstream>.Failure>) -> Bool)?
A closure that executes when the publisher receives completion, and can raise a debugger signal by returning a true Boolean value.
get · iOS 13.0+receiveSubscription
TypeScriptget receiveSubscription(): (((arg0: SDKHandle) => Promise<boolean>)) | null
Swift declarationlet receiveSubscription: ((any Subscription) -> Bool)?
A closure that executes when the publisher receives a subscription, and can raise a debugger signal by returning a true Boolean value.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.FirstWhere<Upstream>.Output) -> Bool
The closure that determines whether to publish an element.
init · iOS 13.0+init
TypeScriptstatic init(upstream: _Foundation_Timer_TimerPublisher): Publishers_Autoconnect<_Foundation_Timer_TimerPublisher>
Swift declarationinit(upstream: Upstream)
Creates a publisher that automatically connects to an upstream connectable publisher.
- Parameter upstream: The publisher from which this publisher receives elements.
get · iOS 13.0+upstream
TypeScriptget upstream(): _Foundation_Timer_TimerPublisher
Swift declarationfinal let upstream: Upstream
The publisher from which this publisher receives elements.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.PrefixWhile<Upstream>.Output) -> Bool
The closure that determines whether publishing should continue.
get · iOS 13.0+receiveCancel
TypeScriptget receiveCancel(): ((() => Promise<void>)) | null
Swift declarationvar receiveCancel: (() -> Void)?
A closure that executes when the downstream receiver cancels publishing.
set · iOS 13.0+receiveCancel
TypeScriptset receiveCancel(value: ((() => void)) | null)
Swift declarationvar receiveCancel: (() -> Void)?
A closure that executes when the downstream receiver cancels publishing.
get · iOS 13.0+receiveOutput
TypeScriptget receiveOutput(): (((arg0: SDKHandle) => Promise<void>)) | null
Swift declarationvar receiveOutput: ((Publishers.HandleEvents<Upstream>.Output) -> Void)?
A closure that executes when the publisher receives a value from the upstream publisher.
set · iOS 13.0+receiveOutput
TypeScriptset receiveOutput(value: (((arg0: SDKHandle) => void)) | null)
Swift declarationvar receiveOutput: ((Publishers.HandleEvents<Upstream>.Output) -> Void)?
A closure that executes when the publisher receives a value from the upstream publisher.
get · iOS 13.0+receiveRequest
TypeScriptget receiveRequest(): (((arg0: Subscribers_Demand) => Promise<void>)) | null
Swift declarationvar receiveRequest: ((Subscribers.Demand) -> Void)?
A closure that executes when the publisher receives a request for more elements.
set · iOS 13.0+receiveRequest
TypeScriptset receiveRequest(value: (((arg0: Subscribers_Demand) => void)) | null)
Swift declarationvar receiveRequest: ((Subscribers.Demand) -> Void)?
A closure that executes when the publisher receives a request for more elements.
get · iOS 13.0+receiveCompletion
TypeScriptget receiveCompletion(): (((arg0: Subscribers_Completion<SDKHandle>) => Promise<void>)) | null
Swift declarationvar receiveCompletion: ((Subscribers.Completion<Publishers.HandleEvents<Upstream>.Failure>) -> Void)?
A closure that executes when the upstream publisher finishes normally or terminates with an error.
set · iOS 13.0+receiveCompletion
TypeScriptset receiveCompletion(value: (((arg0: Subscribers_Completion<SDKHandle>) => void)) | null)
Swift declarationvar receiveCompletion: ((Subscribers.Completion<Publishers.HandleEvents<Upstream>.Failure>) -> Void)?
A closure that executes when the upstream publisher finishes normally or terminates with an error.
get · iOS 13.0+receiveSubscription
TypeScriptget receiveSubscription(): (((arg0: SDKHandle) => Promise<void>)) | null
Swift declarationvar receiveSubscription: ((any Subscription) -> Void)?
A closure that executes when the publisher receives the subscription from the upstream publisher.
set · iOS 13.0+receiveSubscription
TypeScriptset receiveSubscription(value: (((arg0: SDKHandle) => void)) | null)
Swift declarationvar receiveSubscription: ((any Subscription) -> Void)?
A closure that executes when the publisher receives the subscription from the upstream publisher.
get · iOS 13.0+output
TypeScriptget output(): SDKHandle
Swift declarationlet output: Publishers.ReplaceEmpty<Upstream>.Output
The element to deliver when the upstream publisher finishes without delivering any elements.
get · iOS 13.0+output
TypeScriptget output(): SDKHandle
Swift declarationlet output: Publishers.ReplaceError<Upstream>.Output
The element with which to replace errors from the upstream publisher.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.TryDropWhile<Upstream>.Output) throws -> Bool
The error-throwing closure that indicates whether to drop the element.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.TryLastWhere<Upstream>.Output) throws -> Bool
The error-throwing closure that determines whether to publish an element.
get · iOS 13.0+strategy
TypeScriptget strategy(): Publishers_TimeGroupingStrategy<SDKHandle>
Swift declarationlet strategy: Publishers.TimeGroupingStrategy<Context>
The strategy with which to collect and publish elements.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.TryFirstWhere<Upstream>.Output) throws -> Bool
The error-throwing closure that determines whether to publish an element.
get · iOS 13.0+count
TypeScriptget count(): number
Swift declarationlet count: Int
The maximum number of received elements to buffer before publishing.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.TryPrefixWhile<Upstream>.Output) throws -> Bool
The error-throwing closure that determines whether publishing should continue.
get · iOS 13.0+file
TypeScriptget file(): SDKHandle
Swift declarationlet file: StaticString
The filename used in the error message.
get · iOS 13.0+line
TypeScriptget line(): number
Swift declarationlet line: UInt
The line number used in the error message.
get · iOS 13.0+prefix
TypeScriptget prefix(): string
Swift declarationlet prefix: String
The string used at the beginning of the fatal error message.
method · iOS 13.0+connect
TypeScriptconnect(): SDKHandle
Swift declarationfunc connect() -> any Cancellable
Connects to the publisher, allowing it to produce elements, and returns an instance with which to cancel publishing.
- Returns: A ``Cancellable`` instance that you use to cancel publishing.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle, arg1: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.RemoveDuplicates<Upstream>.Output, Publishers.RemoveDuplicates<Upstream>.Output) -> Bool
The predicate closure used to evaluate whether two elements are duplicates.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle, arg1: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.TryRemoveDuplicates<Upstream>.Output, Publishers.TryRemoveDuplicates<Upstream>.Output) throws -> Bool
An error-throwing closure to evaluate whether two elements are equivalent, for purposes of filtering.
get · iOS 13.0+count
TypeScriptget count(): number
Swift declarationlet count: Int
The number of elements to drop.
get · iOS 13.0+initialResult
TypeScriptget initialResult(): unknown
Swift declarationlet initialResult: Output
The previous result returned by the `nextPartialResult` closure.
get · iOS 13.0+prefix
TypeScriptget prefix(): string
Swift declarationlet prefix: String
A string with which to prefix all log messages.
get · iOS 13.0+stream
TypeScriptget stream(): (SDKHandle) | null
Swift declarationlet stream: (any TextOutputStream)?
get · iOS 13.0+retries
TypeScriptget retries(): (number) | null
Swift declarationlet retries: Int?
The maximum number of retry attempts to perform.
If `nil`, this publisher attempts to reconnect with the upstream publisher an unlimited number of times.
get · iOS 13.0+size
TypeScriptget size(): number
Swift declarationlet size: Int
The maximum number of elements to store.
get · iOS 13.0+prefetch
TypeScriptget prefetch(): Publishers_PrefetchStrategy
Swift declarationlet prefetch: Publishers.PrefetchStrategy
The strategy for initially populating the buffer.
get · iOS 13.0+whenFull
TypeScriptget whenFull(): Publishers_BufferingStrategy<SDKHandle>
Swift declarationlet whenFull: Publishers.BufferingStrategy<Publishers.Buffer<Upstream>.Failure>
The action to take when the buffer becomes full.
get · iOS 13.0+range
TypeScriptget range(): SDKHandle
Swift declarationlet range: CountableRange<Int>
The range of elements to publish.
get · iOS 13.0+initial
TypeScriptget initial(): unknown
Swift declarationlet initial: Output
The initial value provided on the first invocation of the closure.
get · iOS 13.0+maxPublishers
TypeScriptget maxPublishers(): Subscribers_Demand
Swift declarationlet maxPublishers: Subscribers.Demand
The maximum number of concurrent publisher subscriptions
get · iOS 13.0+customError
TypeScriptget customError(): ((() => Promise<SDKHandle>)) | null
Swift declarationlet customError: (() -> Publishers.Timeout<Upstream, Context>.Failure)?
A closure that executes if the publisher times out. The publisher sends the failure returned by this closure to the subscriber as the reason for termination.
get · iOS 13.0+initialResult
TypeScriptget initialResult(): unknown
Swift declarationlet initialResult: Output
The previous result returned by the `nextPartialResult` closure.
get · iOS 13.0+output
TypeScriptget output(): number
Swift declarationlet output: Upstream.Output
The element to match in the upstream publisher.
method · iOS 13.0+tryContains
TypeScripttryContains(predicate: ((arg0: SDKHandle) => boolean)): Result_Publisher<boolean, NativeError>
Swift declarationfunc tryContains(where predicate: (Publishers.Sequence<Elements, Failure>.Output) throws -> Bool) -> Result<Bool, any Error>.Publisher
method · iOS 13.0+ignoreOutput
TypeScriptignoreOutput(): Empty<SDKHandle, NativeError>
Swift declarationfunc ignoreOutput() -> Empty<Publishers.Sequence<Elements, Failure>.Output, Failure>
method · iOS 13.0+tryAllSatisfy
TypeScripttryAllSatisfy(predicate: ((arg0: SDKHandle) => boolean)): Result_Publisher<boolean, NativeError>
Swift declarationfunc tryAllSatisfy(_ predicate: (Publishers.Sequence<Elements, Failure>.Output) throws -> Bool) -> Result<Bool, any Error>.Publisher
method · iOS 13.0+prefix
TypeScriptprefix(maxLength: number): Publishers_Sequence<SDKHandle, NativeError>
Swift declarationfunc prefix(_ maxLength: Int) -> Publishers.Sequence<PrefixSequence<Elements>, Failure>
method · iOS 13.0+collect
TypeScriptcollect(): Result_Publisher<Array<SDKHandle>, NativeError>
Swift declarationfunc collect() -> Result<[Publishers.Sequence<Elements, Failure>.Output], Failure>.Publisher
method · iOS 13.0+dropFirst
TypeScriptdropFirst(count?: number): Publishers_Sequence<SDKHandle, NativeError>
Swift declarationfunc dropFirst(_ count: Int = 1) -> Publishers.Sequence<DropFirstSequence<Elements>, Failure>
method · iOS 13.0+removeDuplicates
TypeScriptremoveDuplicates(): Publishers_Sequence<Array<number>, NativeError>
Swift declarationfunc removeDuplicates() -> Publishers.Sequence<[Publishers.Sequence<Elements, Failure>.Output], Failure>
method · iOS 13.0+contains
TypeScriptcontains(output: number): Result_Publisher<boolean, NativeError>
Swift declarationfunc contains(_ output: Elements.Element) -> Result<Bool, Failure>.Publisher
get · iOS 13.0+latest
TypeScriptget latest(): boolean
Swift declarationlet latest: Bool
A Boolean value indicating whether to publish the most recent element.
If `false`, the publisher emits the first element received during the interval.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.DropWhile<Upstream>.Output) -> Bool
The closure that indicates whether to drop the element.
get · iOS 13.0+predicate
TypeScriptget predicate(): ((arg0: SDKHandle) => Promise<boolean>)
Swift declarationlet predicate: (Publishers.LastWhere<Upstream>.Output) -> Bool
The closure that determines whether to publish an element.
method · iOS 13.0+connect
TypeScriptconnect(): SDKHandle
Swift declarationfinal func connect() -> any Cancellable
Connects to the publisher, allowing it to produce elements, and returns an instance with which to cancel publishing.
- Returns: A ``Cancellable`` instance that you use to cancel publishing.
get · iOS 13.0+initial
TypeScriptget initial(): unknown
Swift declarationlet initial: Output
The initial value provided on the first-use of the closure.
get · iOS 13.0+description
TypeScriptget description(): string
Swift declarationfinal var description: String { get }
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
get · iOS 13.0+customMirror
TypeScriptget customMirror(): SDKHandle
Swift declarationfinal var customMirror: Mirror { get }
The custom mirror for this instance.
If this type has value semantics, the mirror should be unaffected by
subsequent mutations of the instance.
get · iOS 13.0+receiveValue
TypeScriptget receiveValue(): ((arg0: unknown) => Promise<void>)
Swift declarationfinal var receiveValue: (Input) -> Void { get }
The closure to execute on receipt of a value.
init · iOS 13.0+init
TypeScriptstatic init(receiveCompletion: ((arg0: Subscribers_Completion<NativeError>) => void), receiveValue: ((arg0: unknown) => void)): Subscribers_Sink<unknown, NativeError>
Swift declarationinit(receiveCompletion: @escaping (Subscribers.Completion<Failure>) -> Void, receiveValue: @escaping (Input) -> Void)
Initializes a sink with the provided closures.
- Parameters:
- receiveCompletion: The closure to execute on completion.
- receiveValue: The closure to execute on receipt of a value.
get · iOS 13.0+receiveCompletion
TypeScriptget receiveCompletion(): ((arg0: Subscribers_Completion<NativeError>) => Promise<void>)
Swift declarationfinal var receiveCompletion: (Subscribers.Completion<Failure>) -> Void { get }
The closure to execute on completion.
get · iOS 13.0+playgroundDescription
TypeScriptget playgroundDescription(): unknown
Swift declarationfinal var playgroundDescription: Any { get }
A custom playground description for this instance.
method · iOS 13.0+cancel
TypeScriptcancel(): void
Swift declarationfinal func cancel()
Cancel the activity.
When implementing ``Cancellable`` in support of a custom publisher, implement `cancel()` to request that your publisher stop calling its downstream subscribers. Combine doesn't require that the publisher stop immediately, but the `cancel()` call should take effect quickly. Canceling should also eliminate any strong references it currently holds.
After you receive one call to `cancel()`, subsequent calls shouldn't do anything. Additionally, your implementation must be thread-safe, and it shouldn't block the caller.
> Tip: Keep in mind that your `cancel()` may execute concurrently with another call to `cancel()` --- including the scenario where an ``AnyCancellable`` is deallocating --- or to ``Subscription/request(_:)``.
method · iOS 13.0+receive
TypeScriptreceiveCompletion88476(completion: Subscribers_Completion<NativeError>): void
Swift declarationfinal func receive(completion: Subscribers.Completion<Failure>)
Tells the subscriber that the publisher has completed publishing, either normally or with an error.
- Parameter completion: A ``Subscribers/Completion`` case indicating whether publishing completed normally or with an error.
method · iOS 13.0+receive
TypeScriptreceiveSubscription(subscription: SDKHandle): void
Swift declarationfinal func receive(subscription: any Subscription)
Tells the subscriber that it has successfully subscribed to the publisher and may request items.
Use the received ``Subscription`` to request items from the publisher.
- Parameter subscription: A subscription that represents the connection between publisher and subscriber.
method · iOS 13.0+receive
TypeScriptreceive(value: unknown): Subscribers_Demand
Swift declarationfinal func receive(_ value: Input) -> Subscribers.Demand
Tells the subscriber that the publisher has produced an element.
- Parameter input: The published element.
- Returns: A `Subscribers.Demand` instance indicating how many more elements the subscriber expects to receive.
get · iOS 13.0+description
TypeScriptget description(): string
Swift declarationfinal var description: String { get }
A textual representation of this subscriber.
get · iOS 13.0+customMirror
TypeScriptget customMirror(): SDKHandle
Swift declarationfinal var customMirror: Mirror { get }
A mirror that reflects the subscriber.
get · iOS 13.0+playgroundDescription
TypeScriptget playgroundDescription(): unknown
Swift declarationfinal var playgroundDescription: Any { get }
A custom playground description for this subscriber.
method · iOS 13.0+cancel
TypeScriptcancel(): void
Swift declarationfinal func cancel()
Cancel the activity.
init · iOS 13.0+init
TypeScriptstatic init(object: unknown, keyPath: SDKHandle): Subscribers_Assign<unknown, unknown>
Swift declarationinit(object: Root, keyPath: ReferenceWritableKeyPath<Root, Input>)
Creates a subscriber to assign the value of a property indicated by a key path.
- Parameters:
- object: The object that contains the property. The subscriber assigns the object’s property every time it receives a new value.
- keyPath: A key path that indicates the property to assign. See [Key-Path Expression](https://developer.apple.com/library/archive/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/doc/uid/TP40014097-CH32-ID563) in _The Swift Programming Language_ to learn how to use key paths to specify a property of an object.
get · iOS 13.0+object
TypeScriptget object(): (unknown) | null
Swift declarationfinal var object: Root? { get }
The object that contains the property to assign.
The subscriber holds a strong reference to this object until the upstream publisher calls ``Subscriber/receive(completion:)``, at which point the subscriber sets this property to `nil`.
get · iOS 13.0+keyPath
TypeScriptget keyPath(): SDKHandle
Swift declarationfinal let keyPath: ReferenceWritableKeyPath<Root, Input>
The key path that indicates the property to assign.
method · iOS 13.0+receive
TypeScriptreceiveCompletion(completion: Subscribers_Completion<never>): void
Swift declarationfinal func receive(completion: Subscribers.Completion<Never>)
Tells the subscriber that the publisher has completed publishing, either normally or with an error.
- Parameter completion: A ``Subscribers/Completion`` case indicating whether publishing completed normally or with an error.
method · iOS 13.0+receive
TypeScriptreceiveSubscription(subscription: SDKHandle): void
Swift declarationfinal func receive(subscription: any Subscription)
Tells the subscriber that it has successfully subscribed to the publisher and may request items.
Use the received ``Subscription`` to request items from the publisher.
- Parameter subscription: A subscription that represents the connection between publisher and subscriber.
method · iOS 13.0+receive
TypeScriptreceive(value: unknown): Subscribers_Demand
Swift declarationfinal func receive(_ value: Input) -> Subscribers.Demand
Tells the subscriber that the publisher has produced an element.
A ``Subscribers/Demand`` instance indicating how many more elements the subscriber expects to receive.
- Parameter input: The published element.
get · iOS 13.0+description
TypeScriptget description(): string
Swift declarationvar description: String { get }
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
get · iOS 13.0+playgroundDescription
TypeScriptget playgroundDescription(): unknown
Swift declarationvar playgroundDescription: Any { get }
A custom playground description for this instance.
get · iOS 13.0+description
TypeScriptget description(): string
Swift declarationvar description: String { get }
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
get · iOS 13.0+customMirror
TypeScriptget customMirror(): SDKHandle
Swift declarationvar customMirror: Mirror { get }
The custom mirror for this instance.
If this type has value semantics, the mirror should be unaffected by
subsequent mutations of the instance.
get · iOS 13.0+combineIdentifier
TypeScriptget combineIdentifier(): CombineIdentifier
Swift declarationlet combineIdentifier: CombineIdentifier
A unique identifier for identifying publisher streams.
init · iOS 13.0+init
TypeScriptstatic init(receiveSubscription?: (((arg0: SDKHandle) => void)) | null, receiveCompletion?: (((arg0: Subscribers_Completion<NativeError>) => void)) | null): AnySubscriber<unknown, NativeError>
Swift declarationinit(receiveSubscription: ((any Subscription) -> Void)? = nil, receiveValue: ((Input) -> Subscribers.Demand)? = nil, receiveCompletion: ((Subscribers.Completion<Failure>) -> Void)? = nil)
Creates a type-erasing subscriber that executes the provided closures.
- Parameters:
- receiveSubscription: A closure to execute when the subscriber receives the initial subscription from the publisher.
- receiveValue: A closure to execute when the subscriber receives a value from the publisher.
- receiveCompletion: A closure to execute when the subscriber receives a completion callback from the publisher.
get · iOS 13.0+playgroundDescription
TypeScriptget playgroundDescription(): unknown
Swift declarationvar playgroundDescription: Any { get }
A custom playground description for this instance.
method · iOS 13.0+receive
TypeScriptreceiveCompletion(completion: Subscribers_Completion<NativeError>): void
Swift declarationfunc receive(completion: Subscribers.Completion<Failure>)
Tells the subscriber that the publisher has completed publishing, either normally or with an error.
- Parameter completion: A ``Subscribers/Completion`` case indicating whether publishing completed normally or with an error.
method · iOS 13.0+receive
TypeScriptreceiveSubscription(subscription: SDKHandle): void
Swift declarationfunc receive(subscription: any Subscription)
Tells the subscriber that it has successfully subscribed to the publisher and may request items.
Use the received ``Subscription`` to request items from the publisher.
- Parameter subscription: A subscription that represents the connection between publisher and subscriber.
method · iOS 13.0+receive
TypeScriptreceive(value: unknown): Subscribers_Demand
Swift declarationfunc receive(_ value: Input) -> Subscribers.Demand
Tells the subscriber that the publisher has produced an element.
- Parameter input: The published element.
- Returns: A `Subscribers.Demand` instance indicating how many more elements the subscriber expects to receive.
method · iOS 15.0+makeAsyncIterator
TypeScriptmakeAsyncIterator(): AsyncPublisher_Iterator<SDKHandle>
Swift declarationfunc makeAsyncIterator() -> AsyncPublisher<P>.Iterator
Creates the asynchronous iterator that produces elements of this asynchronous sequence.
- Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.
method · iOS 13.0+send
TypeScriptsendCompletion(completion: Subscribers_Completion<NativeError>): void
Swift declarationfinal func send(completion: Subscribers.Completion<Failure>)
Sends a completion signal to the subscriber.
- Parameter completion: A `Completion` instance which indicates whether publishing has finished normally or failed with an error.
method · iOS 13.0+send
TypeScriptsendSubscription(subscription: SDKHandle): void
Swift declarationfinal func send(subscription: any Subscription)
Sends a subscription to the subscriber.
This call provides the ``Subject`` an opportunity to establish demand for any new upstream subscriptions.
- Parameter subscription: The subscription instance through which the subscriber can request elements.
method · iOS 13.0+send
TypeScriptsend(input: unknown): void
Swift declarationfinal func send(_ input: Output)
Sends a value to the subscriber.
- Parameter value: The value to send.
init · iOS 13.0+init
TypeScriptstatic init(): PassthroughSubject<unknown, NativeError>
Swift declarationinit()
method · iOS 13.0+send
TypeScriptsendCompletion(completion: Subscribers_Completion<NativeError>): void
Swift declarationfinal func send(completion: Subscribers.Completion<Failure>)
Sends a completion signal to the subscriber.
- Parameter completion: A `Completion` instance which indicates whether publishing has finished normally or failed with an error.
method · iOS 13.0+send
TypeScriptsendSubscription(subscription: SDKHandle): void
Swift declarationfinal func send(subscription: any Subscription)
Sends a subscription to the subscriber.
This call provides the ``Subject`` an opportunity to establish demand for any new upstream subscriptions.
- Parameter subscription: The subscription instance through which the subscriber can request elements.
method · iOS 13.0+send
TypeScriptsend(input: unknown): void
Swift declarationfinal func send(_ input: Output)
Sends a value to the subscriber.
- Parameter value: The value to send.
get · iOS 13.0+value
TypeScriptget value(): unknown
Swift declarationfinal var value: Output { get set }
The value wrapped by this subject, published as a new element whenever it changes.
set · iOS 13.0+value
TypeScriptset value(value: unknown)
Swift declarationfinal var value: Output { get set }
The value wrapped by this subject, published as a new element whenever it changes.
init · iOS 13.0+init
TypeScriptstatic init(value: unknown): CurrentValueSubject<unknown, NativeError>
Swift declarationinit(_ value: Output)
Creates a current value subject with the given initial value.
- Parameter value: The initial value to publish.
method · iOS 15.0+makeAsyncIterator
TypeScriptmakeAsyncIterator(): AsyncThrowingPublisher_Iterator<SDKHandle>
Swift declarationfunc makeAsyncIterator() -> AsyncThrowingPublisher<P>.Iterator
Creates the asynchronous iterator that produces elements of this asynchronous sequence.
- Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.
init · iOS 13.0+init
TypeScriptstatic init(error: NativeError): Fail<unknown, NativeError>
Swift declarationinit(error: Failure)
Creates a publisher that immediately terminates with the specified failure.
- Parameter error: The failure to send when terminating the publisher.
get · iOS 13.0+error
TypeScriptget error(): NativeError
Swift declarationlet error: Failure
The failure to send when terminating the publisher.
method · iOS 13.0+tryContains
TypeScripttryContains(predicate: ((arg0: unknown) => boolean)): Result_Publisher<boolean, NativeError>
Swift declarationfunc tryContains(where predicate: (Output) throws -> Bool) -> Result<Bool, any Error>.Publisher
method · iOS 13.0+ignoreOutput
TypeScriptignoreOutput(): Empty<unknown, never>
Swift declarationfunc ignoreOutput() -> Empty<Output, Just<Output>.Failure>
method · iOS 13.0+replaceEmpty
TypeScriptreplaceEmpty(output: unknown): Just<unknown>
Swift declarationfunc replaceEmpty(with output: Output) -> Just<Output>
method · iOS 13.0+replaceError
TypeScriptreplaceError(output: unknown): Just<unknown>
Swift declarationfunc replaceError(with output: Output) -> Just<Output>
method · iOS 13.0+tryAllSatisfy
TypeScripttryAllSatisfy(predicate: ((arg0: unknown) => boolean)): Result_Publisher<boolean, NativeError>
Swift declarationfunc tryAllSatisfy(_ predicate: (Output) throws -> Bool) -> Result<Bool, any Error>.Publisher
method · iOS 13.0+tryRemoveDuplicates
TypeScripttryRemoveDuplicates(predicate: ((arg0: unknown, arg1: unknown) => boolean)): Result_Publisher<unknown, NativeError>
Swift declarationfunc tryRemoveDuplicates(by predicate: (Output, Output) throws -> Bool) -> Result<Output, any Error>.Publisher
method · iOS 13.0+last
TypeScriptlast(): Just<unknown>
Swift declarationfunc last() -> Just<Output>
method · iOS 13.0+count
TypeScriptcount(): Just<number>
Swift declarationfunc count() -> Just<Int>
method · iOS 13.0+first
TypeScriptfirst(): Just<unknown>
Swift declarationfunc first() -> Just<Output>
method · iOS 13.0+retry
TypeScriptretry(times: number): Just<unknown>
Swift declarationfunc retry(_ times: Int) -> Just<Output>
method · iOS 13.0+output
TypeScriptoutputAt(index: number): Optional_Publisher<unknown>
Swift declarationfunc output(at index: Int) -> Optional<Output>.Publisher
method · iOS 13.0+output
TypeScriptoutputIn(range: SDKHandle): Optional_Publisher<unknown>
Swift declarationfunc output<R>(in range: R) -> Optional<Output>.Publisher where R : RangeExpression, R.Bound == Int
get · iOS 13.0+output
TypeScriptget output(): unknown
Swift declarationlet output: Output
The one element that the publisher emits.
method · iOS 13.0+prefix
TypeScriptprefix(maxLength: number): Optional_Publisher<unknown>
Swift declarationfunc prefix(_ maxLength: Int) -> Optional<Output>.Publisher
method · iOS 13.0+tryMap
TypeScripttryMap(transform: ((arg0: unknown) => unknown)): Result_Publisher<unknown, NativeError>
Swift declarationfunc tryMap<T>(_ transform: (Output) throws -> T) -> Result<T, any Error>.Publisher
method · iOS 13.0+collect
TypeScriptcollect(): Just<Array<unknown>>
Swift declarationfunc collect() -> Just<[Output]>
method · iOS 13.0+tryScan
TypeScripttryScan(initialResult: unknown, nextPartialResult: ((arg0: unknown, arg1: unknown) => unknown)): Result_Publisher<unknown, NativeError>
Swift declarationfunc tryScan<T>(_ initialResult: T, _ nextPartialResult: (T, Output) throws -> T) -> Result<T, any Error>.Publisher
method · iOS 13.0+dropFirst
TypeScriptdropFirst(count?: number): Optional_Publisher<unknown>
Swift declarationfunc dropFirst(_ count: Int = 1) -> Optional<Output>.Publisher
method · iOS 13.0+tryReduce
TypeScripttryReduce(initialResult: unknown, nextPartialResult: ((arg0: unknown, arg1: unknown) => unknown)): Result_Publisher<unknown, NativeError>
Swift declarationfunc tryReduce<T>(_ initialResult: T, _ nextPartialResult: (T, Output) throws -> T) -> Result<T, any Error>.Publisher
method · iOS 13.0+removeDuplicates
TypeScriptremoveDuplicates(): Just<number>
Swift declarationfunc removeDuplicates() -> Just<Output>
method · iOS 13.0+contains
TypeScriptcontains(output: number): Just<boolean>
Swift declarationfunc contains(_ output: Output) -> Just<Bool>
init · iOS 13.0+init
TypeScriptstatic init(output: unknown): Just<unknown>
Swift declarationinit(_ output: Output)
Initializes a publisher that emits the specified output just once.
- Parameter output: The one element that the publisher emits.
init · iOS 13.0+init
TypeScriptstatic init(completeImmediately?: boolean): Empty<unknown, NativeError>
Swift declarationinit(completeImmediately: Bool = true)
Creates an empty publisher.
- Parameter completeImmediately: A Boolean value that indicates whether the publisher should immediately finish.
get · iOS 13.0+completeImmediately
TypeScriptget completeImmediately(): boolean
Swift declarationlet completeImmediately: Bool
A Boolean value that indicates whether the publisher immediately sends a completion.
If `true`, the publisher finishes immediately after sending a subscription to the subscriber. If `false`, it never completes.
get · iOS 15.0+value
TypeScriptget value(): Promise<unknown>
Swift declarationfinal var value: Output { get async throws }
The published value of the future or an error, delivered asynchronously.
This property subscribes to the `Future` and delivers the value asynchronously when the `Future` publishes it. If the `Future` terminates with an error, the awaiting caller receives the error instead. Use this property when you want to the `async`-`await` syntax with a `Future` whose ``Publisher/Failure`` type is not <doc://com.apple.documentation/documentation/Swift/Never>.
get · iOS 15.0+value
TypeScriptget value70286(): Promise<unknown>
Swift declarationfinal var value: Output { get async }
The published value of the future, delivered asynchronously.
This property subscribes to the `Future` and delivers the value asynchronously when the `Future` publishes it. Use this property when you want to use the `async`-`await` syntax with a `Future`.
init · iOS 13.0+init
TypeScriptstatic init(attemptToFulfill: ((arg0: ((arg0: SDKHandle) => Promise<void>)) => void)): Future<unknown, NativeError>
Swift declarationinit(_ attemptToFulfill: @escaping (@escaping Future<Output, Failure>.Promise) -> Void)
Creates a publisher that invokes a promise closure when the publisher emits an element.
- Parameter attemptToFulfill: A ``Future/Promise`` that the publisher invokes when the publisher emits an element or terminates with an error.
init · iOS 13.0+init
TypeScriptstatic initOutputCompletion(output: Array<unknown>, completion: Subscribers_Completion<NativeError>): Record<unknown, NativeError>
Swift declarationinit(output: [Output], completion: Subscribers.Completion<Failure>)
Creates a record publisher to publish the provided elements, followed by the provided completion value.
- Parameters:
- output: An array of output elements to publish.
- completion: The completion value with which to end publishing.
init · iOS 13.0+init
TypeScriptstatic initRecord(record: ((arg0: Record_Recording<unknown, NativeError>) => void)): Record<unknown, NativeError>
Swift declarationinit(record: (inout Record<Output, Failure>.Recording) -> Void)
Creates a publisher to interactively record a series of outputs and a completion.
- Parameter record: A recording instance that can be retrieved after completion to create new record publishers to replay the recording.
get · iOS 13.0+completion
TypeScriptget completion(): Subscribers_Completion<NativeError>
Swift declarationvar completion: Subscribers.Completion<Failure> { get }
The completion which will be sent to a `Subscriber`.
init · iOS 13.0+init
TypeScriptstatic initOutputCompletion(output: Array<unknown>, completion?: Subscribers_Completion<NativeError>): Record_Recording<unknown, NativeError>
Swift declarationinit(output: [Output], completion: Subscribers.Completion<Failure> = .finished)
Set up a complete recording with the specified output and completion.
get · iOS 13.0+output
TypeScriptget output(): Array<unknown>
Swift declarationvar output: [Output] { get }
The output which will be sent to a `Subscriber`.
method · iOS 13.0+receive
TypeScriptreceiveCompletion(completion: Subscribers_Completion<NativeError>): void
Swift declarationmutating func receive(completion: Subscribers.Completion<Failure>)
Add a completion to the recording.
A `fatalError` will be raised if more than one completion is added.
method · iOS 13.0+receive
TypeScriptreceive(input: unknown): void
Swift declarationmutating func receive(_ input: Record<Output, Failure>.Recording.Input)
Add an output to the recording.
A `fatalError` will be raised if output is added after adding completion.
init · iOS 13.0+init
TypeScriptstatic init(): Record_Recording<unknown, NativeError>
Swift declarationinit()
Set up a recording in a state ready to receive output.
get · iOS 13.0+recording
TypeScriptget recording(): Record_Recording<unknown, NativeError>
Swift declarationlet recording: Record<Output, Failure>.Recording
The recorded output and completion.
init · iOS 13.0+init
TypeScriptstatic initRecording(recording: Record_Recording<unknown, NativeError>): Record<unknown, NativeError>
Swift declarationinit(recording: Record<Output, Failure>.Recording)
Creates a record publisher from an existing recording.
- Parameter recording: A previously-recorded recording of published elements and a completion.
init · iOS 13.0+init
TypeScriptstatic initInitialValue(initialValue: unknown): Published<unknown>
Swift declarationinit(initialValue: Value)
Creates the published instance with an initial value.
Don't use this initializer directly. Instead, create a property with the `@Published` attribute, as shown here:
@Published var lastUpdated: Date = Date()
- Parameter initialValue: The publisher's initial value.
init · iOS 13.0+init
TypeScriptstatic initWrappedValue(wrappedValue: unknown): Published<unknown>
Swift declarationinit(wrappedValue: Value)
Creates the published instance with an initial wrapped value.
Don't use this initializer directly. Instead, create a property with the `@Published` attribute, as shown here:
@Published var lastUpdated: Date = Date()
- Parameter wrappedValue: The publisher's initial value.
set · iOS 13.0+projectedValue
TypeScriptset projectedValue(value: Published_Publisher<unknown>)
Swift declarationvar projectedValue: Published<Value>.Publisher { mutating get set }
The property for which this instance exposes a publisher.
The ``Published/projectedValue`` is the property accessed with the `$` operator.