Max Standalone in the Mac App Store (2018)
Josh Stovall
Oct 20 2018 | 6:38 pm
Max Standalone in the Mac App Store (2018)
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.
PART 1 | APPLE DEVELOPER PROGRAM
STEP 1: Enroll in Apple Developer Program
https://developer.apple.com
cost $100 per year
STEP 2: Create Certificates
https://developer.apple.com/account/mac/certificate/
Create certificates
- Mac App Distribution
- Mac Installer Distribution
TUTORIAL VIDEO
STEP 3: Create App ID (aka Bundle Identifier)
https://developer.apple.com/account/mac/identifier/bundle
Apple recommends “reverse domain notation"
example = com.website.appname
STEP 4: App Store Connect
https://appstoreconnect.apple.com/
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
Update inspector
- 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 4: Enable Quit on Window Close
Paste this into your main patcher window. This will make your application quit (⌘+Q) automatically when the main window is closed.
Max Patcher
In Max, select New From Clipboard.
In Max, select New From Clipboard.
STEP 5: Build Standalone Application
File > Build Collective / Application…
- File Format : Application
- Save to Desktop
STEP 6: Create Custom Icon
Use Image2Icon
- export ICNS file
- name your .icns file "APPLICATION.icns"
(APPLICATION = your app's name)
- replace existing .icns file @ /Contents/Resources/Max.icns/
(Max.icns --> APPLICATION.icns)
PART 3 | EDITING FILES
At this point, I removed the following files. They caused issues with submission, and my app worked fine without these files. (this is one thing, i’d love to figure out for an updated guide)
/Contents/Frameworks/libmozjs.dylib/
/Contents/Resources/MaxPlugInScanner/
(only needed if your app uses the vst~ object)
STEP 1: Update main Info.plist
Update Info.plist to reflect your app’s info.
Show Package Contents > Contents > Info.plist
Update existing rows:
- Get Info string
- Icon file
- Bundle identifier
- CFBundleLongVersionString
- Bundle versions string, short
- Bundle version
Add new rows:
- Application Category
- Minimum system version
(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
Open Xcode
- 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
EXAMPLE
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”.
EXAMPLE
Key : com.apple.security.device.bluetooth
Type : Bootlean
Value : YES
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)**
EXAMPLE
Key : NSMicrophoneUsageDescription
Type : String
Value : Used for pitch analysis and audio recordings
List of all usage descriptions HERE
PART 5 | Code Signing
Specifics will vary based on the frameworks/extensions/externals used in your application.
STEP 1: Codesign every .framework file
EXAMPLE codesign -f -s "3rd Party Mac Developer Application: Company Name (XXXXXXXXXX)" ~/Desktop/APPLICATION.app/Contents/Frameworks/MaxAudioAPI.framework/versions/A --deep
STEP 2: Codesign every .mxo file
EXAMPLE codesign -f -s "3rd Party Mac Developer Application: Company Name (XXXXXXXXXX)" ~/Desktop/APPLICATION.app/Contents/Resources/C74/externals/mididrivers/coremidi.mxo --deep
STEP 3: Codesign App (w/ entitlements)
codesign -f -v -s "3rd Party Mac Developer Application: Company Name (XXXXXXXXXX)" --entitlements ~/Desktop/entitlements.plist ~/Desktop/APPLICATION.app
STEP 4: Verify Signatures & Entitlements
verify .app signature codesign -v ~/Desktop/APPLICATION.app
verify .exe signature codesign -v ~/Desktop/APPLICATION.app/Contents/MacOS/APPLICATION/
verify app entitlements codesign -d --entitlements - ~/Desktop/APPLICATION.app/
Resource Fork
Use if you receive an error message about a “resource fork" while signing. I needed to run this command, I believe it had something to do with the Max.icns file.
xattr -lr ~/Desktop/APPLICATION.app xattr -cr ~/Desktop/APPLICATION.app
PART 6 | Upload to App Store
STEP 1: Build & Sign Installer Package
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
/Macintosh HD/Users/username/
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!
SIMILAR RESOURCES
Your Max Standalone on Mac App Store (Cycling 74)
Mac Platform Information for Standalone Applications (Cycling 74)
Making A Slick Max Standalone (Dan Nigrin)
My own summary on submitting a standalone Mac App (Max Forums)
Digitally sign a standalone on Mac with an Apple developers ID (Max Forums)
max standalone crash on mac 10.8.2 after codesigning with entitlements (Max Forums)