Trying to force Landscape mode in Simulator

build.settings:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
settings =
{
        orientation =
        {
                default = "landscapeRight",
                supported =
                {
                        "landscapeLeft", "landscapeRight",
                },
        },
 
        iphone =
        {
                plist =
                {
            UIInterfaceOrientation = "landscapeRight",
 
            UISupportedInterfaceOrientations =
            {
                "landscapeRight",
                "landscapeLeft",
            },
                        CFBundleIconFile = "Icon.png",
                                        CFBundleIconFiles = {
                                                "Icon.png" ,
                                                "Icon@2x.png" ,
                                                "Icon-72.png" ,
                                                "Icon-Small-50.png" ,
                                                "Icon-Small.png" ,
                                                "Icon-Small@2x.png"
                                        },
                        CFBundleDisplayName = "SVG Test",
                        UIPrerenderedIcon = true,
                        UIStatusBarHidden = true,
                        UIApplicationExitsOnSuspend = true,
 
                },
 
        },
 
}
 
 
if system.getInfo("platformName") == "Android" then
        application =
        {
                content =
                {
                        --zoom
                        width = 480,
                        height = 320,
                        scale = "letterbox"
                },
        }
elseif system.getInfo("model") ~= "iPad" then   
 
        application =
        {
                content =
                {
                        --zoom
                        width = 480,
                        height = 320,
                        scale = "zoomEven"
                },
        }       
settings.iphone.plist["UIInterfaceOrientation~ipad"] = "UIInterfaceOrientationlandscapeRight"
settings.iphone.plist["UISupportedInterfaceOrientations~ipad"] =
{
    "UIInterfaceOrientationlandscapeRight",
    "UIInterfaceOrientationlandscapeLeft"
}
end

If you remove everything from "if system.getInfo" and beyond it forces landscape in the simulator, although I'm guessing you want a way to leave it all in and still for landscape, yes?

I'd like the Simulator to go landscape and the iphone and ipad if possible :)

I commented out

1
2
3
4
--[[ elseif system.getInfo("model") ~= "iPad" then
...
--]]
end

This will force landscape in simulator, just this part of your code;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
settings =
{
        orientation =
        {
                default = "landscapeRight",
                supported =
                {
                        "landscapeLeft", "landscapeRight",
                },
        },
 
        iphone =
        {
                plist =
                {
            UIInterfaceOrientation = "landscapeRight",
 
            UISupportedInterfaceOrientations =
            {
                "landscapeRight",
                "landscapeLeft",
            },
                        CFBundleIconFile = "Icon.png",
                                        CFBundleIconFiles = {
                                                "Icon.png" ,
                                                "Icon@2x.png" ,
                                                "Icon-72.png" ,
                                                "Icon-Small-50.png" ,
                                                "Icon-Small.png" ,
                                                "Icon-Small@2x.png"
                                        },
                        CFBundleDisplayName = "SVG Test",
                        UIPrerenderedIcon = true,
                        UIStatusBarHidden = true,
                        UIApplicationExitsOnSuspend = true,
 
                },
 
        },
 
}

So I have to remove device stuff to get the Simulator to work?

Thanks!
That seems to have worked.

views:1818 update:2011/10/11 8:57:46
corona forums © 2003-2011