More fun news for those looking to upgrade... Landscape mode doesn't appear to work properly. It basically attempts to cram a portrait-style window into the left 3/4 of the screen. Not surprisingly, this doesn't work at all.
Update 2: Disregard what I just posted below. After manually deleting GiderosiOSPlayer from my device and re-running the app from XCode, the problem went away. Strange.
Update: I reverted back to the 7.1 SDK, recompiled, and although it's fine on my 7.1 devices, my 8.0 iPad 3 still exhibits this issue. Unfortunately, it's not an SDK problem, but a compatibility problem with the OS itself.
so does your problem solved. This is how it looks in Gideros simulator and ios8 iphone4s simulator. how can i fix this as i need to submit ipa to appstore in few days. does compiling with ios7 sdk will work for ios8 device also
I started having this problem when I upgraded to Xcode 6, and the 8.0 SDK that comes with it. GiderosiOSPlayer exhibited this issue, as well as my game (after compiling). Devices running versions of iOS prior to 8.0 were fine.
I downloaded Xcode 5.1.whatever again, pulled the 7.1 SDK out of it and stuck it in the SDK folder in Xcode 6. After recompiling, everything seems to be alright with the player on my 8.0 device. My game, however, required me to manually de-select portrait mode in Xcode before recompiling. It runs fine, and auto-rotate even works so long as landscape left and landscape right are the only options selected.
I should note that my 8.0 device is an iPad 3, not that it necessarily matters.
I tried to compile a build (8.0 SDK with a Deployment Target of 5.0) for my 7.1 iPod touch (5th gen), but even though I'm compiling with the right architecture (armv7), it's telling me it can't install it because it can't find a valid architecture.
I think Xcode may just be acting like a turd here. It won't even install with the 7.1 SDK now.... Sigh. I'm starting to feel like I'm compiling for Android here.
Yeesh... alright. Here's the low-down. All tests were compiled with a 5.0 Deployment Target. I did a fresh, full export of my project, first deleting the folder. I then removed arm64 from the Architectures list, because my Gideros libraries have no 64-bit support.
"Faill" or "Pass" pertains to the success of landscape mode.
iPhone 6 (iOS 8.0, of course) with 8.0 SDK - Fail iPhone 6 with 7.1 SDK - Fail iPod Touch (iOS 7.0, 5th gen) with 8.0 SDK - Pass iPod Touch (iOS 7.0, 5th gen) with 7.1 SDK - Pass
I then made the changes mentioned by MobAmuse (swapping width for height in AppDelegate.m)
iPhone 6 - Pass iPod Touch - Fail, displaying EXACTLY the same symptoms that the iPhone 6 did.
Like I said before, I ran in to the same problem on my iPad 3 after I installed iOS 8.0 on it. So, it's not the device, and it's not the SDK; it's the OS version.
iOS 8 just annihilated a number of rotation callbacks, including willRotateToInterfaceOrientation:, which Gideros uses in its ViewController. So far, I haven't found a practical workaround, so we might be stuck with bringing the Gideros libraries themselves up-to-date.
I just downloaded a game I have on TestFlight, that I had compiled with the previous Xcode, and it runs just fine on my 8.0 devices. So, I guess it doesn't matter what SDK you compile the thing with; if you're using Xcode 6, it does SOMETHING that screws everything up. I may just revert back to Xcode 5.whatever and call it good enough for now.
Re-installed Xcode 5.1.1, plugged my iOS 8 device in before I opened it (important in order for Xcode to recognize it, apparently), compiled, and voila... It ran without a hitch. I'm going to finish this game, get it out the door, and worry about all this later. Much later.
it seems like compiling with ios 7.1 sdk will work so i guess using xcode 5.1 is fine for now as xcode 6 creates problem. tested my game in ipad mini running ios8 with ios7.1 sdk compilation and it is working fine.
@MobAmuse :- for me your trick is working for iphone4s but not ipad.
But do you guys have all orientations selected or only landscape ones? As in, in xcode you can select to limit app only to specific orientations, by default I think both portrait and lanscape are selected. So if you limit this selection to landscape only, does it change anything?
Haha even more freaky: I just tested on iPad Mini (iOS8) with my fudge fix and it was still wrong until I then changed the landscape only in build settings and then it worked.
If I don't do my fudge fix tho it breaks again too.
I've also attached modified file from IOS template, which you can simply replace, and then the fix will be in every exported project
Unfortunately I'm far far away from Mac now, so writing it all from the tip of my head, but if anyone can confirm it's working, I can submit this quick fix to repo
If I don't set 'portrait' in build settings for a landscape app using that I get...
2014-09-20 08:33:09.556 CrockOGoldSlots[451:74134] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [ViewController shouldAutorotate] is returning YES' *** First throw call stack: (0x27069e3f 0x349dec8b 0x27069d85 0x2a57412f 0x2a573d09 0x2a5739b7 0x5e195 0x2a571d49 0x2a766acf 0x2a76901b 0x2a773899 0x2a7678a7 0x2d7410e9 0x270305b5 0x2702f879 0x2702e3b3 0x26f7c621 0x26f7c433 0x2a56ba1f 0x2a566809 0x5dbf3 0x34f5eaaf) libc++abi.dylib: terminating with uncaught exception of type NSException
If I do set 'portrait' tho no it's still wrong on iPad Mini (iOS8)
...and also unselecting 'Portrait' option in build settings for both iPhone and iPad...
@mobamuse We should add this function in ViewController.m to avoid the "Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation'" error, isn't it ?
Have you test on ios 7 and ios 6 ? Is this fix safe to be used in production ? Just wondering, hehe.
Edit: I have checked MobAmuse's trick and Artur's code on iPad 3 iOS 8 and iPad 4 iOS 7.1, everything's fine, thanks @ar2rsawseen for the code, submitting on App Store now, wish me luck :P will check it on iPhone later
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I've also noticed that with the above fix and running <8.0 then the advertisers get the wrong size for the adverts. They are all too big for the screen.
Edit: This seemed to sort itself out after a while!
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
Update: I reverted back to the 7.1 SDK, recompiled, and although it's fine on my 7.1 devices, my 8.0 iPad 3 still exhibits this issue. Unfortunately, it's not an SDK problem, but a compatibility problem with the OS itself.
gdr_initialize(self.viewController.glView, bounds.size.height, bounds.size.width, false);
And how about older devices?, like ios 6 and 7?
I downloaded Xcode 5.1.whatever again, pulled the 7.1 SDK out of it and stuck it in the SDK folder in Xcode 6. After recompiling, everything seems to be alright with the player on my 8.0 device. My game, however, required me to manually de-select portrait mode in Xcode before recompiling. It runs fine, and auto-rotate even works so long as landscape left and landscape right are the only options selected.
I should note that my 8.0 device is an iPad 3, not that it necessarily matters.
I think Xcode may just be acting like a turd here. It won't even install with the 7.1 SDK now.... Sigh. I'm starting to feel like I'm compiling for Android here.
"Faill" or "Pass" pertains to the success of landscape mode.
iPhone 6 (iOS 8.0, of course) with 8.0 SDK - Fail
iPhone 6 with 7.1 SDK - Fail
iPod Touch (iOS 7.0, 5th gen) with 8.0 SDK - Pass
iPod Touch (iOS 7.0, 5th gen) with 7.1 SDK - Pass
I then made the changes mentioned by MobAmuse (swapping width for height in AppDelegate.m)
iPhone 6 - Pass
iPod Touch - Fail, displaying EXACTLY the same symptoms that the iPhone 6 did.
Like I said before, I ran in to the same problem on my iPad 3 after I installed iOS 8.0 on it. So, it's not the device, and it's not the SDK; it's the OS version.
@MobAmuse :- for me your trick is working for iphone4s but not ipad.
Gideros needs fixing as all this is starting to get a little too messy for my liking. For Droid it's fine but iOS ...not really no.
As in, in xcode you can select to limit app only to specific orientations, by default I think both portrait and lanscape are selected.
So if you limit this selection to landscape only, does it change anything?
doesn't work if i compile with ios 8.0 sdk and xcode 6 how ever if i go for xcode 5.1.1 and test it in ipad running ios8 it works.
If I don't do my fudge fix tho it breaks again too.
This has broken my mind :P
Likes: bali001
Let's edit AppDelegate.m file
First let's add:
let's check and swapt orientation if needed:
Unfortunately I'm far far away from Mac now, so writing it all from the tip of my head, but if anyone can confirm it's working, I can submit this quick fix to repo
Likes: MobAmuse, SinisterSoft
2014-09-20 08:33:09.556 CrockOGoldSlots[451:74134] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [ViewController shouldAutorotate] is returning YES'
*** First throw call stack:
(0x27069e3f 0x349dec8b 0x27069d85 0x2a57412f 0x2a573d09 0x2a5739b7 0x5e195 0x2a571d49 0x2a766acf 0x2a76901b 0x2a773899 0x2a7678a7 0x2d7410e9 0x270305b5 0x2702f879 0x2702e3b3 0x26f7c621 0x26f7c433 0x2a56ba1f 0x2a566809 0x5dbf3 0x34f5eaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
If I do set 'portrait' tho no it's still wrong on iPad Mini (iOS8)
Er
Doing this fix in AppDelegate.m...
gdr_initialize(self.viewController.glView, bounds.size.height, bounds.size.width, false);
...and also unselecting 'Portrait' option in build settings for both iPhone and iPad...
Results in:
iPad Mini (iOS 8) = PASS
iPad Air (iOS 8) = PASS
iPhone 5S (iOS 8) = PASS
iPhone 6+ (IOS 8) = PASS
...so I'll stick with that and just build for IOS 8 only now given it'll all be that soon anyway.
L8rz
Likes: dominikusdp
Edit: I have checked MobAmuse's trick and Artur's code on iPad 3 iOS 8 and iPad 4 iOS 7.1, everything's fine, thanks @ar2rsawseen for the code, submitting on App Store now, wish me luck :P will check it on iPhone later
"First let's add:
#ifndef NSFoundationVersionNumber_iOS_7_1
# define NSFoundationVersionNumber_iOS_7_1 1047.25
#endif
Then let's create a method to check version:
- (BOOL)isNotRotatedBySystem{
BOOL OSIsBelowIOS8 = [[[UIDevice currentDevice] systemVersion] floatValue] < 8.0;
BOOL SDKIsBelowIOS8 = floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1;
return OSIsBelowIOS8 || SDKIsBelowIOS8;
}
And then in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
let's check and swapt orientation if needed:
if([self isNotRotatedBySystem])
gdr_initialize(self.viewController.glView, bounds.size.width, bounds.size.height, false);
else
gdr_initialize(self.viewController.glView, bounds.size.height, bounds.size.width, false);
"
but if you set the gdr init to true then you get an error even if you add:
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
Likes: bali001
https://deluxepixel.com
Edit: This seemed to sort itself out after a while!
https://deluxepixel.com
http://giderosmobile.com/forum/discussion/comment/38740#Comment_38740