How do you create different build.settings for iOS/Android in same file? I'm stumped!

It the docs, it says that you can use different orientations in your build.settings file for iOS vs. Android. But I can’t find a single example of how to do this. My problem is that I need to do my iOS builds using landscapeLeft orientation which isn’t supported in Android. And if I use that same build.settings file to do my build for Android, it crashes the install process on the device by saying: “there is a problem parsing the package”

Here is my iOS build.settings file:

[lua]settings = {
orientation =
{
default = “landscapeLeft”,
content = “landscapeLeft”,
supported = { “landscapeLeft”,}
},
iphone = {
plist = {
UIApplicationExitsOnSuspend = false,
UIStatusBarHidden = true,
UIPrerenderedIcon = true,
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png” ,
“Icon@2x.png” ,
“Icon-72.png”
},
UIAppFonts = {
“ropsenscriptbold.ttf”,
“MAFT____.TTF”
}
}
},
}[/lua]

And this is what my Android build.settings should be:

[lua]settings =
{
orientation =
{
default = “landscapeRight”
},
iphone = {
plist = {
UIApplicationExitsOnSuspend = false,
UIStatusBarHidden = true,
UIPrerenderedIcon = true,
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png” ,
“Icon@2x.png” ,
“Icon-72.png”
},
UIAppFonts = {
“ropsenscriptbold.ttf”,
“MAFT____.TTF”
}
}
},
}[/lua]

Is there a way to do this or do I have to switch out build.settings files every time I do a test build? (Either way, the docs could use this info.)

[import]uid: 10818 topic_id: 30905 reply_id: 330905[/import]

Here’s an example of a bare-bones build.settings file that can be shared between andoid and iOS:

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

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

android =
{
versionCode = “1”
versionName = “1.0”
},
}[/lua]

Notice the iphone = {} and android = {} sections. These are specific to their OS. In your example, put all the apple specific settings in the iphone section. For android, there is a lot fewer needed entries.

I beleive there are a couple of pages regarding building for each platform, and there are some other examples. In your examples, none of the settings for android are specific to Android, so they would be ignored. [import]uid: 114363 topic_id: 30905 reply_id: 123607[/import]

@schizoid2k: thanks, but this doesn’t really answer my problem. I know how to use a common file for both builds. My problem is trying to set two different kinds of orientations… one that is for Android devices, and one that is for iOS. Notice that the android and iphone tables don’t contain the orientation settings? THAT is the problem. Is there a way to even do what I need? [import]uid: 10818 topic_id: 30905 reply_id: 123612[/import]

Sorry I misunderstood… I get what you are asking now, but unfortunately, I don’t have an answer. [import]uid: 114363 topic_id: 30905 reply_id: 123615[/import]

Here’s an example of a bare-bones build.settings file that can be shared between andoid and iOS:

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

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

android =
{
versionCode = “1”
versionName = “1.0”
},
}[/lua]

Notice the iphone = {} and android = {} sections. These are specific to their OS. In your example, put all the apple specific settings in the iphone section. For android, there is a lot fewer needed entries.

I beleive there are a couple of pages regarding building for each platform, and there are some other examples. In your examples, none of the settings for android are specific to Android, so they would be ignored. [import]uid: 114363 topic_id: 30905 reply_id: 123607[/import]

@schizoid2k: thanks, but this doesn’t really answer my problem. I know how to use a common file for both builds. My problem is trying to set two different kinds of orientations… one that is for Android devices, and one that is for iOS. Notice that the android and iphone tables don’t contain the orientation settings? THAT is the problem. Is there a way to even do what I need? [import]uid: 10818 topic_id: 30905 reply_id: 123612[/import]

Sorry I misunderstood… I get what you are asking now, but unfortunately, I don’t have an answer. [import]uid: 114363 topic_id: 30905 reply_id: 123615[/import]