Quick question can app using python kit get published to macOS App Store?

Skip to first unread message

Yuan Zhou

Jan 28, 2021, 4:27:53 AM1/28/21
to Swift for TensorFlow
The same question as the title

Brad Larson

Jan 28, 2021, 9:40:08 AM1/28/21
to Swift for TensorFlow, andy.y...@gmail.com
An upfront warning: only an Apple representative can give you a definite answer to whether or not something will be acceptable on the App Store, so to be certain you'll want to check with them on this. The most the rest of us can do is speculate.

PythonKit uses publicly available capabilities and interfaces, so I don't believe the normal precautions about private API usage or undocumented features apply. 

As a result, I think the remaining concern is about section 2.5.2 in the App Store Review Guidelines:

"2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user."

If the Python code is self-contained within your app bundle, it sounds like you'd be fine under the above restriction. Also, before deploying an application that uses PythonKit, I'd make sure it can handle the variety of Python installations you'll find on your users' machines (different Python versions, missing Python, etc.) because I know that can be a challenge.

Yuan Zhou

Jan 28, 2021, 5:17:43 PM1/28/21
to Swift for TensorFlow, bradl...@google.com, Yuan Zhou
Thanks for your answer. I wonder why pythonkit needs to reply on python installed on users' machines? Python 3.8 is less than 30MB. It would be great if pythonKit could include a certain version of Python then the python version wouldn't be a problem. 

Another question I have is why articles online (https://towardsdatascience.com/from-swift-import-python-f2fc2a997d4) all mentioned app sandbox needs to be disabled when using PythonKit. If there is no sandbox, you can't publish to macos app store. I just re-enabled the sandbox in my app and pythonkit seems to work just fine.

Reply all
Reply to author
0 new messages