servo / core-foundation-rs

Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS
Other
987 stars 216 forks source link

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

Open wooden-worm opened 6 months ago

wooden-worm commented 6 months ago

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: https://github.com/servo/core-foundation-rs/blob/0933af08be6cf1ba5ad3b0abfc05bbead489116b/core-graphics/src/private.rs#L24

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

madsmtm commented 6 months ago

These were introduced in https://github.com/servo/core-graphics-rs/pull/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 commented 1 month ago

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

I'm inclined to remove this functionality.

jdm commented 1 month ago

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

waywardmonkeys commented 1 month ago

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.