Mac programs have a slightly different upload to iOS, because the Mac app can be uploaded to the store or not through the store for download. As a result, code sign and provision are made according to the situation (development, release<store or non-store>). After the program is packaged, the feasibility of verifying the program is also different. Below, we will record some points.
Basic concepts:
1 Members ' permissions:
There are three types of members:
Agent: Registered account, the highest privileges, you can create Developer,mac Installer,mac app, developer ID app, developer ID Installer certificate.
Admin: Can create Developer,mac installer,mac app Certificate
Member: Only developer certificates can be created
2 Certificate:
Development:
Development certificates that members of the team can create, as long as they are used in the development phase, popular for debug version development
Distribution:
(1) App Store:
To put the app on the store, you'll need to create a Mac app and a Mac installer certificate. Mac app is mainly used to upload to store, installer is uploaded to the store before we simulate the real store environment
(2) Developer ID:
Apple allows developers to spread apps on their own, using a developer ID certificate, as well as apps and installer two of them. Note that this certificate can only be created by an agent and only one team.
The way to generate certificates is the same as under the iOS, but also according to the official website of the prompt step-by-step operation, not much to say.
3system
Register the computer's hardware number under
4APP IDs and provision
This is the same as iOS, follow the instructions on the page. Provision is made and dragged into Xcode, developer provision is also installed on the computer. When creating an app ID, consider whether you need icloud, and APNs. It is recommended that you configure all of these to create provisions. If you modify the app ID, you will have an effect on the previous provision. If you really need to modify the app ID, it is recommended that you delete the old provisons (including the installed files on your computer and Xcode), and then install the new provision. In addition, the developer Provison can be installed on the computer (because it contains system information), production can only be installed in Xcode.
By the way. Provison and ID, certificate, diagram between system:
In addition, sometimes after downloading the certificate and adding it, there will be no key in keychain, stating that there is a problem with the certificate. The situation I encountered is generally caused by the installation of multiple certificates, which is generally done through the revoke certificate and then re-create the solution.
The following are the main signs of uploading to the store app, explaining the steps, resources from the official documentation.
Before uploading, make sure that you have generated a certificate for your Mac app and installer and are ready to production provisions.
In addition, there are some preparations for the program itself, such as setting up the app Icon,deployment target, and so on, as with the iOS app. Since we're uploading to the store, we have to enable the sandbox.
Because the sandbox's authority is controlled by entitlement, so
The options under Network,hardware,apps are selected according to the requirements, and the corresponding key values are automatically generated in the corresponding entitlement file after selection.
Next select target, select the appropriate provisons under Code sign (note the selection under Debug and release). If you don't see the Xcode option after installing provision, you can restart Xcode.
Before archive make the installation package, we confirm that the following schema is set correctly:
The configuration of the archive must be release.
Next we will choose Xcode under the Archive function, the completion will pop up Organizer-archives window, the right has a distribute button, click:
1 Submit: Upload to the store, remember to create the appropriate app in itunes Connect, then choose Next, and the next thing is to Xcode.
2 Export Developer: This is not on the store distribution
3 Export as: There are 3 options.
Before uploading to the store, we must test the installation process to ensure that the program is installed correctly. At this point we can choose Export as Paskage, generate an installation package, note this time to select the Insaller Certificate: Start with your team name, under "Identities without profiles". Then use the following command:
sudo installer-store-pkg path-to-package-target/
(-store is a simulation installed from the App Store)
The generated app is installed under/application and can be viewed on its own.
After running the test, you can submit it to the App Store.
Go Mac app distribution in app Store