Skip to content

Commit

Permalink
[Fastlane.Swift] Swift fastlane does not run on Apple Silicon fastlan…
Browse files Browse the repository at this point in the history
…e#18502

* [Fastlane.Swift] Fix waring 'withUnsafeBytes' is deprecated: use `withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R` instead
  • Loading branch information
kikeenrique committed Oct 22, 2021
1 parent 1aa6c40 commit e4cda2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fastlane/swift/SocketClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ class SocketClient: NSObject {

private func sendThroughQueue(string: String) {
let data = string.data(using: .utf8)!
_ = data.withUnsafeBytes { self.outputStream.write($0, maxLength: data.count) }
data.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in
if let buffer = buffer.baseAddress {
self.outputStream.write(buffer.assumingMemoryBound(to: UInt8.self), maxLength: data.count)
}
}

}

private func privateSend(string: String) {
Expand Down

0 comments on commit e4cda2f

Please sign in to comment.