Skip to content

Enable text selection for Xcode version#416

Closed
yo1995 wants to merge 3 commits intoXcodesOrg:mainfrom
yo1995:yo1995/Update-EnableTextSelection
Closed

Enable text selection for Xcode version#416
yo1995 wants to merge 3 commits intoXcodesOrg:mainfrom
yo1995:yo1995/Update-EnableTextSelection

Conversation

@yo1995
Copy link

@yo1995 yo1995 commented Aug 24, 2023

Close #415


Text(verbatim: "Xcode \(xcode.description) \(xcode.version.buildMetadataIdentifiersDisplay)")
.font(.title)
.textSelection(.enabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.textSelection is only available on MacOS 12. Currently Xcodes has a minimum version of 11.

You can either wrap this in a #available or this PR can wait a bit. Some point soon we'll update to min of 12.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It was an oversight from my part - I only saw the "build with macOS 12" part in README, but didn't read the "run on macOS 11.0" line 😅

I'll defer it to your decision - feel free to wait min target becomes macOS 12 or edit this PR with

private extension InfoPane {
    @ViewBuilder
    func textSelection(_ enabled: Bool) -> some View {
        if #available(macOS 12, *), enabled {
            self
                .textSelection(.enabled)
        } else {
            self
        }
    }
}

Copy link
Contributor

@MattKiazyk MattKiazyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

See comment around macOS 12 vs 11

@MattKiazyk
Copy link
Contributor

This has been added via #503

@MattKiazyk MattKiazyk closed this Mar 8, 2024
@yo1995 yo1995 deleted the yo1995/Update-EnableTextSelection branch March 11, 2024 04:17
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.

Make the version number in info pane copy-able

2 participants