Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

iOS 6 Orientation Crash
Started by SegaBoy Sep 16 2012 08:35 PM

- - - - -
48 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

atymes

[GLOBAL: userInfoPane.html]
atymes
  • Observer

  • 4 posts
  • Corona SDK

Tossing that through Google Translate, it looks like they're explaining the bug, but they haven't fixed it either.

Would it be possible to include this fix if Corona detects that only landscape options are listed in build.settings?

https://devforums.apple.com/message/731764#731764
uid: 105445 topic_id: 31056 reply_id: 126287


[TOPIC: post.html]
#27

Tom

[GLOBAL: userInfoPane.html]
Tom
  • Moderator

  • 1,480 posts
  • Corona Staff

We had our iOS engineer spend two days on this and looked at all the options and there is no general purpose solutions that works. We can do it using private Apple APIs but that will be rejected if you try to submit the app to the App store. My FAQ blog post for this week talks about this issue.
http://www.coronalabs.com/blog/2012/10/03/faq-wednesday-ios6-bugs/

Everyone needs to file a bug report with Apple so this gets fixed ASAP.
uid: 7559 topic_id: 31056 reply_id: 126308


[TOPIC: post.html]
#28

atymes

[GLOBAL: userInfoPane.html]
atymes
  • Observer

  • 4 posts
  • Corona SDK

That workaround does not work. If I have

orientation = {
  default = "landscapeRight",
  content = "landscapeRight",
  supported = { "landscapeRight", "portrait" },
},

then all my content displays in landscapeRight and portrait. I am using no native display objects, just Corona, and those non-native display objects rotate too. This is using build 2012.926.
uid: 105445 topic_id: 31056 reply_id: 126312


[TOPIC: post.html]
#29

Tom

[GLOBAL: userInfoPane.html]
Tom
  • Moderator

  • 1,480 posts
  • Corona Staff

If that's all you have in your build.settings, it won't work. This is what I have in my build.setting file and it works fine for me.

settings = {
	orientation =
	{
		default = "landscapeRight",
		content = "landscapeRight",
 		supported = { "landscapeRight", "portrait" },
	},
	iphone =
	{
		plist=
		{
	        CFBundleIconFile = "Icon.png",
	        CFBundleIconFiles = {
	           "Icon.png", 
	           "Icon@2x.png", 
	           "Icon-72.png", 
	        },

			CFBundleIdentifier = "com.appledts.GKTapper",	-- Apple's GameCenter Example (GKTapper)
		},
		components = {}	-- no openfeint
		--components = { "openfeint" }	-- for openfeint & gamecenter
	}
}
uid: 7559 topic_id: 31056 reply_id: 126326


[TOPIC: post.html]
#30

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

I noticed in today's FAQ Wednesday:

"...Note that the content = “landscapeRight” line. Corona limits this setting to only one orientation..."

From this i gather I can't use this workaround and support both landscapeRight and landscapeLeft. But it gives my app an amateurish feel to only support a single, fixed orientation, so I'm wondering if this is something that can by addressed by Coronalabs, at least until Apple fixes their bug. Basically i'd like "content" to support more than one orientation, just like "supported" does.
uid: 9422 topic_id: 31056 reply_id: 126327


[TOPIC: post.html]
#31

atymes

[GLOBAL: userInfoPane.html]
atymes
  • Observer

  • 4 posts
  • Corona SDK

@Tom,

Of course that's not everything. Here's everything (minus a few bits that are not iOS-rotation-related; it can build without the omitted bits).

settings =
{
        orientation =
        {
                default = "landscapeRight",
                supported =
                {
                        "landscapeRight",
                        "landscapeLeft"
                },
        },
        iphone =
        {
                plist =
                {
                        components = {},
                        CFBundleVersion = "66",
                        CFBundleIdentifier = "com.playgearz.toss",
                        CFBundleIconFile = "Icon.png",
                        CFBundleIconFiles = {
                                "Icon.png" , 
                                "Icon@2x.png" , 
                                "Icon-72.png" , 
                                "Icon-Small.png" , 
                                "Icon-Small-50.png" , 
                                "Icon-Small@2x.png"
                        },
                        UIInterfaceOrientation = "UIInterfaceOrientationLandscapeRight",
                        UISupportedInterfaceOrientations = {
                                "UIInterfaceOrientationLandscapeRight",
                                "UIInterfaceOrientationLandscapeLeft"
                        },
                        UIApplicationExitsOnSuspend = false,
                        UIStatusBarHidden = true
                },
        }
}

settings.iphone.plist["UIInterfaceOrientation~ipad"] = "UIInterfaceOrientationLandscapeLeft"
settings.iphone.plist["UISupportedInterfaceOrientations~ipad"] = 
{
    "UIInterfaceOrientationLandscapeRight",
    "UIInterfaceOrientationLandscapeLeft"
}

