Swime icon indicating copy to clipboard operation
Swime copied to clipboard

stepping may behave oddly; variables may not be available - Read bytes from file data

Open Sanadbarjawi opened this issue 6 years ago • 0 comments

using Swift 5, Xcode 10.2

im using it like this:

 for file in data {
                if let mimeType = Swime.mimeType(data: file) {
                    multipartFormData.append(file, withName: "dumdum", fileName: "file.\(mimeType.ext)", mimeType: mimeType.mime)
                }

the issue happens in the Swime Struct itself, in this function:

  internal func readBytes(count: Int) -> [UInt8] {
    var bytes = [UInt8](repeating: 0, count: count)

    data.copyBytes(to: &bytes, count: count)

    return bytes
  }

ps: the count param value is equal to 262

im getting the following in my console:

Swime was compiled with optimization - stepping may behave oddly; variables may not be available.

Sanadbarjawi avatar Apr 10 '19 08:04 Sanadbarjawi