Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.10.0 fails builds with assumeIsolated(_:file:line:)' is only available in iOS 17.0 or newer error #333

Open
NishanthReddyKuninti opened this issue Sep 18, 2024 · 6 comments

Comments

@NishanthReddyKuninti
Copy link

- ERROR | [iOS] xcodebuild:  ViewInspector/Sources/ViewInspector/SwiftUI/CustomView.swift:162:30: error: 'assumeIsolated(_:file:line:)' is only available in iOS 17.0 or newer
@manishkumar03
Copy link

manishkumar03 commented Sep 19, 2024

Getting the same error.

❌ /Users/jenkins/builds-runner-8/work/iOS/iOS/acv-ios-unit-test-dd/SourcePackages/checkouts/ViewInspector/Sources/ViewInspector/SwiftUI/CustomView.swift:153:30: 'assumeIsolated(:file:line:)' is only available in iOS 17.0 or newer
return try MainActor.assumeIsolated {

@nalexn
Copy link
Owner

nalexn commented Sep 19, 2024

Which Xcode are you using?

For Xcode 16 it is defined like that:

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public static func assumeIsolated<T>(_ operation: @MainActor () throws -> T, file: StaticString = #fileID, line: UInt = #line) rethrows -> T where T : Sendable

@liambrozik
Copy link

Getting the same issue on XCode 15.2 in Azure pipelines

@nalexn
Copy link
Owner

nalexn commented Sep 19, 2024

Well, I guess you need to either use a newer Xcode (15.4 might work), as there is no way to avoid assumeIsolated and support newest features

@liambrozik
Copy link

Xcode 15.4 did work

@fangmobile
Copy link

Confirming changing to 15.4 works for me.

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

No branches or pull requests

5 participants