From e3ca57980afa18ea7f5465a95d77d1fe7928aa65 Mon Sep 17 00:00:00 2001 From: majk Date: Mon, 31 Aug 2026 10:58:26 +0200 Subject: [PATCH] Strip trailing whitespace from packages/ios-client `yarn lint:check` runs `swift-format lint -s`, where TrailingWhitespace is an error, and 26 lines across four files trip it. This is what the workspace's own `yarn lint` (`swift-format format -i`) produces, and the change is whitespace-only - `git diff -w` is empty. The failure is on main, so it currently fails the all_packages_lint job on every open pull request. `examples/ios` is unaffected because the ios_lint workflow runs the formatter before linting, so it fixes itself in the runner. Co-Authored-By: Claude Opus 5 (1M context) --- .../BroadcastScreenShareCapturer.swift | 2 +- .../Sources/ios-client/ClientBase.swift | 16 ++++++++-------- .../Sources/ios-client/WhepClient.swift | 16 ++++++++-------- .../Sources/ios-client/WhipClient.swift | 18 +++++++++--------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/ios-client/Sources/ios-client/Capturers/BroadcastScreenShareCapturer.swift b/packages/ios-client/Sources/ios-client/Capturers/BroadcastScreenShareCapturer.swift index a433af44..43ed85dd 100644 --- a/packages/ios-client/Sources/ios-client/Capturers/BroadcastScreenShareCapturer.swift +++ b/packages/ios-client/Sources/ios-client/Capturers/BroadcastScreenShareCapturer.swift @@ -97,7 +97,7 @@ class BroadcastScreenShareCapturer: RTCVideoCapturer { /** Creates a broadcast screen capturer. - + - Parameters: - source: `RTCVideoSource` that will receive incoming video buffers - appGroup: App Group that will be used for starting an `IPCServer` on diff --git a/packages/ios-client/Sources/ios-client/ClientBase.swift b/packages/ios-client/Sources/ios-client/ClientBase.swift index abac7a19..5eb4fddb 100644 --- a/packages/ios-client/Sources/ios-client/ClientBase.swift +++ b/packages/ios-client/Sources/ios-client/ClientBase.swift @@ -108,14 +108,14 @@ public class ClientBase: NSObject, RTCPeerConnectionDelegate { /** Sends an SDP offer to the WHIP/WHEP server. - + - Parameter sdpOffer: The offer to send to the server. - + - Throws: `AttributeNotFoundError.ResponseNotFound` if there is no response to the offer or `AttributeNotFoundError.LocationNotFound` if the response does not contain the location parameter or `SessionNetworkError.ConnectionError` if the connection could not be established or the response code is incorrect, for example due to server being down, wrong server URL or token. - + - Returns: A SDP response. */ func send(sdpOffer: String) async throws -> String { @@ -170,9 +170,9 @@ public class ClientBase: NSObject, RTCPeerConnectionDelegate { /** Sends an ICE candidate to WHIP/WHEP server in order to provide a streaming device. - + - Parameter candidate: Represents a single ICE candidate. - + - Throws: `AttributeNotFoundError.PatchEndpointNotFound` if the patch endpoint has not been properly set up, `AttributeNotFoundError.UFragNotFound` if the SDP of the candidate does not contain the ufrag, `SessionNetworkError.CandidateSendingError` if the candidate could not be sent and @@ -331,11 +331,11 @@ public class ClientBase: NSObject, RTCPeerConnectionDelegate { /** Gets matched codecs from the preferred codec list that are available in the peer connection factory. - + - Parameter preferredCodecs: List of preferred codec names - Parameter mediaType: The media type (audio or video) - Parameter useReceiver: Whether to use receiver capabilities instead of sender capabilities - + - Returns: Array of matched codec capabilities */ func getMatchedCodecs(preferredCodecs: [String], mediaType: String, useReceiver: Bool = false) @@ -360,7 +360,7 @@ public class ClientBase: NSObject, RTCPeerConnectionDelegate { /** Sets codec preferences for a transceiver if matched codecs are available. - + - Parameter transceiver: The RTP transceiver to set preferences for - Parameter preferredCodecs: List of preferred codec names - Parameter mediaType: The media type (audio or video) diff --git a/packages/ios-client/Sources/ios-client/WhepClient.swift b/packages/ios-client/Sources/ios-client/WhepClient.swift index cccafbce..4cecc7ff 100644 --- a/packages/ios-client/Sources/ios-client/WhepClient.swift +++ b/packages/ios-client/Sources/ios-client/WhepClient.swift @@ -21,10 +21,10 @@ public class WhepClient: ClientBase { /** Initializes a `WhepClient` object. - + - Parameter serverUrl: A URL of the WHEP server. - Parameter configurationOptions: Additional configuration options, such as a STUN server URL or authorization token. - + - Returns: A `WhepClient` object. */ public init(configOptions: WhepConfigurationOptions) throws { @@ -54,7 +54,7 @@ public class WhepClient: ClientBase { /** Connects the client to the WHEP server using WebRTC Peer Connection. - + - Throws: `SessionNetworkError.ConfigurationError` if the `stunServerUrl` parameter of the initial configuration is incorrect, which leads to `peerConnection` being nil or in any other case where there has been an error in creating the `peerConnection` */ @@ -116,7 +116,7 @@ public class WhepClient: ClientBase { /** Closes the established Peer Connection. - + - Throws: `SessionNetworkError.ConfigurationError` if the `stunServerUrl` parameter of the initial configuration is incorrect, which leads to `peerConnection` being nil or in any other case where there has been an error in creating the `peerConnection` */ @@ -165,7 +165,7 @@ public class WhepClient: ClientBase { /** Gets the names of supported receiver video codecs. - + - Returns: Array of supported video codec names */ public static func getSupportedReceiverVideoCodecsNames() -> [String] { @@ -177,7 +177,7 @@ public class WhepClient: ClientBase { /** Gets the names of supported receiver audio codecs. - + - Returns: Array of supported audio codec names */ public static func getSupportedReceiverAudioCodecsNames() -> [String] { @@ -189,7 +189,7 @@ public class WhepClient: ClientBase { /** Sets preferred video codecs for receiving. - + - Parameter preferredCodecs: Array of preferred video codec names, or nil to skip setting */ public func setPreferredVideoCodecs(preferredCodecs: [String]?) { @@ -215,7 +215,7 @@ public class WhepClient: ClientBase { /** Sets preferred audio codecs for receiving. - + - Parameter preferredCodecs: Array of preferred audio codec names, or nil to skip setting */ public func setPreferredAudioCodecs(preferredCodecs: [String]?) { diff --git a/packages/ios-client/Sources/ios-client/WhipClient.swift b/packages/ios-client/Sources/ios-client/WhipClient.swift index 21290c6b..d72eb9df 100644 --- a/packages/ios-client/Sources/ios-client/WhipClient.swift +++ b/packages/ios-client/Sources/ios-client/WhipClient.swift @@ -38,7 +38,7 @@ public class WhipClient: ClientBase { /** Initializes a `WhipClient` object. - Parameter configurationOptions: Additional configuration options, such as a STUN server URL or authorization token. - + - Returns: A `WhipClient` object. */ public init( @@ -117,7 +117,7 @@ public class WhipClient: ClientBase { /** Connects the client to the WHIP server using WebRTC Peer Connection. - + - Throws: `SessionNetworkError.ConfigurationError` if the `stunServerUrl` parameter of the initial configuration is incorrect, which leads to `peerConnection` being nil or in any other case where there has been an error in creating the `peerConnection` */ @@ -145,7 +145,7 @@ public class WhipClient: ClientBase { /** Closes the established Peer Connection. - + - Throws: `SessionNetworkError.ConfigurationError` if the `stunServerUrl` parameter of the initial configuration is incorrect, which leads to `peerConnection` being nil or in any other case where there has been an error in creating the `peerConnection` */ @@ -314,7 +314,7 @@ public class WhipClient: ClientBase { /** Gets the names of supported sender video codecs. - + - Returns: Array of supported video codec names */ public static func getSupportedSenderVideoCodecsNames() -> [String] { @@ -326,7 +326,7 @@ public class WhipClient: ClientBase { /** Gets the names of supported sender audio codecs. - + - Returns: Array of supported audio codec names */ public static func getSupportedSenderAudioCodecsNames() -> [String] { @@ -338,7 +338,7 @@ public class WhipClient: ClientBase { /** Sets preferred video codecs for sending. - + - Parameter preferredCodecs: Array of preferred video codec names, or nil to skip setting */ public func setPreferredVideoCodecs(preferredCodecs: [String]?) { @@ -363,7 +363,7 @@ public class WhipClient: ClientBase { /** Sets preferred audio codecs for sending. - + - Parameter preferredCodecs: Array of preferred audio codec names, or nil to skip setting */ public func setPreferredAudioCodecs(preferredCodecs: [String]?) { @@ -390,13 +390,13 @@ public class WhipClient: ClientBase { /** Starts screen sharing mode. - + This method: - Stops camera capture - Creates a new video source for screen sharing - Starts IPC server listening for frames from the broadcast extension - Shows the system broadcast picker for the user to select the extension - + This should be called during initialization, not during an active stream. */ public func startScreenShare() throws {