How to Upload Your Game to Apple for Review

Một phần của tài liệu Game Development for iOS with Unity3D 2012 (Trang 237 - 248)

9. Publishing to the iTunes Store 215

9.4 How to Upload Your Game to Apple for Review

Are you sure that your build is stable, reliable, and ready to go? Congratulations! Let’s get your game on its way for review.

In this section, we’re going to go through the entire process of getting your game up onto the iTunes Store. Th is includes setting up a certifi cate and a profi le for App Store distribution and your App Store page details, building your game in a special way suit- able to go off to Apple, and fi nally, validating and uploading the build through Xcode.

Create a Distribution Certifi cate. Th e fi rst step is to create and download a Distribution Certifi cate. Note that this is a Distribution Certifi cate, not a distribution provisioning profi le. Th e certifi cate allows you to generate distribution provisioning profi les, and you will need to have both installed on your development machine to be able to build for the iTunes Store. Th e Distribution Certifi cate only needs to be generated once and it may be used for this and all of your future distribution provisioning profi les.

Enabling automatic device provisioning (Figure 9.2) is the easiest way to manage all of your certifi cates. If automatic device provisioning is enabled in Xcode, your Distribution Certifi cate will be generated automatically. Xcode will create a request, submit it for approval, and download and install the certifi cate on your development Mac. You can view, download, or revoke the Distribution Certifi cate in the iOS Pro- visioning Portal.

y Open Xcode, then open the Organizer window (Window–>Organizer).

y Click Devices at the top of the window, then select Provisioning Profi les in the Library section, to the left.

Figure 9.2. Th e XCode organizer, Provisioning Profi les, and the Automatic Device Provisioning checkbox.

9.4. How to Upload Your Game to Apple for Review 221

y Select the Automatic Device Provisioning option at the bottom and click Re- fresh.

y If prompted, enter the Apple ID and password you used to register for the iOS Developer Program.

y A message stating that no iOS Distribution Certificate can be found will ap- pear. Click the Submit Request button, and Xcode will generate the certificate for you automatically. If this message does not appear, click on the Developer Profile link on the left (under Library) and then back to the Provisioning Pro- files screen. It may take a little while for Xcode to log in to your account and check the details, so be patient. If it makes you feel any better, you can try click- ing the Refresh button if the message still fails to appear after a minute or two.

It should appear without any input from you

It is quite possible to setup certificates manually via the Provisioning Portal of the Apple Developer Center, but I don’t see why anyone would want to do that when Xcode can take care of it for you. If you really want to set up a Distribution Certificate manu- ally, consult the Apple documentation.

Create a distribution provisioning profile. Log in to the Apple Developer Center and click on the iOS Provisioning Portal link on the right of the website.

Click the link to Certificates on the left of the site, followed by the Provisioning tab. Click on the New Profile button to get to the Create iOS Distribution Provisioning

Figure 9.3. Successful installation of a provisioning profile.

Profile screen (Figure 9.3). Here, there are several compulsory fields to fill in. Those are:

y Distribution method. Select the radio button next to the App Store button.

y Profile name. Name the profile appropriately and in a descriptive enough way so that you will be able to recognize it later.

y Distribution Certificate. The name of your iOS Distribution Certificate should automatically appear here. If not, select the correct certificate from the list.

y App ID. This should be the same App ID (the Bundle ID) as the Unity game build (set in the Player settings). The Bundle ID in Unity and this App ID must be the same for the build to work.

Click on the Submit button to create the profile. The new profile should now appear in the list of distribution provisioning profiles, although its status will be “in process.”

Wait a short while before refreshing the page and the status should jump to “active.”

Once the new profile is in an Active state, click on the Download button. Either select it to open it immediately or save the file somewhere convenient.

After the download completes, find the downloaded file and double click it to open it in Xcode. Xcode should show the Organizer window in the provisioning pro- files section. If everything has gone smoothly, the profile should appear in the list with no issues. Note that near the top there will be a message stating, “This profile can- not be installed on devices”—don’t worry, this is the correct behavior. The App Store profile will only be used to make a build suitable for submission to Apple. As this is a special profile for the App store only, there is no need to install this to a device, and if you try it will fail. The App Store distribution profiles do not allow for you to make runable builds.

9.4.1 Setting Up Your Game on iTunes Connect

Before you can upload your binary to iTunes Connect, you need to add an app to the iTunes Connect system. To do this, open the iTunes Connect site in your browser and click on the blue Add New App button.

If you have more than one developer subscription (such as a subscription to the Mac OS Developer Program), you will be given the choice of the type of app you want to create. Click on iOS, if prompted. Next, you will be prompted for information about your app on the app information page (Figure 9.4).

App information page.

y App name. This is the name of your app as it will appear on the App Store. This name can be up to 255 characters, although when it is displayed on the store, it could be truncated, so try to keep your name relatively short.

y SKU number. This is a unique number used to identify your app. There are no guidelines as to what you should put here and it is up to you to devise a system.

The only stipulation is that the number has two digits or more. Unless you have your own system, let me suggest perhaps the easiest system: start at 01 and increment the SKU number every time you make a new app.

