-
Notifications
You must be signed in to change notification settings - Fork 96
Description
I'm experiencing build failures when integrating Solana.Swift v2.0.2 into my iOS project targeting iOS 18.5 with Xcode 26.0. The build fails with multiple errors related to RawSpan not conforming to the Sequence protocol.
🔍 Specific Errors
error: 'RawSpan' does not conform to 'Sequence' protocol
error: 'RawSpan' has no member 'toHexString'
error: 'RawSpan' has no member 'count'
error: Cannot convert 'RawSpan' to '[UInt8]'
error: Cannot convert 'RawSpan?' to '[UInt8]?'
�� Environment Details
- Xcode Version: 26.0 (Build 17A324)
- iOS Target: 18.5
- Solana.Swift Version: 2.0.2
- Repository Used:
metaplex-foundation/Solana.Swift.git - Branch/Commit: master (bc2e7e5)
- Device: iPhone 17 Simulator
- Swift Version: 5
🔄 Steps to Reproduce
- Create new iOS project with iOS 18.5 target
- Add Solana.Swift package dependency:
dependencies: [ .package(url: "https://github.com/metaplex-foundation/Solana.Swift.git", branch: "master") ]
- Import Solana in any Swift file:
import Solana - Attempt to build the project
- Build fails with RawSpan-related errors
📋 Affected Files
Based on build logs, errors occur in:
Array+Extension.swift(line 78)Data+Extension.swift(line 19)PublicKey+AssociatedTokenProgram.swift(lines 51, 87)String+Extension.swift(line 6)
🛠️ Current Workaround
I've temporarily resolved this by:
- Commenting out Solana SDK in project dependencies
- Using a mock implementation for development
- Documenting the issue for future resolution
❓ Questions for Community
- Is this a known issue with iOS 18.5/Xcode 26.0 compatibility?
- Are there any patches or forks that resolve these RawSpan issues?
- Is there a timeline for official fixes?
- Are there alternative Solana Swift SDKs that work with current iOS versions?
- What's the recommended approach for production apps that need Solana functionality?
🔗 Related Context
This appears to be related to changes in Swift's type system and protocol conformance requirements in newer iOS/Xcode versions. The RawSpan type seems to have compatibility issues with current Swift standards.
📊 Impact
This prevents integration of Solana functionality into iOS apps targeting current iOS versions, affecting:
- Wallet integration
- Token transfers
- DApp connectivity
- DeFi applications
Any guidance, workarounds, or updates would be greatly appreciated! ��
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.