Mac App Store deployment (DEF-2081)

Just a few minutes ago I finally submitted version 1.0 of Labyrinth for review on the Mac App Store; the process was quite frustrating and unorthodox so here’s a description of the current issues with bundled Mac applications and the App Store.

Just like iOS applications are packaged into .ipa files for deployment to iTunes, apps for OS X are packaged into .pkg files for deployment to the Mac App Store. Unfortunately, this process requires several additional steps that are handled by the engine for iOS apps; in order to create a pkg that could be submitted through Application Loader, I had to use a third party tool (App Bundler 3) to apply some plist modifications such as enabling app sandboxing (a feature required for the App Store) and create a pkg. I also attempted to upload the app by making a temp project and replacing the temp app in the .xcarchive (generated by Product > Archive) and then attempting to upload to the App Store from Xcode. That didn’t work as the plist generated by Defold in the bundled app doesn’t have the proper settings for sandboxing.

Long story short, the Mac App Store is not currently supported by the Defold engine; just like iOS .ipas can be generated, .pkgs need to be able to be created which contain bundled mac apps. If I get a chance later I can try to dig up some more information on the matter; right now I have to prioritize some college work so I won’t be too active.


Based on some crowdsourced review times, it looks like it’ll only take around 24 hours for Labyrinth to get approved (or rejected) for deployment to the App Store; I’ll post on the showcase thread once I get a result!

6 Likes

(App Bundler 3)

What’s this? I tried to look it up but couldn’t find it.

Where did you get stuck at exactly? I just tested process and it seems to work. Also did not use 3rd party tools. I did have to modify the info.plist to have an Application Category. Also had to make sure the icon file was right. Upload a 1024x1024 image to https://iconverticons.com/ and you’ll get a proper icon that will work for osx.

Did you codesign with an .entitlements file?

codesign -f -s “3rd Party Mac Developer Application: YourCompanyName” --entitlements Test.entitlements Test.app --deep

For Test.entitlements

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.app-sandbox</key>   <true/>
</dict>
</plist>

Then make the pkg

productbuild --component “Test.app” /Applications --sign “3rd Party Mac Developer Installer: YourCompanyName” --product “Test.app/Contents/Info.plist” Test.pkg

Then upload the pkg with Application Loader

I have yet to fully test this process with a production Defold game though, just tested with blank project, and not sure what the actual application reviewers would say about the technical details of a production app.

2 Likes

Oh, interesting! I looked for something like productbuild to go right from an app to a pkg and had some issues; I also had some problems with the plist with things like sandboxing. Good to know that this procedure works. Brain is on overload a little right now, sorry.

@RG1 I believe you got a game live up on the Mac App Store - was what I posted above what you did, could you share any issues you had?

2 Likes

Created a ticket for improvements to the OSX bundler: DEF-2081

3 Likes

That is the same steps I did for my app to publish it to Appstore, I’m also using Application Loader.

2 Likes

@Pkeod I’m just now (yes, 8 months later) putting Labyrinth up on the App Store; I uploaded a build to iTunes connect and it shows up and all that. However, when I install the .pkg locally the application fails to open with the very minimal ‘The application “Labyrinth” can’t be opened.’ Should I worry about this, or will it work fine in the App Store?

1 Like

If I remember right you should be able to install and run the version you would upload locally if you have the right certificate files installed but I’d have to go through the process again to say for sure. Is the game live right now or under review?

2 Likes

Gotcha. I need to fix the UI for 16:10 aspect real quick (designed it for 16:9 and didn’t make it flexible, yikes… first game…) so I haven’t submitted the final build yet. I’m doing some web dev work right now, once I’ve got that taken care of I’ll have some time to submit Labyrinth for review. Review times for Mac apps are hovering around a day right now so I’m not too worried if something comes up and I have to fix it.

1 Like

Glad to see you back! Hope you make more games with Defold too!

2 Likes

Thanks! I’m hoping somewhere in the upcoming really busy summer I’ll have at least a little time to do some gamedev.

1 Like

Did you ever publish your game on Mac App Store?

I’m currently trying to get latest version to codesign properly. It’s supposed to be able to work on guest accounts, but it doesn’t, which makes it fail app review.

1 Like