BLETR project / MyPeripheral.swift /email@example.com/:
translates to a Swift code that won't compile:
translate to `DispatchQueue.main.async` mentioned at
as a low-effort approach (but not equivalent to the original, given some limitations);
if cannot reliably translate the intput (i.e. need to pass more than 2 arguments), add an appropriate comment to the output code.
Related (from Todd Bruss):
One weaker area I found is a workaround around NSInvocation / Invoke and some of its surrounding required objects. NSInvocation / Invoke does not exist in Swift and for some lower level stuff, I had to keep the code in Objective-C and work with a Bridging Header. I can send you an example sometime if interested. The reason I had to go super deep is Apple broke something major and had to find a solution in a hurry.