Showing posts with label iOS 6. Show all posts
Showing posts with label iOS 6. Show all posts

Sunday, December 9, 2012

Issue with iOS 6 Game Center landscape app issue fixed

Got my iPhone 5 temporarily working by connecting to WiFi while still waiting for the new SIM. First thing I did was obviously download my 2 games from App Store and have a go, but to my biggest shock, Where Is It Smart Kids Edition crashed after the splash page, how could this be??!!

Tried it in XCode and it crashed too! Error message as below:


2012-12-09 20:53:19.490 Where is it[395:907] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
*** First throw call stack:
(0x3978d3e7 0x387e6963 0x3978d307 0x33005857 0x331a9f21 0x33089cdd 0x33088f6b 0x39790ad4 0x396e828f 0x331a70f3 0x352b2e01 0x32575793 0x325755db 0x32578e45 0x397611b1 0x396d423d 0x396d40c9 0x3983033b 0x32ff1291 0xdf2d9 0x4c410)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

Found this link from Stackoverflow.com which describes something similar to what I am experiencing, which only happens to iOS 6 Game Center for Apps only supporting Landscape display.  Delete the app and download from App Store again and test with Game Center logged in, and it works without problem. Problem identified!

Urh, hang on, I thought I fixed the problem in previous release already??!! Further investigation shows I missed something in my last release. And as my 3GS always has Game Center logged in, that's why it wasn't picked up during pre-release testing, damn! Definitely have to add this testing next time.

The fix is easy, before, the setup looks like this:

Just need to click on the 2 "Portrait" and "Upside Down" icons in "Supported Interface Orientations" and that fixed the problem. The setup now looks like this:


Issue fixed. Lucky the App Store still available before 20th December, hope there's not too many apps waiting for review and can still get reviewed before Christmas with the normal 7-8 days waiting time, fingers crossed...
 

Saturday, November 24, 2012

Multi-level Template display issue in iOS 6 fixed

Thanks to Nick Wilson who pointed out that my Cocos2d Multi-page template doesn't display properly in iOS 6.

As shown below, when loaded in iOS6 it always displays in Portrait mode, and gets quite messy.


Did some research and got it working by making 2 small changes:


1) in "AppDelegate.m", inside "applicationDidFinishLaunching", insert the line highlighted in red as shown below, before "[window makeKeyAndVisible]"

// make the View Controller a child of the main window
[window addSubview: viewController.view];
window.rootViewController = viewController;
    
[window makeKeyAndVisible];

2) then in "RootViewController.m" add a new method anywhere as below:

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskLandscape;
}


That's it. Let me know if this works for you or if you have any other problems.

Cheers.

[Update 25/11/2012]
Nick also pointed out, the other extra thing to change would be to add an iPhone 5 background image.

I have included all these and uploaded V1.02 as below, links in original post also updated. Special thanks to Nick for all the info, let me know if any one else got other excellent ideas to add.

Code: Multi-level template V1.02
Image: Image Files V1.02


// Ver 1.00 - 28/09/2012 First version
// Ver 1.01 - 24/11/2012 Fixed iOS 6 orientation issue
// Ver 1.02 - 25/11/2012 Add background image for iPhone 5 (1136x640), add version number display on Main Menu


Thursday, September 20, 2012

First day with XCode 4.5

Upgraded my iPhone 3GS to iOS 6 and quite happy to see the "Personal Hotspot sharing through USB not working" issue fixed.

However, after I downloaded Xcode 4.5 and tried to compile my 2 games, both failed... Still working on resolving the issues at the moment.

First it automatically asked to add this new launch image called "Default-568h@2x.png" - which is a really strange name. And it's an empty, black 640 x 1136 image.


Then there's lots of warnings about Cocos2D 1.0 library - as it still compiles, I just ignore it for now.

When runs in simulator, for "Where is it Smart Kids Edition" which is landscape, it shows 2 ugly black bars on both side.

While for "Mespfi", which is portrait, the ugly bars are now on the top and bottom...

I wasn't too worry about that as this just means some image adjustment plus UI changes.

However when I tried to run both apps on the physical device, both failed with similar error as below, one for Nextpeer and one for Buzzdoes.


ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/xxxxxxxxxxx/Buzz.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/xxxxxxxxxx/Nextpeer.framework/Nextpeer for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Thanks to Daniel/Nextpeer, looks like it's because Xcode 4.5 no longer supports the older arm v6 architecture on my old 3GS. I might have to maintain 2 versions of code - one for arm v6 and one for arm v7. But then when I searched through my MacBook Pro, found that the previous version Xcode 4.3.3 no longer existed and can only find Xcode 4.2!  Xcode 4.5 must have overwritten 4.3.3, what the....

Still wondering whether should I get a new iPhone 5, or just get the latest iPod and save the money for an Android phone. As I am a bit unhappy about the way Apple ignoring older devices and upgrading so frequently/quickly, felt a bit unsecured to invest all the effort and get locked into one single platform which changes so quickly... Oops, this reminds me about the Unity thing which I haven't touch for a week or now... I wish I can have more time doing all these development work.

[Update 24/Sep/2012]
Issue with "armv7s" error fixed by changing it to "armv7" and it runs on my iPhone 3GS without problem. For further details, please see this post. Thanks.



Thursday, September 13, 2012

Just have to wait a few more days...

iOS 6 and XCode 4.5 would be available soon. Only thing that troubles me is how to change my app to cater for another new resolution (1136 x 640) for the new iPhone 5. Did some research and all I could see is this new file called "Default-568h@2x.png" in mentioned in a few pages.

There's even some sites (eg. this one) which posted a few screens about the new XCode 4.5 with "iPhone (Retina 4-inch)" simulator. Gee, I thought you are not suppose to do that??!!

Don't have the time to play with the GM build, so would have to wait for it's official release then... Hope it  won't be that difficult.... fingers crossed...