Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: kickoff release #3949

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/composite_actions/run_xcodebuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ runs:
fi

xcodebuild -version
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
shell: bash
2 changes: 1 addition & 1 deletion .github/composite_actions/run_xcodebuild_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ runs:

xcode-select -p
xcodebuild -version
xcodebuild $action -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} $clonedSourcePackagesPath $derivedDataPath $coverageFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
xcodebuild $action -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} $clonedSourcePackagesPath $derivedDataPath $coverageFlags | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
shell: bash

- name: Generate Coverage report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public final class FaceLivenessSession: LivenessService {
}

public func closeSocket(with code: URLSessionWebSocketTask.CloseCode) {
websocket.close(with: code)
livenessServiceDispatchQueue.async {
self.websocket.close(with: code)
}
}

public func initializeLivenessStream(withSessionID sessionID: String, userAgent: String = "") throws {
Expand All @@ -89,14 +91,16 @@ public final class FaceLivenessSession: LivenessService {

savedURLForReconnect = url
let signedConnectionURL = signer.sign(url: url)
websocket.open(url: signedConnectionURL)
livenessServiceDispatchQueue.async {
self.websocket.open(url: signedConnectionURL)
}
}

public func send<T>(
_ event: LivenessEvent<T>,
eventDate: @escaping () -> Date = Date.init
) {
livenessServiceDispatchQueue.sync {
livenessServiceDispatchQueue.async {
let encodedPayload = self.eventStreamEncoder.encode(
payload: event.payload,
headers: [
Expand All @@ -107,7 +111,7 @@ public final class FaceLivenessSession: LivenessService {
)

let dateForSigning: Date
if let serverDate = serverDate {
if let serverDate = self.serverDate {
dateForSigning = serverDate
} else {
dateForSigning = eventDate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ final class WebSocketSession {
private var receiveMessage: ((Result<URLSessionWebSocketTask.Message, Error>) -> WebSocketMessageResult)?
private var onSocketClosed: ((URLSessionWebSocketTask.CloseCode) -> Void)?
private var onServerDateReceived: ((Date?) -> Void)?
private let delegateQueue: OperationQueue

init() {
self.delegateQueue = OperationQueue()
self.delegateQueue.maxConcurrentOperationCount = 1
self.delegateQueue.qualityOfService = .userInteractive

self.urlSessionWebSocketDelegate = Delegate()

self.session = URLSession(
configuration: .default,
delegate: urlSessionWebSocketDelegate,
delegateQueue: .init()
delegateQueue: delegateQueue
)
}

Expand Down
Loading