Skip to content

pin CryptoSwift version to 1.10, update usages of .bytes to .byteArray#76

Open
yurique wants to merge 1 commit into
loopandlearn:devfrom
yurique:fix/cryptoswift-1.10
Open

pin CryptoSwift version to 1.10, update usages of .bytes to .byteArray#76
yurique wants to merge 1 commit into
loopandlearn:devfrom
yurique:fix/cryptoswift-1.10

Conversation

@yurique

@yurique yurique commented Jun 9, 2026

Copy link
Copy Markdown

See: krzyzanowskim/CryptoSwift#1076

  • CryptoSwift used to provide the .bytes extension for Data
  • with latest-ish versions of xcode - .bytes was introduced as part of Foundation, resulting in name-clash and failed compilation
  • old .bytes from CryptoSwift used to return an Array<UInt8>, but .bytes from Foundation returns a RawSpan, so the compilation fails (in newer xcode - because the type is different, in older xcode - because .bytes is not yet available in Foundation)
  • in CryptoSwift they had no choice but to rename the old .bytes to .byteArray

So the only (as far as I can tell) reliable fix that is compatible with all xcode versions is to pin CryptoSwift to the later version (1.10.0) in this project and switch to .byteArray instead of .bytes.

Edit:
I'm not 100% sure that just having a newer xcode is enough. It might be the case that both a newer version xcode (with built-in .bytes) AND xcode resolving CryptoSwift to a later version (that no longer has .bytes) is necessary.

Edit2:
apparently both conditions are needed indeed: new xcode AND new version of CryptoSwift
(I don't know why/if xcode would resolve to a newer version of CryptoSwift on its own, or if some user input/error is needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant