Looking For Corona-Friendly Ios Build.settings Plist Keys

Hi All,

Sorry if this has been addressed somewhere else - I could’ve sworn I saw a post months ago that gave this info, but I couldn’t find it by searching the forums or Google, so I’m adding a new topic…

Does anybody know if there is an iOS plist key we can set to “true” in build.settings to allow the native “Music” app (aka iTunes) to keep playing when our app is opened? By default, Corona apps stop any currently playing music, but I’d love to be able to turn that off for an app I’m working on.

Actually, has anybody put together a complete list of iOS plist keys that we can manipulate in our build.settings? I’ll put my boilerplate build.settings template that I work with below, but please chime in with any plist keys that you see missing. Or maybe we can even share our default build.settings files, just to see what others are using.

(If any Corona Labs staffers are reading, a complete list might be a good addition to the API docs, or at the very least a blog post…it’d be great to have a centralized resource.)

Thanks!

Here is my boilerplate build.settings file that I start with on all my new projects:

 -- ORIENTATION VALUES: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { -- ORIENTATION SETTINGS: orientation = { default = "landscapeLeft", supported = { "landscapeLeft", } }, -- iOS SETTINGS: iphone = { components = {}, plist = { CFBundleDisplayName = "New App", UIAppFonts = {""}, MinimumOSVersion="5.1", UIStatusBarHidden = false, UIPrerenderedIcon = true, UIApplicationExitsOnSuspend = false, CoronaUseIOS6LandscapeOnlyWorkaround=true, CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround=true, CFBundleIconFiles= { "Icon.png", --iPhone 3G, 57x57 "Icon@2x.png", --iPhone 4, 114x114 "Icon-iPad.png", --iPad, 72x72 "Icon-iPad@2x.png", --iPad 3, 144x144 "Icon-Small.png", --iPhone 3G, 29x29 "Icon-Small@2x.png", --iPhone 4, 58x58 "Icon-Small-50.png", --iPad, 50x50 "Icon-Small-50@2x.png", --iPad 3, 100x100 }, } }, -- ANDROID SETTINGS: android = { versionCode="10", largeHeap=true, usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.READ\_PHONE\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.CAMERA" }, usesFeatures = { { name = "android.hardware.camera", required = false }, { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false }, }, }, }

Its not a plist you’re looking for, 

try this in your main.lua (and most likely everytime the app is relaunched from a suspended state)

[lua]if audio.getSessionProperty(audio.OtherAudioIsPlaying) == 1 then

audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)

end[/lua]

Hi there,

For your question about audio, it’s possible to do it, but not via a plist key.  Here’s the code you need to enter:

http://forums.coronalabs.com/topic/8742-new-audiosession-properties/page-3?hl=isotheraudioplaying#entry144436

You can see a better formatted version and slightly modified version of that code here: http://forums.coronalabs.com/topic/28404-ipod-music-stops-playing-when-app-is-started/?hl=isotheraudioplaying#entry152824

Thanks, Dean - and thanks, aukStudios! I knew I saw it somewhere - my mistake for thinking it was a plist key. Thanks again!

Its not a plist you’re looking for, 

try this in your main.lua (and most likely everytime the app is relaunched from a suspended state)

[lua]if audio.getSessionProperty(audio.OtherAudioIsPlaying) == 1 then

audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)

end[/lua]

Hi there,

For your question about audio, it’s possible to do it, but not via a plist key.  Here’s the code you need to enter:

http://forums.coronalabs.com/topic/8742-new-audiosession-properties/page-3?hl=isotheraudioplaying#entry144436

You can see a better formatted version and slightly modified version of that code here: http://forums.coronalabs.com/topic/28404-ipod-music-stops-playing-when-app-is-started/?hl=isotheraudioplaying#entry152824

Thanks, Dean - and thanks, aukStudios! I knew I saw it somewhere - my mistake for thinking it was a plist key. Thanks again!

what is the appropriate build.settings for andriod icons ?

CFBundleIconFiles= { "Icon.png", --iPhone 3G, 57x57 "Icon@2x.png", --iPhone 4, 114x114 "Icon-iPad.png", --iPad, 72x72 "Icon-iPad@2x.png", --iPad 3, 144x144 "Icon-Small.png", --iPhone 3G, 29x29 "Icon-Small@2x.png", --iPhone 4, 58x58 "Icon-Small-50.png", --iPad, 50x50 "Icon-Small-50@2x.png", --iPad 3, 100x100 }, } },  

that is for iphone icons right ? what is for andriod ?

Hi sunichi,

You don’t need to include anything in build.settings for Android icon files.  You just need to put the files in your project’s root directory.  They should be named Icon-ldpi.png (36x36), Icon-mdpi.png (48x48), Icon-hdpi.png (72x27), and Icon-xhdpi.png (96x96).

  • Andrew

what is the appropriate build.settings for andriod icons ?

CFBundleIconFiles= { "Icon.png", --iPhone 3G, 57x57 "Icon@2x.png", --iPhone 4, 114x114 "Icon-iPad.png", --iPad, 72x72 "Icon-iPad@2x.png", --iPad 3, 144x144 "Icon-Small.png", --iPhone 3G, 29x29 "Icon-Small@2x.png", --iPhone 4, 58x58 "Icon-Small-50.png", --iPad, 50x50 "Icon-Small-50@2x.png", --iPad 3, 100x100 }, } },  

that is for iphone icons right ? what is for andriod ?

Hi sunichi,

You don’t need to include anything in build.settings for Android icon files.  You just need to put the files in your project’s root directory.  They should be named Icon-ldpi.png (36x36), Icon-mdpi.png (48x48), Icon-hdpi.png (72x27), and Icon-xhdpi.png (96x96).

  • Andrew

“(If any Corona Labs staffers are reading, a complete list might be a good addition to the API docs, or at the very least a blog post…it’d be great to have a centralized resource.)”

Jeah, this would be really nice to have :slight_smile:

Good suggestion Jason and @Multimedia-Engineering, re: a centralized list of the build options settings. Let me ponder how this might best be organized, such as to make it clear (i.e. would it be sorted by OS, by “type of control”, etc.)

Currently we offer the following guide, which lists many of these settings, but obviously not all of them.

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Best regards,

Brent

“(If any Corona Labs staffers are reading, a complete list might be a good addition to the API docs, or at the very least a blog post…it’d be great to have a centralized resource.)”

Jeah, this would be really nice to have :slight_smile:

Good suggestion Jason and @Multimedia-Engineering, re: a centralized list of the build options settings. Let me ponder how this might best be organized, such as to make it clear (i.e. would it be sorted by OS, by “type of control”, etc.)

Currently we offer the following guide, which lists many of these settings, but obviously not all of them.

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Best regards,

Brent

Would love to see a list of build setting options. That does sound like quite a task though! Maybe create a table of “type of control” on one axis vs. OS on the other?

Would love to see a list of build setting options. That does sound like quite a task though! Maybe create a table of “type of control” on one axis vs. OS on the other?