Information Technology Reference
In-Depth Information
You might think this means that Xcode attaches a public key to your builds, but the process is much more com-
plex, and it involves the interaction of your key, a master Apple key, software permissions, hardware access per-
missions, and app-specific permissions, included in a selection of different files.
You begin by generating a digital key, with public and private elements. You use the public key to create devel-
opment and distribution certificates that include your key and add a further layer of permissions. Then you in-
stall the development and distribution certificates in your keychain. This also installs them in Xcode.
Xcode uses the two generated certificates as signing identities. This is because team development can support
many separate identities for testing—one for each developer—but only a single identity for distribution.
Team management adds an extra level of complication to code signing. Apple's team management features allow
lead developers to control which team members are allowed to test on hardware. They also limit distribution
privileges to the team leader—also known as the team agent.
If you're a solo developer, the team management features are irrelevant because you're leader, agent, and con-
tributing developer. Unfortunately, there's no way to bypass these extra features. So for solo developers, the pro-
visioning process includes significant extra overhead you can't ignore.
To download the developer and distribution profiles, you upload your unique digital key as part of a Certificate
Signing Request (CSR). The Provisioning Portal then asks the team manager (or you) to accept or decline the re-
quest.
If the request is accepted, the Portal generates the requested certificate, and you can download and install it. If
the request is declined, nothing happens.
By default, debug builds are already set up to include the development profile. Release builds aren't, and you
must modify the Xcode build settings to include your distribution profile before you can upload an app to the
App Store.
CAUTION
The two profiles are mutually exclusive. You can sign a build with one or the other, but not both. This means you
can't run a final distribution build on your own hardware or in the Simulator. Xcode is deliberately set up to make
this impossible. This means there's no final preflight test for App Store app loads. You must debug and test your
app, create an App Store build, and hope it works—because you can't run it to be sure.
One further source of confusion is an extra certificate, known as the WWDR (World Wide Developer Relations)
intermediate certificate. You must download and install this certificate to guarantee that your developer and dis-
tribution certificates are valid. This isn't a difficult step, but it adds one more possible source of error.
Certificates are only part of the process. You also must create separate provisioning profiles to manage device
and application permissions. Development provisioning profiles enable hardware testing in Xcode. When Xcode
has a valid development certificate and a valid device provisioning profile for a device, you run and debug your
code on that device.
Distribution provisioning profiles are used to control access to distribution channels. An App Store distribution
profile gives you permission to upload an app to the store.
Search WWH ::




Custom Search