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.