rotate app from landscape RIGHT to LEFT to device rotation

Hi,

i’ve tried to get my app to to rotate when the device rotates but when i do it shows it in portrait mode,

here is my code for build.settings.lua

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

im not sure what im doing wrong

any tip / help ?? [import]uid: 17701 topic_id: 31428 reply_id: 331428[/import]

Check out sample code apps - you need default and supported orientations. Here’s an example from one of mine that rotates for both landscape orientations;

[lua]settings =
{
orientation =
{
default = “landscapeRight”,
supported =
{
“landscapeRight”, “landscapeLeft”
},
},

iphone =
{
plist =
{
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles =
{
“Icon.png”,
“Icon@2x.png”
},

UIStatusBarHidden=true,
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = false,
},
}
}[/lua] [import]uid: 52491 topic_id: 31428 reply_id: 125678[/import]

Peach,

thanks for the response. i tried it but it still doesn’t rotate correctly, when it goes left the image is upside down.

im not sure what these lines do

UIStatusBarHidden=true,
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = false,

do i need to edit my config file as well? [import]uid: 17701 topic_id: 31428 reply_id: 125683[/import]

i just tested it with just the following

settings =  
{  
 orientation =  
 {  
 default = "landscapeRight",  
 supported =  
 {  
 "landscapeLeft", "landscapeRight",  
 },  
 },  
}  

and it worked. so something in my code must be messing with it. [import]uid: 17701 topic_id: 31428 reply_id: 125686[/import]

finally got it working,

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

i was missing one

],  

just updating any one else who might have this problem happen to them.

i was also reading here (http://developer.coronalabs.com/content/configuring-projects

If you are writing an iPad app that supports multiple orientations, you should also provide a splash screen for each of the orientations, or the App Store reviewers may reject your app. The iPad supports the following naming conventions for orientation-specific splash screen files:  
  
Default-Portrait.png  
Default-PortraitUpsideDown.png  
Default-Landscape.png  
Default-LandscapeLeft.png  
Default-LandscapeRight.png  

im creating a universal app, will i still need to worry about having these pics in place ???

currently my splash screen is called title.png and i have it in 480x320 and 960x640 [import]uid: 17701 topic_id: 31428 reply_id: 125691[/import]

Check out sample code apps - you need default and supported orientations. Here’s an example from one of mine that rotates for both landscape orientations;

[lua]settings =
{
orientation =
{
default = “landscapeRight”,
supported =
{
“landscapeRight”, “landscapeLeft”
},
},

iphone =
{
plist =
{
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles =
{
“Icon.png”,
“Icon@2x.png”
},

UIStatusBarHidden=true,
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = false,
},
}
}[/lua] [import]uid: 52491 topic_id: 31428 reply_id: 125678[/import]

Peach,

thanks for the response. i tried it but it still doesn’t rotate correctly, when it goes left the image is upside down.

im not sure what these lines do

UIStatusBarHidden=true,
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = false,

do i need to edit my config file as well? [import]uid: 17701 topic_id: 31428 reply_id: 125683[/import]

i just tested it with just the following

settings =  
{  
 orientation =  
 {  
 default = "landscapeRight",  
 supported =  
 {  
 "landscapeLeft", "landscapeRight",  
 },  
 },  
}  

and it worked. so something in my code must be messing with it. [import]uid: 17701 topic_id: 31428 reply_id: 125686[/import]

finally got it working,

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

i was missing one

],  

just updating any one else who might have this problem happen to them.

i was also reading here (http://developer.coronalabs.com/content/configuring-projects

If you are writing an iPad app that supports multiple orientations, you should also provide a splash screen for each of the orientations, or the App Store reviewers may reject your app. The iPad supports the following naming conventions for orientation-specific splash screen files:  
  
Default-Portrait.png  
Default-PortraitUpsideDown.png  
Default-Landscape.png  
Default-LandscapeLeft.png  
Default-LandscapeRight.png  

im creating a universal app, will i still need to worry about having these pics in place ???

currently my splash screen is called title.png and i have it in 480x320 and 960x640 [import]uid: 17701 topic_id: 31428 reply_id: 125691[/import]

Both these men have provided extraordinary new ways of looking at natural environments. Their site-specific examples (Austrian Alps and Japan) each represent dichotomies of farming styles and methods. Though they may not always be reproducible, they are only functional due to the development of an extraordinary new environmental dialogues, that force us all to experience our landscapes differently.
Landscape Lighting Chicago IL [import]uid: 210319 topic_id: 31428 reply_id: 137290[/import]

Both these men have provided extraordinary new ways of looking at natural environments. Their site-specific examples (Austrian Alps and Japan) each represent dichotomies of farming styles and methods. Though they may not always be reproducible, they are only functional due to the development of an extraordinary new environmental dialogues, that force us all to experience our landscapes differently.
Landscape Lighting Chicago IL [import]uid: 210319 topic_id: 31428 reply_id: 137290[/import]