[Cocos2d-X (1.x 2.x) fixes] libcurl. a cannot be compiled through armv7s in iOS6 and cannot be

Source: Internet
Author: User

IOS6 and iPhone 5 have been released for a while, so for cocos2dx in yesterday released the latest support of the Cocos2d-2.0-x-2.0.3 released version before running in iOS6 there will be two problems (Himi has been iphone5 real machine debugging verification and solve)

First, we provide a solution to the problem that libcurl. a cannot be compiled using armv7s:

The following is a solution for the abnormal horizontal screen of games in iOS6:

1. First, find the following code in the ios/AppController. mm class in the root directory of your project:


[Cpp]
// Set RootViewController to window
[Window addSubview: viewController. view];

Replace it with the following code:


[Cpp]
// Set RootViewController to window
If ([[UIDevice currentDevice]. systemVersion floatValue] <6.0)
{
// Warning: addSubView doesn' t work on iOS6
[Window addSubview: viewController. view];
}
Else
{
// Use this mehod on ios6
[Window setRootViewController: viewController];
}


2. Add the following functions to the ios/RootViewController. mm file in the root directory of your project:


[Cpp]
-(NSUInteger) supportedInterfaceOrientations {
Return UIInterfaceOrientationMaskLandscape;
}

-(BOOL) shouldAutorotate {
Return YES;
}


OK. Solve the problem.

The latest Cocos2d-2.0-x-2.0.3 released version, officially released yesterday, has addressed the above issues for iOS 6 and iPhone 5.

If there is a project error, check whether it is caused by a third-party SDK class library. After all, iOS6 updates bring updates to major third-party libraries.

 

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.