Python-in-Mac-App-Store
Python-in-Mac-App-Store copied to clipboard
Is it still a valid procedure to submit python app to mac-app-store?
Would you advise me. Is it still a valid procedure to submit python app to mac-app-store?
If the question is “Do these steps still work?” then I must say I don’t know, since I haven’t retested them in several years.
If the question is “Is it still possible to submit Python programs to the Mac App Store?” I will say “Probably, but I haven’t tried recently.”
Thank you
Since the Application Loader is not included in Xcode 13 anymore, these steps may need some update.
As written in Apple's help, there are two ways to upload.
One is using altool; the other is using Transporter App.
I've tried both but haven't succeeded yet. Is there anyone who successfully signed an app and uploaded it?
I haven't even successfully signed the app.
Here are my commands that sign the code.
APP_PATH='dist/MyApp.app'
codesign -s "$SIGNING_IDENTITY_APP" -f \
--entitlements app.entitlements \
"$APP_PATH/Contents/MacOS/MyApp"
I've verified my app under the MacOS folder. It showed that it was still not signed after I run codesign command manually.
>_ codesign --verify --verbose dist/MyApp.app/Contents/MacOS/MyApp
dist/MyApp.app/Contents/MacOS/MyApp: code object is not signed at all
In architecture: x86_64
Update: I've signed the package successfully now but I'm still not able to upload the package.
The signing command is as below:
source code-signing-config.sh
APP_PATH='dist/MyApp.app'
if [ ${DO_CODE_SIGNING} -eq 1 ] ; then
codesign --deep --force --verbose=4 -s "$SIGNING_IDENTITY_APP" -f \
--entitlements app.entitlements \
"$APP_PATH/Contents/Frameworks/Python.framework/Versions/3.6"
codesign --deep --force --verbose=4 -s "$SIGNING_IDENTITY_APP" -f \
--entitlements app.entitlements \
"$APP_PATH/Contents/MacOS/MyApp"
codesign --deep --force --verbose=4 -s "$SIGNING_IDENTITY_APP" -f \
--entitlements app.entitlements \
"$APP_PATH/Contents/MacOS/python"
fi
The warning is Error: App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list.
But actually, I've already added the config to those two files.
<key>com.apple.security.app-sandbox</key>
<true/>
dist/MyApp.app/Contents/Frameworks/Python.framework/Versions/3.6/Resources/Info.plist
dist/MyApp.app/Contents/Info.plist
I've tried only using the codesign command with a --entitlements parameter as this repo guided. Still, it seems not working (not changing the content of the generated files in the .app folder).
I've also tried to add key:value in plist as the parameter of py2app, but it only changes the content of dist/MyApp.app/Contents/Info.plist but not dist/MyApp.app/Contents/Frameworks/Python.framework/Versions/3.6/Resources/Info.plist
But it's still won't change the warning when uploading files by using xcrun altool --validate-app command.
Hope someone can update the process if conquered the problem.