Compile the apple game center application (translation 1.3: Set the game center for iOS applications)

Source: Internet
Author: User

 

1.3 set game center for iOS apps

Problem

You want to connect to the game center server in the iOS app.

Solution

You need to create an application in iTunes connect andInfo. plistSet the package ID of the application in the file.

Discussion

In 1.2, we created sandbox game center accounts, which will be installed on all IOS simulator instances. This is the first step in the puzzle. The next step is to use iTunes connect to create an iOS application. This may confuse you at the beginning. The key is to create an application in xcode and give it a package ID. For example, I use the following package ID:

Com. pixolity. testgame

There is no trick to set the identifier in the application package. Create an application in iTunes connect and set the same package ID as in xcode.

We will process these tasks in this section, but will not upload the application to iTunes connect. Following the procedures in this section, you will create an application on iTunes and be in the"
Prepare for upload
". The application will be able to access the game center. However, since it is not actually uploaded to iTunes connect, your game center connection will run in the sandbox environment. After uploading, the same code can also run on the product server.

The following describes how to create a game center iOS app on iTunes CONNECT:

1. log on to the Apple developer portal using the development qualification certificate.

2. After logging on, select "iOS provision Portal" on the right hand side ".

3. In the portal, select "app IDs" from the left-hand menu ".

4. Click "new app ID.

5. On the "new app ID" Page, enter the description of the new app ID. This can be anything you want to describe your application.
In the bundle seed ID (app id prefix) Section, select generate new ". It generates a new package seed ID for your application. The application package appended to the package's seed ID (previously discussed) will form a unique name that can differentiate your application. For example, if you hand over the project to "generate new", the generated seed ID will be similarKqtho099023. If you set the package IDCom. mycompany. mygame, The unique identifier of the application will beKqtho099023.com. mycompany. mygame.
In the bundle identifier (app id suffix) box, enter an identifier that uniquely identifies the application. The format of this field isCom. mycompany. myapplication, Where,MycompanyIs the name of the company that creates a developer account;MyapplicationIs the name of the application.

6. After setting the values in the "new app ID" interface, click the "Submit" button to create a new application ID for you.

7. The work in "iOS provision Portal" has been completed. Return to the Apple developer portal and select "ITunes connect" on the right hand side of the screen ".

8. In "ITunes connect", select "Manage Your Applications ".

9. In "Manage Your Applications", select the "Add new app" button in the upper left corner.

10. specify the name, unique sequence number, and package ID of your application. For example, I created a package IDCom. pixolity. newtestgameTherefore, in the "app name" field, enterNewtestgame; "SKU number" field, I select input0001And "bundle ID", I selected from the selectorNewtestgame-Com. pixolity. newtestgameIt is a combination of the description and package id I set in step 5. The values I entered are 1-3. After setting these values, click "continue" at the bottom of the page.


Figure 1-3 create a new application in iTunes connect

11. On the pricing page, you only need to select the desired "Price tier" without worrying about other things. Click "continue. You can change these values when you want to submit an application to the app store.

12. The next interface is used to set the details of the application. Enter a value that is useful. These values can be modified later, so you can try to enter less values as long as you can proceed to the next step. You must set a large image to upload the application. Don't worry. Now you can upload any image (as long as it is Apple's supported size ). You can change them to final product images later. After all values and uploads are completed, click "save" in the lower-right corner of the page.

13. After saving the application information, the application is established in iTunes connect, but no code has been submitted. This is exactly the stage in which you keep your applications running to test the game center. To enable the game center for the application, select "manage game center" on the right-hand side of the same page. If you have logged on to another page, go to "ITunes connect" and select the one you just created from the Application List.

14. log on to the manage Game Center page and click Enable to enable the application game center, as shown in figure 1-4.


Figure 1-4 enable the application game center

15. Click "done" at the bottom of the page ".

16. Open the xcode project. InInfo. plistIn the file, set the package ID to the one set in step 5, as shown in 1-5.


Figure 1-5 set the application package ID in xcode4

Done! The following introduces the game KIT framework to the project, as described in section 1.4.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.