There is no simple straight forward answer to this question.
First organize all of your package names (Output name, Output file, App ID), and package your .app file with a self signed certificate.
Next create an icon file, create a folder with the following:
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
icon_256x256.png
icon_256x256@2x.png
icon_512x512.png
icon_512x512@2x.png
name the icon folder with the extension .iconset
If you have Xcode installed open the Terminal and enter:
iconutil -c icns “myiconfile.iconset”
produces a .icns file
Make an entitlements file
Examples: outside store
<?xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
At apple store - this is an example you'll need to find what permissions you need
<?xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>
Save it with the .plist extension.
Open .app file (control + click -> View package contents)
Under Resources delete Icon.icns replace with .icns file
** Note: This is from Air 26 so there may be some changes, basically you want to delete files so you don't have to sign them, it also makes your app lighter. The first one must be deleted.
Delete webkit .dylib file at Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/WebKit.dylib
Delete Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/__MACOSX (folder)
Delete Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/Adobe AIR.vch
Delete Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/Flash Player.plugin
Make necesarry changes to your info.plist (this is an example)
- icon name
- <key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>CFBundleVersion</key>
<string>3.3.1</string>
Assuming you have your .p12 from Apple installed with 'Your Name' and your resources are in one folder, open Terminal and navigate to the folder and sign these files:
codesign -f -v -s "Your Name" "Your App.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Adobe AIR" --timestamp
codesign -f -v -s "Your Name" "Your App.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Adobe AIR_64" --timestamp
codesign -f -v -s "Your Name" "Your App.app/Contents/Frameworks/Adobe AIR.framework/Adobe AIR" --timestamp
codesign -f -v -s "Your Name" "Your App.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0" --timestamp
codesign -f -s "Your Name" --entitlements "entitlements.plist" "Your App.app" --timestamp
Again this is from Air 26 so check for changes in the app .
Test entitlements: your entitlements.plist should be displayed in Terminal
codesign --display --entitlements - "Your App.app"
Build .pkg file:
productbuild --component "Your App.app" /Applications "Your App ID.pkg" --sign "Your Name" --timestamp
Test Package installs to Applications folder.
This step is a bit wonky, you need to either delete or compress any files which may contain the entitlements file for your app as they could confuse your system (this includes emptying the garbage).
Also you can run console (found in Application/Utilities folder) with filter sandboxd, which will alert you to any error.
sudo installer -store -pkg "Your App.pkg" -target /
Do not omit the '/'.
Open Xcode and choose Xcode/Open Developer Tool/Application Loader
Upload you .pkg to App Store Connect and finish with your documentation there.