iOS 6 shouldautorotate never gets called [CLOSED]

Hi all,

When updating to iOS6.1, my app was not responding to orientation change,

I found out it was related to this console message when starting the app :
“Application windows are expected to have a root view controller at the end of application launch”

After some search I implemented into [color=#404080]JuceAppStartupDelegate[/color] the [color=#004080]didFinishLaunchingWithOptions[/color],

and copied the content of [color=#004080]applicationDidFinishLaunching[/color] into it, with adding a “return YES” at the end.

But this doesn’t solves the problem, this warning is still here, and I don’t know how to set the root view controller in [color=#004080]didFinishLaunchingWithOptions[/color]… here is how it looks like now :

[code]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
initialiseJuce_GUI();

JUCEApplication* app = dynamic_cast <JUCEApplication*> (JUCEApplicationBase::createInstance());
if (! app->initialiseApp (String::empty))
    exit (0);

return YES;

}[/code]

I imagine I should use somehow the [color=#804080]setRootViewController[/color], but I don’t know how to write it, as I’m really new in objective C.

I also read the other post describing this console message, but my setContentOwned is set prior the setVisible call : in my app, a DocumentWindow is created in the JUCEApplication::initialise , and the setContentOwned is at the start of the ctor of DocumentWindow.

Thanks,

Veronique

You’re calling initialiseApp (String::empty), but that method has no parameters… Does that mean you’re using an out-of-date version of juce?

I don’t think so, I’m using Juce 2.0, I simply copied the content of the [color=#004080]applicationDidFinishLaunching[/color] in juce_ios_Windowing.mm (from Juce 2.0), to implement the new function [color=#004080]didFinishLaunchingWithOptions[/color], as [color=#004080]applicationDidFinishLaunching[/color] is deprecated in iOS 6.1.

I there a more recent Juce version ?

EDIT : I just gave a try to juceDemo on iOS6 in XCode 4.6.2, the demo doesn’t autorotate, however I can’t remember if it used to in previous version !

I update it almost every day! There’s really no point in reporting problems unless you’re using today’s version, as they might already be fixed.

I’m sorry Jules, I just made a fresh download (I dowloaded the juce_2_0.zip from sourceforge) , the juceDemo doesn’t autorotate in my case.

EDIT : my mistake, sourceforge does’t contain the latest version, just got the juce master from GitHub, and will have a try, and come back to close this topic.

I did not get the right Juce version…erm… Jules you are doing a fantastic work !