I replaced the orientation part with...
orientation = {
  default = "landscapeRight",
  content = "landscapeRight",
  supported = { "landscapeRight", "portrait" },
},
...and it made everything rotate into portrait.

Note that I did not change the UISupportedInterfaceOrientations or settings.iphone.plist["UISupportedInterfaceOrientations~ipad"] parts, just the "orientation" section. Changing just the "orientation" section, by itself, made non-native content rotate into portrait. (It also prevented the content from rotating into landscapeLeft, but that was expected.)

As with Stephen, we need this to work for landscapeLeft and landscapeRight - but first we need this to work, period, and it does not.
uid: 105445 topic_id: 31056 reply_id: 126328


[TOPIC: post.html]
#32

Nevistech

[GLOBAL: userInfoPane.html]
Nevistech
  • Enthusiast

  • 62 posts
  • Corona SDK

Add my name to list of people who need a fix! As with others who are using landscape mode, I think that restricting orientation to Landscape right will not go down well with reviewers and users, particularly on the iPad.

So it seems we have a choice: do not support Game Center and get scored down for not supporting it, or do not support the standard orientations, and get scored down!

Great support, Corona team so far, but we need a fix!!

Maybe I'm over-simplifying the issue, but I cannot see why portrait mode cannot be restricted from available orientations, except when game center is invoked.

Anthony
uid: 87194 topic_id: 31056 reply_id: 126479


[TOPIC: post.html]
#33

bfintal

[GLOBAL: userInfoPane.html]
bfintal
  • Contributor

  • 135 posts
  • Corona SDK

I also need a fix for the orientation stuck in only 1 orientation. I just released a game yesterday and got a 1-star review just because it doesn't rotate!!
uid: 144908 topic_id: 31056 reply_id: 126493


[TOPIC: post.html]
#34

Nevistech

[GLOBAL: userInfoPane.html]
Nevistech
  • Enthusiast

  • 62 posts
  • Corona SDK

bfintal,

Exactly my point.
Come on, Corona, don't hide behind Apple! Apply some resource here because we know you can fix it! How many great apps will be on hold until we have a fix?

Anthony
uid: 87194 topic_id: 31056 reply_id: 126506


[TOPIC: post.html]
#35

ZippyMind

[GLOBAL: userInfoPane.html]
ZippyMind
  • Enthusiast

  • 48 posts
  • Corona SDK

We like some of the fixes from latest builds, however, we can't use it since iOS 6 workarounds provided so far are not acceptable or practical for our release (native text fields rotating 90 degrees to portrait).

Is there a way, we could build the latest for iOS 5.1 as well till we get iOS 6 issues resolved?
uid: 48484 topic_id: 31056 reply_id: 126547


[TOPIC: post.html]
#36

bfintal

[GLOBAL: userInfoPane.html]
bfintal
  • Contributor

  • 135 posts
  • Corona SDK

I don't think going back to 5.1 is a good idea since the majority of the devices have upgraded to iOS 6 already (I saw this stat somewhere but forgot where exactly).

CoronaLabs, we need that orientation update!
uid: 144908 topic_id: 31056 reply_id: 126548


[TOPIC: post.html]
#37

orz

[GLOBAL: userInfoPane.html]
orz
  • Observer

  • 3 posts
  • Corona SDK

Tom, can we just configure GameCenter not to show SignIn dialog?
If the user is already signed-in she can just continue playing with GC enabled.
If not, our app is notified with the new event.type, so we can show a message to tell the user to go to GC App and sign in if she wants to use GC.
However with all we have now we can't stop sign in dialog to appear and result in crash.
The only missing piece is the ability to disable just the sign in dialog.
uid: 132466 topic_id: 31056 reply_id: 126606


[TOPIC: post.html]
#38

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

Hi all, as you can probably imagine, our engineers have been pulling their hair about how to resolve this in an elegant and effective way.

It's a tricky problem, especially since we're trying to solve it in a way that addresses everyone's use case, not just one person's.

We have a stopgap in place, but we know it's not perfect.

We took a step back late Friday to see if we could come up with something better. Will update when we have something solid to share.

walter
uid: 26 topic_id: 31056 reply_id: 126656


[TOPIC: post.html]
#39

Nevistech

[GLOBAL: userInfoPane.html]
Nevistech
  • Enthusiast

  • 62 posts
  • Corona SDK

Thanks!
We appreciate your efforts and have our fingers crossed waiting for a solution.

Anthony
uid: 87194 topic_id: 31056 reply_id: 126663


[TOPIC: post.html]
#40

Nevistech

[GLOBAL: userInfoPane.html]
Nevistech
  • Enthusiast

  • 62 posts
  • Corona SDK

-- also posted as separate thread on daily builds
Hi,
Version 2012.928 (2012.10.4)

