Submitting to the App Store is a pretty hefty task. While submitting Gyra, I sort of documented as much of the process as I could. This is not by any means comprehensive, as I omit a lot of details about iTunes Connect. However, I hope that this will still be sort of a helpful guide in submitting Unity games to the App Store. Best desktop app for twitter mac.
This guide presumes that you already exported your game to iOS from Unity’s Build Settings. This creates an Xcode project you may have to tinker with later. You must also be subscribed to the Apple Developer Program (which is $99 a year for individuals).
Make A Distribution Certificate
With a few button presses, the Unity editor compiles all the variations of Nevermind we currently support from a single project folder. Thus, the ideal solution for us to support an OSX App Store variation of Nevermind was to integrate it into the existing automated build process. It was a challenge, but one we were, thankfully, able to solve. How to build and play your VR App. Once everything is inlace, you can press the Play button and run your VR App in realtime. Press the Play triangle. Select a screen resolution that will run on the HTC Vive (Such as 1650 x 1050). In Unity click on Build Settings / PC, MAC & Linux Standalone / Select Target Platform as MAC OSX / Select Architecture as Universal / Uncheck Development Build. Click on Player Settings on the same window / and Under Resolution and Presentation make sure 'Mac App Store Validation' is checked.
Certificates are used by Apple to sign your app, thus identifying you as the developer. Certificates are tied to a computer and there are multiple kinds (like for development and for distribution). Deadline apps android mac. The following procedure is for getting a certificate to submit to the App Store: Mac fluid app documentation.
Unity Build Mac App
- Login to your Apple Developer account and go to Certificates, Identifiers & Profiles.
- Press the button on the top right corner.
- There are many types of certificates. For a distribution certificate, select App Store and Ad Hoc and press Continue.
- It will tell you to create a Certificate Signing Request. You will eventually send this CSR file to Apple, which in effect is like asking Apple for permission to distribute your app. The certificate itself is the granted permission to distribute. Click continue.
- Open the Keychain Access app on your Mac (remember that a certificate is tied to a Mac, so you can only distribute from the Mac with an installed distribution certificate).
- Go to the menu Keychain Access ▶ Certificate Assistant ▶ Request a Certificate From a Certificate Authority…
- Provide your email in User Email Address, and your name in Common Name. Do not fill out CA Email Address.
- Select Save to disk and click Continue
- Save the file
CertificateSigningRequest.certSigningRequest
in a convenient directory (like theDesktop
folder, for example). - Back on the Apple Developer site, you should see the field Upload CSR File. Drag and drop your
.certSigningRequest
file onto the button that says Choose File, then click Continue. - Your certificate should be ready. Download it and double click on it. Xcode should open, and the certificate should be installed (it won’t give you any confirmation of that, unfortunately).
Make App ID
An App ID is a unique identifier for each app on the App Store. Typically, this ID is based off your app’s Bundle Identifier (that can be found in your Xcode project’s settings).
- To make an App ID, go back to the Certificates, Identifiers & Profiles section of the Apple Developer site, and click on App IDs on the left side.
- Press the button in the top right corner.
- Enter name for your App ID. This is typically the name of your app.
- Select Explicit App ID, and provide a Bundle ID (it must be the Bundle Identifier of your app in the Xcode project’s settings). Click Continue.
- Click Register, and then click Done.
Distribution Provisioning Profile
A Provisioning Profile is kind of like a “package” that ties your certificate (your computer) to your app, and your testing devices (for development or ad hoc profiles). Provisioning profiles can authorize running an app on a test device (development) or for submitting it on the App Store (distribution). The following instructions are for making a Provisioning Profile suitable for submitting to the App Store:
- Back to the Certificates, Identifiers & Profiles section of the Apple Developer site, and click on Provisioning Profiles on the left side.
- Press the button.
- Select App Store and click Continue.
- Select the App ID you just made from the drop down menu, and click Continue.
- Select your distribution certificate and click Continue.
- Now name your Provisioning Profile. Choose something very specific. I personally chose
GyraiOSDistributionAppStore
. Click Continue.
- Download the Provisioning Profile and double click it. It should install, but you will not get confirmation for that.
You may have to repeat these same steps for a Developer Provisioning Profile (which allows testing locally in your device). You would select iOS App Developer instead of App Store when choosing the type of profile. You may also have to provide mobile device UDIDs to allow testing (Xcode might take care of this for you, if you plug in your device to your Mac while Xcode is open).
Setting up the Xcode project with the Provisioning Profile
- Back in Xcode, go to project settings. Make sure that you select the app target
- Uncheck Automatically manage signing
- For all Release Signing sections, provide the Distribution Provisioning Profile.
- For Development Signing section, provide a Developer Provisioning Profile. (Note that if this doesn’t work, change it to the Distribution Profile instead.)
- Now go to the Product menu and select Archive. It should build a package that is ready for submission to the App Store.
- If archiving fails, try changing the Signing (Development) section to use the Distribution Provisioning Profile.
When it’s done, it will load a window called the Organizer where you can validate and upload your app.But first, Apple needs to have a record for this app on iTunes Connect before you can upload it to the App Store.
New app on iTunes Connect
- Login to iTunes Connect (you must be a paying developer), and go to My Apps.
- Click on the button and select New App.
- Fill out the form provided. Check iOS. The Bundle ID is the App ID we created. The SKU is a unique ID; try giving it a relevant name. It may possible be taken though, so come up with something very unique.
In my case, it was the app name that was taken. This is the name that shows up on the App Store. It also must be unique like the SKU. I changed mine to add a little more detail. Press Create when you are done.
Submitting Build to iTunes Connect
- Go back to the Organizer in Xcode.
- Go to your app archive and validate it first.
- It will ask for your Distribution Provisioning Profile before continuing.
- If validation fails, resolve any issues mentioned and try again.
- Once validation succeeds, click Upload to App Store…
Note that Apple does some processing on your uploaded build before you can choose it on iTunes Connect. You may have to wait for an hour or more.
Prepare App Submission
Apple will send you an email when they have finished processing your uploaded app.
- Once that happens, go to iTunes Connect ▶ My Apps.
- On the App Store tab, fill out all of the required information needed for app submission. There is too much of that to cover here, but it should be easy to figure out.
- You will need at least 2 screenshot: one for a 5.5” iPhone and the other for a 12.9” iPad. You typically get screenshots by running the app on an iOS Simulator and pressing
Command + S
. - App Previews are basically video previews of your app that autoplay in the App Store. Apple has a good reference about making App Previews here. However, I must warn that you need a 5.5” iPhone (any “Plus” sized iPhone) and a large iPad (9.7”+ suffices) in order to have the necessary App Previews needed for the App Store. Fortunately, App Previews themselves are not required when submitting an app.
- On the Prepare for Submission page, scroll down to the Build section and you should be able to select the build you recently uploaded. If you want to make newer builds later, don’t forget to increment the build number and version number in the Xcode project’s settings.
- After you have filled out everything, click Submit for Review towards the top of the submission page. Apple will soon review the app for approval.
If Apple emails you saying they they approve of your app, it may still take about a day for it to actually show up on the App Store.
中文 | English
This blog records how to setup and config the application bundle which will be submitted to the AppStore or Steam by using the CLI tools. Mostly, we use XCode for developing iOS and macOS applications, which automatically handles the code signing and configurations. But when exporting an app bundle from Unity Editor, we have to do this work by using command line tools that are provided by Apple.
In the begining, let’s get some preliminary knowledege about the
CodeSign
and Distributions
. Or you can just skip this part then jump into the process parts.Submit to Steam store or third-party distribution
Submit to macOS AppStore
Submit to macOS AppStore
Bundle Config and Code Signing
Basic Concepts
Apple provides code signing tool which is called
codesign
. In general, the execuatable application in macOS system presents as a folder that has name with .app
suffix. It’s different from windows. So for signing the app become more complicated, because we are facing a bunch of files not just a single .exe
file.Designated Requirement(DR)
Every application requires a Designated Requirement(DR) when code signing. The DR is identified by the bundle’s BundleID.
Resource envelope
CodeSign tool will process all sourcefile and non-sourcefile. Every file calculates a hash string, then combined these hashes into a final hash value which will be attched to the application bundle.
Any modification apply to the signed files will change the hash that belonging to this files, and obviously affects final hash. By using this method, other security programs can verify the identity and integrality.
The concept for files signature data is call
Resource envelope
.Resource envelope has two versions, the latest v2 version will check all the files inside the bundle. Why aren't my itunes apps opening on mac computer. After OSX Mavericks 10.9, all app use the v2 version.
Even if we didn’t touch the bundle file, any extra file added to the
Game.app
bundle folder, will casue the bundle codesign verification failed.Process application bundle
Modifiy the BundleId
Directly open the Plist file
Game.app/Contents/Info.plist
change the value of key CFBundleIdentifier
。Remove useless files
Unity Edtiro always genereate
.meta
files for all the imported macOS library. These .meta file were placed at illegal path for application bundle. And causing the codesign process failed. We must delete them.CodeSigning
Signing Third-party libs
Apple requires all the libraries must be signed before submiting to AppStore or Notarization.
All libraries include
.dylib
.framework
and .bundle
.When submiting to AppStore, the third-party libs must be signed by current
Apple Developer
, even if them were codesigned or not. Which means that we also need to codesign the common shared libs such as libssl.dylib
.Entitlements Files
Before use codesign tool, we need to create
.entitlements
file. Xcode usually create them for us, but now we are using CLI tools and tackling with exported binary file, don’t we? The entitlements file which used for AppStore submission differ from the Steam one.The minimal configurations are provided below, other key/value pairs must be added if there have other capabilities.
For macOS AppStore
For Steam
CodeSign Tool
codesign command for signing a single file
Parameter sign should be filled with the name of certificate. Like
Mac Developer:XXXXX(TEAMID)
. Codesign tool will search all the certs in user’s keychain, find the correct one. Throwing error when found multiple certs match the inputs.Command for verification the codesign status.
Success with these outputs.
Unity Mac Build On Windows
Submit to SteamStore and non AppStore distribution
The binary app which submitted to SteamStore must be notarized by Apple, otherwise the program will be blocked by GateKeeper when user try to launch the app.
Cla guitars plugin free download. The specified notarizing docs from Apple Notarizing macOS Software Before Distribution
Generate Certificate
First step is creating a certificate. Signin to the Apple Developer website then generate a
Developer ID Application
cert.Only the account holder of the developer team can create this
Developer ID Application Certificate
,even if the user have admin permission role. Just like any other developer cert, export a CSR file from keychain tool, then upload for swapping a .cert file. Trinus vr serial key free.Bundle preparation
Now we have a
Game.app
binary bundle, and a Developer ID Application Certificate
. But before signing, bundle needs to be preprocessed.Following the instruction of first part Process-application-bundle.
- delete all
.meta
file recursivly inside theGame.app
folder. - Create
Game.entitlements
file as informed. - Modify
Game.app/Contents/Info.plist
if needed.
Fix SteamLib
Most of developer use third-party Steamworks Librlabrecque/Steamworks.NET with Unity, because the VALVE didn’t provide the C# version SDK。Before codesign we needs some patches。
The lib file of
rlabrecque/Steamworks.NET
is Steam_api.bundle
.- Steam_api.bundle contains an invalid CFBundleIdentifier:
com.rileylabrecque.steam_api
. Change it tocom.rileylabrecque.steamapi
in the filesteam_api.bundle/Contents/Info.plist
。 libsteam_api.dylib
contains 32bit symbols. We only use 64bit symbols, delete it with commandlipo -remove x86_64 libsteam_api.dylib -o libsteam_api.dylib
.
No we have successfully processing the Steamwork library. These rules are also demanded with the other libraries. You should apply the patches if there exist. Download macos high sierra without a mac.
CodeSigning
The instruction of apple developer doc recommands that codesign all libs before signing the final bundle. https://treefrenzy829.weebly.com/blog/open-source-download-manager-mac. Using
--deep
parameter does not guarantee the correctness with nested libraries. It’s just for codesign patching after file modification.I just write a simple bash script for codesign command execution.
- Sign all libraries
$BINARY = ‘Game.app’
- CodeSign final application bundle
Emphasis:
--sign
parameter will automatically match, just input “Developer ID Application:”.Submit to Notarization
- Zip archive the bundle before notarization
Warning: We should use the command
ditto
for archive the budnle, use zip
cause the missing of signature infomation2.Submission
Now we have the ziped bundle. It’s time for notarization.
Parameter
asc-provider
requires ProviderShortname
.It’s commonly equals
‘Apple Developer/Membership/Team ID’.
Team ID
which can be found at‘Apple Developer/Membership/Team ID’.
But unfortunately, my apple developer account is pretty old. These are not equal.
Don’t worry, apple provide the tools for quering the
Don’t worry, apple provide the tools for quering the
ProviderShortName
.If everything gose well, we may get a
RequestId
like ‘1809fca2-XXXX-XXXX-XXXX-14aa62f6XXXX’. Avast best for mac.With this ReqId, we can query the result of notarization. It needs about 5mins for apple server processing the notarization. Maybe longer depends on the file size.
When processing finish, Apple will send an email to your developer ID.
If the notarization failed, all erros can be find by check the log file.
If the notarization failed, all erros can be find by check the log file.
- Staple App bundle after notarization
Please keep in mind that we can’t staple with
Staple only apple to app bundle. When staples successfully, zip the
Game.app.zip
file.Staple only apple to app bundle. When staples successfully, zip the
Game.app
again, then we can submit it to the user or SteamStore.Submit to macOS App Store
Certificate Creation
Two different certificate are required when submit to macOS AppStore
- Mac App Distribution Certificate
- Mac Installer Distribution Certificate
Mac App Distribution Certificate
is used for bundle CodeSign
.Mac Installer Distribution Certificate
is used for pack bundle then uploading to itunes server for review.Bundle Configuration
Same as Submit-to-SteamStore-and-non-AppStore-distribution
- delete all
.meta
file recursivly inside theGame.app
folder. - Create
Game.entitlements
file as informed. - Modify
Game.app/Contents/Info.plist
if needed. - Process third-party libs
- CodeSign all libs. (use
Mac App Distribution
) - CodeSign Game.app. (use
Mac App Distribution
)
Generate .pkg file
After codesign, we need to pack
Game.app
into Game.app.pkg
.Use
productbuild
toolUse AppLoader for uploading
Now we have
Game.app.pkg
bundle which is permitted for uploading.![Mac Mac](/uploads/1/3/4/2/134281003/575291513.png)
It same process like iOS developement. use application loader tool for uploading to itunes server. Due to the removal of GUI version ApplcaitionLoader with Xcode11,
we can only submit with command line use
we can only submit with command line use
xcrun altool
.- Verification before submission
Tips:
xcrun altool --validate-app
will not found all the erros, because apple itunes server will do the more stricter validation.- Uploading
If get some output like
no error uploading package
,means upload successfully.Apple will also send an email when validation failed. Like this:
App Store Connect: Your app 'XXXXX' (Apple ID: 123456789 Version: 1.0 Build: 0) has one or more issues
But if the validation got through, no email sent. Remember to check the itunes connect dashboard.
Fix all the errors that apple email mentions. After solve the errors, the process steps of codesign->pkg->upload must be executed completely. Do not forget to increse the build version number.
Every uploading task requires different build version number.
Every uploading task requires different build version number.
FAQ
I just list some common errors.
- ITMS-90303: Unable to Sign
code object is not signed at all In subcomponent: PATH_TO_THE_FILE.
Delete these files before codesign.
Delete these files before codesign.
- ITMS-90238: Invalid Signature
Some libs are not signed, or signed with incorrect cert.
- codesign throw error: CSSMERR_TP_CERT_REVOKED
The certificate is out-of-date, download the new one.
- codesign 提示 errSecInternalComponent
If you do the
codesign
or productbuild
via ssh, you should unlock the keychain with CLI. Because some process require user password to unlock the keychain. There is no password dialog pop up when these program request an access to the keychain.Unity Mac Download
Reference
Unity Manual: Delivering your application to the Mac App Store
gist:how-to-notarize-unity-for-macos.md
Notarizing macOS Software Before Distribution
Technical Note TN2206:macOS Code Signing In Depth
gist:how-to-notarize-unity-for-macos.md
Notarizing macOS Software Before Distribution
Technical Note TN2206:macOS Code Signing In Depth
Unity Mac Build Support
Thanks for reading, If there are any mistake or question, feel free to leave a comment below.