[Cocos2d-X (1.x 2.x) repair] ios6 libcurl. A can not be compiled through armv7s and ios6 can not be normal game landscape Solution

Source: Internet
Author: User


All articles on this site areLi huaming himiOriginal, reprinted must be explicitly noted:
Reprinted from[Heimi gamedev block]Link: http://www.himigame.com/iphone-cocos2dx/1000.html

☞Click to subscribe☜
The latest developments in this blog! Notify you of the latest blog in time!

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:

Download the latest Cocos2d-2.0-x-2.0.3 engine package and find the libcurl that already supports armv7s. A file, path: http: // cocos2d-2.0-x-2.0.3/cocos2dx/platform/third_party/IOS/libraries/libcurl. A

Replace the old libcurl. A of your project.

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:

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

Replace it with the following code:

// 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:

- (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.