9.4. How to Upload Your Game to Apple for Review 223

y Bundle ID. The bundle ID is an identifier used by iOS and Mac OS X to recog- nize any future updates to your app. The Bundle ID drop-down is populated by the app ID’s details from the Developer Portal, and you should select the same bundle ID (the same app ID) that you have been using for development. Refer back to Chapter 2 for a refresh on setting up app IDs.

If you have been using a wildcarded bundle ID, or you haven’t yet made an app ID for this specific app, you should click on the link that reads “You can register a new Bundle ID here” and make one. You will have to re-enter the new bundle ID into the player settings in Unity, however, and rebuild the binary file. (The bundle ID in Unity was covered back in Chapter 3.) If you go ahead and create a new bundle ID, you will need to refresh the app information page before it will show up in the list.

Note that if you do try to select a bundle ID that is wildcarded (one with “*” in it), you will be prompted to add a suffix. To make a build for the App Store, wildcards may not be used and the ID you put into the player settings in Unity must exactly match the one here.

Once you are finished with the App Information page, click Continue to move on to the next screen, where you will tell Apple about the launch date and pricing information (Figure 9.5).

Set the launch date and pricing information.

y Availability date. This is a proposed date for your game to become live on the iTunes Store. If you use the current date, the game will go live as soon as it has gone through the review process and been approved by Apple.

Figure 9.4. iTunes Connect app information page.

y Price tier. If your game is free, select

“free” from the drop-down. Otherwise, click on the link to view the available price tiers and what they mean; then, once you have chosen the one you want, select it from the drop-down menu. To be able to put a paid app onto the iTunes Store, you must have a paid commer- cial agreement in place. You can set up agreements in the Contracts, Tax, and Banking section of the iTunes Connect website.

Click the Specific Stores link if you would like to specify which regions of the world your app will be available in.

Entering the version number, description and uploading the icon and screenshots.

y Version number. Start at 1.0 and go up.

There are several different schools of thought on how version numbers should be incremented. One straightforward and accepted method is to increment the dot number (e.g., 1.1, 1.2, 1.3, 1.4, etc.) whenever you do minor updates or fixes, and increment the major number every time you update something big.

y Copyright message. This should be your name or the name of your company and the current year. The usual format is something along the lines of <name>

<date>; for example, “PsychicParrot Games 2012.”

y Primary and secondary categories.

Choose the categories that are most rel- evant to your game.

y Review notes. Normally, this should be left blank, although if you have anything that may affect the outcome of the re- view you should put it here (for example, if you were unsure as to whether or not a particular feature of your game is actu- ally allowed by Apple’s guidelines).

Figure 9.5. iTunes Connect entering launch, pricing, and store information.

9.4. How to Upload Your Game to Apple for Review 225

y Rating. You must be 100% honest when filling out the rating survey about your content! When your game goes through the review process, the reviewer will have access to all of the game graphics, audio, and other assets. If anything in the rating section is incorrect, your app will be rejected. If the app is approved and a complaint is made against it, there is a very good chance that Apple will take it down permanently.

y Metadata. You can enter the description, keywords, support email address (the address that your customers will use to contact you with technical problems), a support URL (a website for customers to visit who are looking for support), and an optional marketing URL to a promotional website.

y EULA. If you have specific license requirements that are not covered by the standard Apple licensing agreement, you can set up a custom EULA here. You should seek professional legal advice before submitting any custom agree- ments, and there are some minimum terms you need to include. (On this page of the site, there is a link to those minimum terms.)

y Uploads. Icons and screenshots should be uploaded here. See the checklist in Section 9.2 for exact image specifications. Remember to upload screenshots for all platforms. For example, if your game is for iPad and iPhone, then you will be required to upload screenshots from both iPad and iPhone. Failure to do so will result in your app being rejected by Apple.

After filling in all the details and uploading everything for the app description, your app will now appear in the Manage Your Applications section of the iTunes Con- nect website. The initial status for your new app will say “prepare for upload.” This state is presumably there so that you double-check everything before going to the trouble of uploading your build. Before we can upload, we need to move things on from the prepare-for-upload state. Go back in to the Manage Your Applications page of the iTunes Connect site. Click on your app in the iOS App Recent Activity area, then click the View Details button once the app summary page shows.

Read through all of the details you have entered and double-check that everything is as you would like it to be. Once you are completely happy with it all, click on the Ready to Upload Binary button. The site may ask you a question about export compli- ance. The main question is, “Is your product designed to use cryptography or does it contain or incorporate cryptography?” By default, Unity does not contain or incorpo- rate cryptography, and you can answer “no” just as long as you have not significantly modified the Xcode project source to include cryptography. Answer this question and click on the Save button to continue.

The next page on the iTunes Connect site will inform you that you are now ready to upload your binary. Click the Continue button and, on the next page, note that the status of your app should now have changed to “waiting for upload.”

9.4.2 Building in Xcode and Uploading for Review

We’ve reached the final stage of the submission process, which means all that is left to do is build the Xcode project from Unity, compile it to an archive build in Xcode, and

