I have successfully submitted my app to the Mac App Store. Yes it is possible! There seems to be a lack of updated information on this topic, so I have created this guide in hopes of helping out the community. It is important to note that this process will vary for every app, based on which externals/frameworks/extensions are present. You WILL get error messages the first time you submit your build to App Store.
STEP 4: App Store Connect
Create a profile in App Store Connect for your application.
This is where you edit how your app’s display page will look within the App store.
PART 2 | STANDALONE PREPARATION
STEP 1: Edit main patcher inspector
View > Inspector Window
- Disable Workspace [X]
- Open in Presentation [X]
STEP 2: [standalone] object
create a [standalone] object in your patch
- open [standalone] inspector
- update "Bundle Identifier" to match your Apple App ID (com.website.appname)
- update "Preferences File Name"
- Can't Close Toplevel Patchers [ ]
- Disable Loadbang Defeating [X]
- Status Window Visible at Startup [ ]
STEP 3: Reducing File Size with [standalone]
To reduce file size, you may uncheck CEF Support, Gen Support, and Include C74 Resources. However, these can be essential for certain functions (ie. Gen Support is needed if your app uses [gen~], CEF Support is needed if your app uses [jweb]).
When in doubt, try your standalone with and without. My app worked fine with all of these unchecked. And the file size dropped from 315MB to 65MB. (More info HERE)
STEP 2: Add bundle identifier to every Info.plist
Yes. Every file that contains a Info.plist, must be updated. However, all that is necessary is to add your Bundle Identifier. Simply, search info.plist in your application’s folder, and copy-paste the Bundle Identifier row from your main Info.plist file.
*For (MSPReWireDevice.bundle) - replace the existing Bundle Identifier, rather than adding a new one*
STEP 3: Edit .mxo files that contain (~) or (_)
Any .mxo file that contains one of these characters in its name, needs to be edited.
for each .mxo file :
Show Package Contents > Info.plist
Remove (_) or (~) from Executable string
Remove (_) or (~) from CFBundleLongVersionString
You must also rename the .exe file within each .mxo to reflect the name change.
*HOWEVER, do not remove (_) or (~) from the actual .mxo file name*
PART 4 | SANDBOXING
STEP 1: Create Entitlements File
- File > New > File > MacOS > Property List
- name “entitlements.plist"
- save to Desktop
STEP 2: Add Sandboxing Row
To create strings
-hover over “Root”
-press the (+) to add rows
-create sandboxing row
Key : com.apple.security.app-sandbox
Type : Bootlean
Value : YES
STEP 3: Add Entitlement Keys
Entitlements tell Apple which files/features your app has permission to access on the user’s computer. For example, if your app uses bluetooth, you must add the string “com.apple.security.device.bluetooth”.
Key : com.apple.security.device.bluetooth
Type : Bootlean
Value : YES
List of all entitlements HERE
Example entitlements.plist file can be found HERE
STEP 4: Add Usage Descriptions
Certain entitlements also require a usage description. This is basically a note that the user will see when the app asks for permission to access any "sensitive user or device data" such as the microphone, camera, or bluetooth. Be sure to review the list of entitlements that require a usage description.
**These go in your main Info.plist (NOT entitlements.plist)**
Key : NSMicrophoneUsageDescription
Type : String
Value : Used for pitch analysis and audio recordings
productbuild --component ~/Desktop/APPLICATION.app /Applications --sign "3rd Party Mac Developer Installer: Company Name (XXXXXXXXXX)" --product ~/Desktop/APPLICATION.app/Contents/Info.plist APPLICATION.pkg
this creates a .pkg file in your user folder
Step 2: Upload .pkg to Application Loader
- Open Xcode
- Xcode > Open Developer Tool > Application Loader
- Upload your .pkg file
Step 3: Review Errors -> Resubmit
After submitting your app package, you WILL receive errors. Let the trial and error begin!
Please comment below if you have any questions about the process!
This is a great resource! Thanks Josh for posting it.
Well done Josh! As one of the co-authors of the original "Your Max Standalone on the Mac App Store" document that you link to above, I've been meaning to update it as SO much has changed since we originally wrote it - but you beat me to it! Very nice and comprehensive as well, great work!
Part 2, Step 1: Should definitely include info about unchecking CEF Support, Gen Support, and Include C74 Resources if they are not needed. CEF Support in particular adds a huge size to your application, and Including the C74 Resources adds a ton of work in the subsequent steps that could be minimized by not including them.
Part 2, Step 3: Although your approach works (naming the app icon as "Max.icns"), it's a bit abnormal to have a Mac application whose bundled icon file is not named "APPNAME.icns", where APPNAME equals your app name. So best to name it appropriately, and then when building your standalone app within Max, use the appicon command in the build script.
I've been successful in getting the libmozjs.dylib library included by simply codesigning it in the subsequent steps. This was as recently as early this year (2018) - not sure if you tried that or whether something's changed with Apple (which is always possible!). Here's the example command I used for that recent app:
codesign -f -s "3rd Party Mac Developer Application: Daniel Nigrin" /Users/dnigrin/Desktop/My-App.app/Contents/Frameworks/libmozjs185.dylib --entitlements /Users/dnigrin/Desktop/My-App.entitlements
Also in general - I can't emphasize enough the importance (to minimize subsequent headaches) the removal of files you don't need from the application bundle. For example, in a later section (Part 5, Step 3), you show the need to codesign the MaxPluginScanner executable. Well, if your app doesn't use plugins (i.e. the vst~ object), you can safely remove that file and not worry about codesigning it. Same goes for lots and lots of other files - in particular are the many .mxo files within /Contents/Resources/C74/extensions/
Part 5, Step 3: In my experience you don't need to codesign the actual entitlements.plist - that file never gets sent to Apple either.
Part 6, Step 2: In the past I've had trouble uploading to Apple using the "built in" Application Loader. Perhaps this has been fixed now, but I found that I needed to download and use the older standalone Application Loader v3.0, available directly from Apple.
If I spot any other things I'll be sure to mention them - and again, thanks! In addition, I've started to research the things that will be necessary for app Notarization, which will ultimately be required (optional in Mojave 10.14) even for apps outside of the App Store.... See thread I started: https://cycling74.com/forums/apple-notarizing-for-mojave-10-14-and-beyond
Thanks for the feedback ( and for your original tutorial! ) I have updated the post to reflect your suggestions.
Here is the problem I ran into with libmozjs185.dylib
ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (.../Contents/Frameworks/libmozjs185.dylib)]'. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."
Just a couple small but important details from the edits you made to your original post:
* You wrote "To reduce file size, you may uncheck CEF Support, Gen Support, and Include C74 Resources" - but this is only true if those things aren't needed in your App! So obviously if you're using gen you'll need the Gen Support, and if you're using jweb (and maybe other objects, not sure?) you'll need CEF support.
* You changed the part about the .icns file, but you omitted adding the appicon line within the standalone build script in Max. You don't *have* to do that, but then you do need to make a change manually in the Info.plist file, to specify the correct filename for the Icon entry...
For anyone using iCloud drive, don’t try and codesign or package build on your Desktop or in your Documents folder - you will almost certainly end up with ’Finder detritus’ issues, which will cause your package upload to fail...