Helpers
Some types and extensions to standard types that may be useful in applications that use the SDK.
-
Declaration
Swift
extension AnyCancellable
-
Declaration
Swift
extension Array
-
A value that represents a mutable operation on an array.
An array is frequently used to represent the data displayed by a
UITableViewController
or aUICollectionViewController
. When the array is updated, the view displayed must be updated accordingly, This type is designed to simplify this update, and even better to animate this update.This type does not store the array itself.
Instances of this type are returned by the following methods:
Array.updateOperation(for:)
Array.updateOrInsert(_:areSame:areEqual:isBefore:)
and its overloadsArray.remove(_:areSame:)
and its overloadArray.removeFirst(where:)
Array.removeAllReturningOperation(where:)
Array.removeAllReturningOperation()
Declaration
Swift
public struct ArrayOperation : Equatable
-
Declaration
Swift
extension Error
-
An instance that facilitate the writing of a
UNNotificationServiceExtension
extension.This instance :
- stores the notification request and the content handler from the
didReceive(_:withContentHandler:)
method, - manages a counter of running asynchronous tasks started by that method.
It is designed to deliver the possibly modified notification to the user when:
- there is no more running asynchronous tasks,
- or the system is about to terminate the extension.
In order to do that:
- The
didReceive(_:withContentHandler:)
method should callNotificationServiceManager.wait()
or each asynchronous task it starts. - Asynchronous tasks should call
NotificationServiceManager.notify()
when they terminate. - The
didReceive(_:withContentHandler:)
should callNotificationServiceManager.complete(forces:)
method withfalse
argument before returning. - The
serviceExtensionTimeWillExpire()
method should call theNotificationServiceManager.complete(forces:)
method withtrue
argument to force the delivery of the notification.
This class is thread-safe.
See moreDeclaration
Swift
public final class NotificationServiceManager : CustomDebugStringConvertible
- stores the notification request and the content handler from the
-
Declaration
Swift
extension NSRegularExpression
-
Declaration
Swift
extension Result
extension Result: @retroactive CustomStringConvertible where Success == Void, Failure == WebcomError
-
A value that is its own identifier.
Declaration
Swift
public protocol SelfIdentifiable : Hashable, Identifiable where Self == Self.ID
-
Declaration
Swift
extension String