upload it to iTunes Connect. Xcode contains a built-in system for validating the build (where the build is checked for the correct provisioning profile and certificates prior to uploading), then we can go ahead and upload that archive build also from within Xcode.

Building the Xcode project from Unity.

y Open the Unity project.

y Open player settings (Figure 9.6) and ensure that the Bundle ID is correct and matches the app ID you used earlier for creating the distribution provisioning profile.

Figure 9.6. Unity Player Settings window for checking the Bundle ID.

9.4. How to Upload Your Game to Apple for Review 227

y Hit Build and Run (File–>Build and Run) and select a file location, if prompted.

Xcode should open automatically once the build process is complete. It should also try to run the game on the device (if one is plugged in), but don’t worry if that fails. Hit the Stop button to cancel the process.

Compiling, validating, and uploading.

y Open the Scheme drop-down from the top left of the Xcode window. This needs to be set to the device. It should say “Unity-iPhone” on the left, which is the application name, and we want it to read “iOS Device” on the right (or the name of your device, if your device is attached via a USB cable).

y Click on the left side of the Scheme drop-down. Click Edit Scheme (Figure 9.7).

y On the left side, click on Archive. Make sure that the build configuration is set to “release” in its drop-down and that there is a check in the box for “reveal archive” in the organizer. Click OK (Figure 9.8).

y Before we can build, Xcode needs to know which provisioning profile to use.

This can be found in the Code Signing section of Build Settings.

Click on the project from the Project navigator on the left of the Xcode window. (It will say something along the lines of “Unity-iPhone.”)

Figure 9.7. Xcode and the Scheme drop-down menu.

With the project selected, the right side of the window should be populated with the project summary. Click on Build Settings at the top. In the Code Signing section of the build settings, expand Code Signing Identity to show the options within it (if it is not already expanded), then click to the right of the word “release” to open the Profiles drop-down.

y Select iPhone Distribution under Automatic Profile Selector (Figure 9.9).

y Click the menu Product–>Archive to build the archive. Once Xcode has fin- ished building, the Organizer window should pop up. If you have any problems with this build, consult Section 9.4.3.

y In the Organizer window, select your archive on the left if it is not already highlighted. On the right side, you should see your game icon, the name of your game, and a few more details. Over to the right of the window are three buttons: Validate, Share, and Submit. Click the Validate button.

y If prompted, enter your Apple ID and password.

y Once Xcode has logged you in, you will be prompted to select your application from a drop-down menu. Also on this screen, check that the Identity drop- down contains the iPhone Distribution profile, then click Next.

y If all goes well, a message will inform you that there were no issues and that the build has passed validation and may be submitted to the App Store.

Figure 9.8. Xcode: Editing the scheme to check archive settings.

9.4. How to Upload Your Game to Apple for Review 229

y Click Finish.

y The organizer will go back to the Archives section after validation. Click the Submit button to begin the process of sending the build to Apple for review.

y Xcode will likely ask you to enter your login details again. Enter your Apple ID and password, then click Next.

y Once Xcode has logged you in, you will be prompted to select your applica- tion again from a drop-down menu. As you did with validation, check that the Identity drop-down contains the iPhone Distribution profile, then click Next.

y A progress bar will appear. During this process, Xcode will again validate the file and upload will begin automatically. Once upload has completed, a mes- sage will inform you that your app has been submitted to the App Store for further review.

Congratulations! You just submitted your game to Apple for review. Good luck with the review process! I sincerely hope to be playing your game soon.

9.4.3 Troubleshooting Xcode Build Errors

If building the app fails in Xcode, the most likely cause is the certificates, but you can check the error message within Xcode to try and find out what has gone wrong.

Figure 9.9. Xcode: The Code Signing drop-down menu, selecting the iPhone distribution provi- sioning profile.

If the “build failed” message appears, click on the Issue Navigator button (a small exclamation mark icon; Figure 9.10) on the left of Xcode, above the project navigator.

The project navigator will change to show any warnings or issues made during the compilation process. If your build has failed, a small red icon (a red sign with a white exclamation mark) will highlight a message containing the issue that caused the build to fail.

Note that if the error says that the identity you are using doesn’t match any identi- ty in any profile, this is Xcode’s way of telling you that you have not set up (or perhaps just not installed) the right provisioning profile for this identity. For example, if you were to select “iPhone Distribution” from the Automatic Profile Selector section of the Code Signing Identity drop-down, and the build failed with the error “Code Sign error: The identity ‘iPhone Distribution’ doesn’t match any identity in any profile,” this would suggest that no distribution provisioning profile had been installed on your machine. From there, you would log into the Developer Center, into the Provisioning Portal, and into the Provisioning section (on the left) to download or create the cor- rect profile.

To try to build again, rather than clicking on the arrow to build and run, you may want to just build. To do this, use the menu Product–>Build.

Certificate-related errors. If the error message is related to certificates, the first place to check is the build settings. We need to make sure that the build is using the correct

Figure 9.10. Xcode: The issue navigator.

Một phần của tài liệu Game Development for iOS with Unity3D 2012 (Trang 237 - 248)

Tải bản đầy đủ (PDF)

(278 trang)