Skip to content

Fix build issue on Xcode 27 - #910

Open
GiacomoLeopizzi wants to merge 1 commit into
web3swift-team:developfrom
GiacomoLeopizzi:xcode27
Open

Fix build issue on Xcode 27#910
GiacomoLeopizzi wants to merge 1 commit into
web3swift-team:developfrom
GiacomoLeopizzi:xcode27

Conversation

@GiacomoLeopizzi

@GiacomoLeopizzi GiacomoLeopizzi commented Jun 18, 2026

Copy link
Copy Markdown

Summary of Changes

Fixes a build issue caused by the custom URLSession.data(for:) backward-compatibility shim colliding with the system URLSession.data(for:) API (available since iOS 15 / macOS 12) when building with newer Xcode/SDK toolchains.

Changes:

  • Renamed the custom URLSession.data(for:) helper to data(forHTTP:) to avoid the naming collision and ambiguity with the built-in API.
  • The helper now prefers the native data(for:) on iOS 15+ / macOS 12+, and only falls back to the withCheckedThrowingContinuation + dataTask implementation on older OS versions. (Previously the whole extension was marked @available(..., obsoleted:), which broke the build.)
  • Updated the call site in APIRequest.send(uRLRequest:with:) to use the new data(forHTTP:) method.

Test Data or Screenshots

N/A — no behavioral change. This is a build/compatibility fix.

By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.

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