Skip to content

fix: Swift 6 / Xcode 26 compatibility#1

Open
masadchattha wants to merge 1 commit intowtsnz:mainfrom
masadchattha:main
Open

fix: Swift 6 / Xcode 26 compatibility#1
masadchattha wants to merge 1 commit intowtsnz:mainfrom
masadchattha:main

Conversation

@masadchattha
Copy link
Copy Markdown

Description:

Summary

Replace Data.bytes with [UInt8]() to fix RawSpan conversion errors in Swift 6 / Xcode 26.

Problem

In Swift 6, Data.bytes returns RawSpan instead of [UInt8], causing compilation errors:
error: cannot convert value of type 'RawSpan' to expected argument type '[UInt8]'

Solution

Explicitly convert Data to [UInt8] using [UInt8](data) instead of data.bytes.

Files Changed

  • Crypto.swift: hmacsha512, sha3keccak256, sign, signCompact
  • ECDSA.swift: verifySignature, verifySignatureCompact
  • Bip32.swift: init depth parsing
  • BitcoinSignedMessage.swift: recoverCompact, verifyCompact
  • Signature.swift: toDer rneg/sneg parsing

Replace Data.bytes with [UInt8]() to fix RawSpan conversion errors.

In Swift 6, Data.bytes returns RawSpan instead of [UInt8], causing
compilation errors. This fix converts Data to [UInt8] explicitly.

Files changed:
- Crypto.swift: hmacsha512, sha3keccak256, sign, signCompact
- ECDSA.swift: verifySignature, verifySignatureCompact
- Bip32.swift: init depth parsing
- BitcoinSignedMessage.swift: recoverCompact, verifyCompact
- Signature.swift: toDer rneg/sneg parsing
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