This article outlines how to create a final executable package for the macOS Desktop target. You must have set up your macOS target correctly before continuing. For more information see:
When it comes time to create your final executable package for your macOS project, you will first need to make sure that the Game Options are correct before continuing. The most important things to do are to make sure that you have an appropriate App ID in the Game Options (although all the details for the different tabs should be filled out too), and you'll then need to decide what kind of executable package you want to build:
- For Steam
- For the Mac App Store
- For general distribution
- For testing
We'll now explain the process for each of these different options.
Steam
To build a package for Steam you must first have made sure that the SteamWorks SDK is installed and visible to GameMaker Studio 2. This is done from the Preferences > Platform Settings > Steam:
Once that is done, you will need to go to the Game Options > General and add in the App ID for your game project (as listed in the SteamWorks control panel):
Then go to Platform Settings > macOS > General section and tick "Enable Steam":
Finally, you must ensure that you are not building an app for the Mac App Store. This is ensured by un-checking the Build For Mac App Store checkbox in the Packaging section of the macOS Game Options:
Once that is done (and once you have filled out the rest of the Game Options details), you can then build an executable for the Steam platform.
When you click the Create Executable button on the toolbar, you will be prompted to give a save location for where you want GMS2 to save your .app.zip file.
Once the .zip has been created, it will need to be “notarized” (US English) via Apple’s servers before you will be able to test this application or send it off to Steam. For more information on this process see : macOS : Notarising Your Apps
Once it has been notarized, you can then upload it to Steam in the usual way. For more information see : Uploading to Steam
Mac App Store Testing and General Distribution
Regardless of whether you want to build a test app or a final executable, the first thing you will have to do is build your Archive file. If you want to build an archive for the Mac App Store, then you will need to check the box in the Game Options to enable this, as well as select the appropriate permissions:
If the project is for testing or for distribution outside of the Mac App Store, then you should leave this unchecked.
IMPORTANT! Projects that are built for the Mac App Store will only use the gamepad API if the connected controller is an official Apple "Steel" series controller, so make sure your projects for the App Store can work with keyboard/mouse only as well as controller.
Now you need to build the archive file by clicking the Create Executable button in the IDE. You can choose to build your file as a .dmg installer or just as the game application wrapped up inside a .zip. You will then be prompted to choose a save location on your PC or Mac for the created files and then the build will commence. When finished, one of two things will happen:
- If you have built using the VM then you will now have your final executable for Mac, ready for distribution or uploading to the store. The VM does not open Xcode and will automatically sign your app for you, and you can then upload it to the app store using Apple’s Upload tools or distribute it how you choose.
- If you are building using the YYC, then your app project will be pushed to Xcode and you should follow the next set of instructions below.
If you are building for the Mac App Store, then before you go any further you need to make sure that you have created an App Listing on the store. You can find information on how to do this from the following Apple Developer page: Add An App To Your Account Once you have this set up and awaiting submission then you can continue with the build process.
VM Builds
Once you've created your executable, you can upload your build to the App Store using one of Apple’s Upload tools.
You can find more information about uploading builds to the App Store from the following Apple Developers Page : Uploading builds overview.
YYC Builds
When you build using YYC, Xcode will automatically codesign your app and assign it an Xcode managed provisioning profile:
NOTE: You are still able to manage certificates on your Apple Dev panel (which may be preferable if you're part of a team and don't want to keep revoking each other's certs), but for most things it's safe to just let Xcode manage signing.
You now need to build it and archive it in Xcode. This is done by going to the Xcode menu and selecting Product > Archive.
When the archive has been built, the Archive Organiser will open (this can also be opened by going to Windows > Organiser) and you can see your built app there.
Here you can choose the Distribute App option, at which point you will be prompted to choose a Distribution Method:
- For apps you want to distribute through the App Store, select the Mac App Store option.
- For apps that you want to distribute outside of the App Store, you need to select the option Developer ID (see here for more information).
- For apps that you want to test on registered devices, you need to select the option Development (see here for more information).
After selecting one of the above you will be presented with the option to either Upload or Export. What you choose will depend on what you want to do - upload to the store or export for manual distribution. After selecting one of these options you will have to choose the developer ID to sign the app with (we recommend that you use the Automatic option).
Finally, you will be shown a window with a summary of the package being created:
You can now click on Upload / Export option to create the final executable package for your project. When finished your project is ready to submit for publishing.