Some problems I encountered in iOS game development

Source: Internet
Author: User

Recently, when developing IOS games, I encountered some peripheral problems, which were not a major problem (pediatrics for experts), but all delayed development. Record it here and make a summary. It will be updated later. It would be nice to be able to help some friends who have just started developing IOS games.


1. When creating a test package for the authenticated machine, set archive in scheme to debug. The release package cannot be installed on the test machine.

2. When creating a test user to test the IAP, you should use a new Apple id instead of a registered Apple id. In addition, when performing an IAP test on the device, you must sign out the store user in settings, and the test user must not be given to sign in, this will cause the sandbox user to be connected to the actual App Store mechanism and invalidate the test user. During the IAP test, select the use existing Apple ID and enter the test user information.

3. In two IAP modes, the latter uses the custom server to bypass the client and the Apple Server to directly perform a verification to check whether the client and the Apple Server have indeed interacted with each other, rather than the cheating tool to pretend to be the Apple Server.

4. Press the Home key during the game process to first make the game resign active, and then enter background. After the operation is returned to the game on iOS, the game will first enter foreground and then become active, this will call the four delegate methods respectively:


-(Void) applicationwillresignactive :( uiapplication *) Application

-(Void) applicationdidenterbackground :( uiapplication *) Application

-(Void) applicationwillenterforeground :( uiapplication *) Application

-(Void) applicationdidbecomeactive :( uiapplication *) Application


Some events, such as IAP or incoming calls, will only resign active and become active because they do not involve background suspension, and will not enter background and enter foreground. This can be used to do some practical work, such as anti-cheating c/s time synchronization.


5. When the MySQL database of Ubuntu is deployed for the first time, the username and password in/etc/MySQL/Debian. CNF can be used to log on to MySQL when other usernames and passwords have problems. In addition, if you cannot remotely connect to the MySQL server, there may be two problems:

(1) bind-address in/etc/MySQL/My. CNF is assigned 127.0.0.1 -- remote access is not allowed. Change to 0.0.0.0 to allow access from any IP address.

(2) In MySQL, the root user's host of the MySQL table is localhost and must be set to %. And set permissions for the root user:

Grant all privileges on *. * To 'root' @ '%' identified by 'Password' with grant option;

Flush privileges;


6. After you connect to the server through SSH, if you do not perform the operation for a long time, the next operation may generate

Write failed: broken pipe

. You can use

Ssh-O serveraliveinterval = new Server Activity interval username address

To solve the problem.


7. Some Ubuntu systems do not have curl installed, resulting in failure in using HTTPS of PHP. You can install it in the following ways:

Apt-Get install curl libcurl3 libcurl3-dev php5-curl

After installation, restart Apache:

/Etc/init. d/apache2 restart

You can also use phpinfo () to check whether the installation is successful.

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.