Two new issues with game center on IOS 6: shows up on Xcode simulator and device (iPhone4)

1. Lauch app, press home button during game center activity; relaunch app. App crashes. Launch app for second time, no issue. I'm using all the recommended fixes for the game center orientation Apple bug. Has anyone else experienced this ? I have UIApplicationExitsOnSuspend = true

2. To get around the annoying game center log-in box the first time you launch an app, I am only calling gameNetwork.init() when the user touches a "game center" button from within the game.
I then call gameNetwork.show() from within the initCallback() function
The issue is that if there is no internet connection, initCallback() is not called at all. So the user will press the "game center" button and get nothing. What is needed is a callback to indicate that login failed. Or even better a function to report whether the user is logged in (without invoking the log-in screen!)

CoronaLabs, any advice or ideas? Hopefully these can be incorporated into the use-cases you are looking at now.

Anthony
uid: 87194 topic_id: 31056 reply_id: 126728


[TOPIC: post.html]
#41

ZippyMind

[GLOBAL: userInfoPane.html]
ZippyMind
  • Enthusiast

  • 48 posts
  • Corona SDK

Here is an update ...

I just tried 2012.930 build on both iPad 3 and iPhone 4 running iOS 6.

Our landscape only app has no game center integration, we have native text fields and photo picker functionalities.

Photo picker

- Works fine on iPhone 4 (native text fields not rotating to portrait now)
- Crash on iPad 3 (photo picker doesn't work)

Based on this, I think the fix is required on iPad 3 as well.

Or, is there any iPad specific settings that needs to be applied?

Thanks a lot for working on this issue.
uid: 48484 topic_id: 31056 reply_id: 126897


[TOPIC: post.html]
#42

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

I tried the new fix incorporated in daily build 2012.930 and can confirm opening the photo picker on an iPad 2 will crash. It does not crash on an iPhone 4 (and the photo picker opens in portrait orientation as expected).
uid: 9422 topic_id: 31056 reply_id: 126908


[TOPIC: post.html]
#43

bfintal

[GLOBAL: userInfoPane.html]
bfintal
  • Contributor

  • 135 posts
  • Corona SDK

Yikes, if this is the case I might stick to the non-rotating orientation for stability
uid: 144908 topic_id: 31056 reply_id: 126940


[TOPIC: post.html]
#44

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

Hi all, I've posted the backstory on the fix in 930: http://www.coronalabs.com/blog/2012/10/09/ios-6-game-center-and-landscape-orientation/

Also, we also have a workaround coming for the photo picker issues on iPad.
uid: 26 topic_id: 31056 reply_id: 126946


[TOPIC: post.html]
#45

SegaBoy

[GLOBAL: userInfoPane.html]
SegaBoy
  • Contributor

  • 635 posts
  • Corona SDK

Hey Walter - I posted this on the blog article, but think you might see it more prominently here.

The workaround isn't working for me. My app is designed to only support one landscape orientation ("landscapeLeft"), however the new fix is auto-rotating despite my build.settings only registering for this one orientation.

Curiously the app doesn't auto-rotate in the Corona Simulaltor!?!

FYI here's my build.settings:
settings = {
	orientation = {
		default = "landscapeLeft",
		supported = {"landscapeLeft"},
	},
	
	iphone = {
		components = {},	
		plist = {
			CoronaUseIOS6LandscapeOnlyWorkaround = true, 
uid: 33275 topic_id: 31056 reply_id: 127008


[TOPIC: post.html]
#46

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Thanks Walter et al at Coronalabs for hammering on this.

The fix posted in build 931 seems to have done the trick. No crashing in my app in Photo Picker, iOS 6, iPad, both Landscape Orientations working. Whew! Just in time for Apple to "fix" it and break something else ;)
uid: 9422 topic_id: 31056 reply_id: 127046


[TOPIC: post.html]
#47

macman223

[GLOBAL: userInfoPane.html]
macman223
  • Contributor

  • 100 posts
  • Corona SDK

Hello,

I'm looking to release an update to one of my apps. My question is: if/when Apple fixes the Game Center crash with an iOS update, will my app that includes the fix above start crashing?

Thank you.
uid: 47722 topic_id: 31056 reply_id: 127060


[TOPIC: post.html]
#48

ZippyMind

[GLOBAL: userInfoPane.html]
ZippyMind
  • Enthusiast

  • 48 posts
  • Corona SDK

Anyone have updates on this issue from iOS 6.0.1 patch released yesterday?
uid: 48484 topic_id: 31056 reply_id: 129756


[TOPIC: post.html]
#49

Omnigeek Media

[GLOBAL: userInfoPane.html]
Omnigeek Media
  • Corona Geek

  • 2,975 posts
  • Corona SDK

This appears (at least in the release notes) to be addressed in the iOS 6.1 beta.

uid: 19626 topic_id: 31056 reply_id: 129767



[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]