Skip to content

Tkinter apps can't be distributed on the macOS App Store #129247

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

Open
freakboy3742 opened this issue Jan 23, 2025 · 2 comments
Open

Tkinter apps can't be distributed on the macOS App Store #129247

freakboy3742 opened this issue Jan 23, 2025 · 2 comments
Labels
OS-mac topic-tkinter type-bug An unexpected behavior, bug, or error

Comments

@freakboy3742
Copy link
Contributor

freakboy3742 commented Jan 23, 2025

Bug report

Bug description:

If you use tkinter in your app, and package the app for distribution in the macOS App Store, the app will be rejected with a message to the effect that:

Guideline 2.5.1 - Performance - Software Requirements

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

Contents/Frameworks/Python.framework/Versions/3.12/lib/libtk8.6.dylib

Symbols:

• _NSWindowDidOrderOnScreenNotification

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.

(or similar).

This appears to be a known issue in Tk.

This ticket is mostly to log the issue as something that can affect macOS users; there's not much we can do to fix it until such time as Tk fixes the problem and releases the fix in a version that Python can incorporate into a release (or, I guess, Apple changes their App Store review policies).

CPython versions tested on:

3.14, 3.13, 3.12, 3.11, 3.10, 3.9, CPython main branch

Operating systems tested on:

macOS

@hoodmane
Copy link
Contributor

Maybe you could patch tkinter.so to stub out the symbol to a trap?

@freakboy3742
Copy link
Contributor Author

I'm not sure that would actually fix the problem - the issue is the existence of the symbol at all. Apple's already demonstrated that their app rejection processes rely heavily on fairly naïve pattern matches (see #120522); I wouldn't be at all surprised that if you wrote some code that just happened to use the name _NSWindowDidOrderOnScreenNotification as a symbol, it would be rejected, even if the code had nothing to do with Cocoa.

It's also an issue internal to the Tk dylib, not the tkinter.so Python module; so this sort of approach would require doing binary patching (or source patching) one of our upstream dependencies.... just so people can put Tk apps in the App Store. I'm not convinced that juice is worth the squeeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac topic-tkinter type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants