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

Usage of CGSRegionRelease in core-graphics prevents publishing to the Mac AppStore #656

Open
wooden-worm opened this issue Feb 22, 2024 · 4 comments · May be fixed by #700
Open

Usage of CGSRegionRelease in core-graphics prevents publishing to the Mac AppStore #656

wooden-worm opened this issue Feb 22, 2024 · 4 comments · May be fixed by #700

Comments

@wooden-worm
Copy link

wooden-worm commented Feb 22, 2024

My app got rejected from the Mac AppStore with the following message:

Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public or deprecated APIs:

Contents/MacOS/***
Symbols:
• _CGSRegionRelease

The use of non-public or deprecated APIs is not permitted on the App Store, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms.

I believe the offending code is here:

unsafe { ffi::CGSRegionRelease(self.region) }

I haven't found any workaround yet, any help would be greatly appreciated.

@madsmtm
Copy link
Contributor

madsmtm commented Feb 22, 2024

These were introduced in servo/core-graphics-rs#50.

There is no workaround other than not using the private APIs CGSRegion/CGSSurface anywhere in your code.

Perhaps you have a dependency somewhere that's using them? To find out, I'd suggest you clone the repo, remove the private module, and add the repo in a [patch.crates-io] section.

@waywardmonkeys
Copy link
Collaborator

These were apparently only used in a long-dead, long-unused fork of glutin (servo-glutin).

I'm inclined to remove this functionality.

@jdm
Copy link
Member

jdm commented Aug 11, 2024

If that's true, I'm ok with that solution. How did you determine that?

@waywardmonkeys
Copy link
Collaborator

I searched for various things via GitHub code search and found that the only things using this were the code that it was specifically added for, in servo-glutin and various forks of it. I went to the upstream code and it appears that the code was never present there.

waywardmonkeys added a commit to waywardmonkeys/core-foundation-rs that referenced this issue Aug 12, 2024
This is a private API on macOS. This code was added for use
in `servo-glutin` and was not used outside of that as far as
I know (by doing various code searches).

Fixes servo#656.
@waywardmonkeys waywardmonkeys linked a pull request Aug 12, 2024 that will close this issue
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 a pull request may close this issue.

4 participants