Skip to content

Add macOS guards for macOS-specific function inside image-segmenter#50

Merged
kevchengcodes merged 1 commit into
apple:mainfrom
kevchengcodes:image-segmenter-tool-ios-fix
Jun 16, 2026
Merged

Add macOS guards for macOS-specific function inside image-segmenter#50
kevchengcodes merged 1 commit into
apple:mainfrom
kevchengcodes:image-segmenter-tool-ios-fix

Conversation

@kevchengcodes

Copy link
Copy Markdown
Contributor

Summary

The image-segmenter CLI tool allows users to test image segmentation. There is currently some macOS-specific behavior in it that will cause the coreai-models-Package build to fail if targeting iOS. This PR adds a if os(macOS) guard for the specific code (a helper function that opens the segmented output image after model inference was using Process()).

Reproduce

In Xcode, build the coreai-models-Package scheme targeting Any IOS Device. The build will fail with Cannot find 'Process' in scope.

Verification

With this fix, that build will succeed.

@kevchengcodes kevchengcodes self-assigned this Jun 16, 2026
@kevchengcodes kevchengcodes merged commit 727a46e into apple:main Jun 16, 2026
3 checks passed
@kevchengcodes kevchengcodes deleted the image-segmenter-tool-ios-fix branch June 16, 2026 19:01
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