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

Add --category building when the current Xcode window is building #64

Merged
merged 1 commit into from
May 9, 2023

Conversation

starbugs
Copy link
Contributor

@starbugs starbugs commented May 2, 2023

Implements #20.

@starbugs starbugs force-pushed the feature/20-detect-building branch from 0dd9a75 to d3e18ec Compare May 2, 2023 10:21
@starbugs starbugs requested a review from alanhamlett May 2, 2023 10:23
Copy link
Member

@alanhamlett alanhamlett left a comment

Choose a reason for hiding this comment

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

Would this text be translated/localized depending on the user's language? The it wouldn't equal "Build".

@starbugs
Copy link
Contributor Author

starbugs commented May 8, 2023

Would this text be translated/localized depending on the user's language? The it wouldn't equal "Build".

Very good point that I completely didn't think about. I suppose the text will be localized. I will verify and look into possible solutions.

@starbugs
Copy link
Contributor Author

starbugs commented May 9, 2023

@alanhamlett As per https://apps.apple.com/us/app/xcode/id497799835?mt=12 Xcode is currently only available in English. I also checked the Xcode.app bundle and it only contains en.lproj without any other translations. For now, I think this PR is "as safe as it gets" without much further effort. One way to make this more future proof would be to parse the Xcode app bundle and automate the string matching based on the results. However, I think even then there would be a chance that we might miss something, since people might have multiple Xcode versions installed using Xcodes for example.

Once Xcode is released with multi language support, this feature would have to be revised of course, but I think that's a good enough tradeoff for now.

I also looked into other methods as to how we could detect building (as a supporting measure for the current approach or as a replacement). One way would be to observe potential xcodebuild processes, but that would not suffice on its own to detect if the focused Xcode window is building. There might be a way to strengthen the approach in the future by including more factors though.

@starbugs starbugs force-pushed the feature/20-detect-building branch from d3e18ec to ed5f5ae Compare May 9, 2023 09:05
@starbugs starbugs merged commit 4275a6a into main May 9, 2023
@starbugs starbugs deleted the feature/20-detect-building branch May 9, 2023 09:42
@alanhamlett alanhamlett changed the title Add --category building when the current Xcode window is building (#20) Add --category building when the current Xcode window is building May 12, 2023
@alanhamlett alanhamlett mentioned this pull request May 12, 2023
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.

2 participants