Skip to content

Commit

Permalink
iOS: Use MainActor annotations
Browse files Browse the repository at this point in the history
- Add MainActor annotation to delegate functions
- Switch from main thread assertion to annotation
- Use class generic `CallType` instead of parameterizing `receivedOffer` independently
- Update tests

Co-authored-by: Ehren Kret <ehren@signal.org>
  • Loading branch information
jim-signal and ehrenkret-signal committed Sep 30, 2024
1 parent e1aeed0 commit 73cc44e
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 131 deletions.
10 changes: 0 additions & 10 deletions src/ios/SignalRingRTC/SignalRingRTC/Assertions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ internal func failDebug(
Logger.error(message, file: file, function: function, line: UInt32(line))
assertionFailure(message, file: file, line: UInt(line))
}

internal func AssertIsOnMainThread(
file: StaticString = #fileID,
function: StaticString = #function,
line: Int = #line
) {
if !Thread.isMainThread {
failDebug("Must be on main thread.", file: file, function: function, line: line)
}
}
130 changes: 65 additions & 65 deletions src/ios/SignalRingRTC/SignalRingRTC/CallManager.swift

Large diffs are not rendered by default.

Loading

0 comments on commit 73cc44e

Please sign in to comment.