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

Is it still a valid procedure to submit python app to mac-app-store? #2

Open
madeinquant opened this issue Oct 13, 2021 · 3 comments
Open

Comments

@madeinquant
Copy link

Would you advise me. Is it still a valid procedure to submit python app to mac-app-store?

@madeinquant madeinquant changed the title Is Is it still a valid procedure to submit python app to mac-app-store? Oct 13, 2021
@davidfstr
Copy link
Owner

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.”

@madeinquant
Copy link
Author

Thank you

@oldcai
Copy link

oldcai commented Nov 18, 2021

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.

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

No branches or pull requests

3 participants