1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

Projucer: Added a device family option to the iOS exporter

This commit is contained in:
ed 2017-10-04 10:55:45 +01:00
parent 1cb2d8143e
commit 758351a28f
2 changed files with 16 additions and 3 deletions

View file

@ -67,6 +67,9 @@ public:
{
if (getScreenOrientationValue().toString().isEmpty())
getScreenOrientationValue() = "portraitlandscape";
if (getDeviceFamilyValue().toString().isEmpty())
getDeviceFamilyValue() = "1,2";
}
}
@ -100,6 +103,9 @@ public:
Value getDuplicateResourcesFolderForAppExtensionValue() { return getSetting (Ids::iosAppExtensionDuplicateResourcesFolder); }
bool shouldDuplicateResourcesFolderForAppExtension() const { return settings [Ids::iosAppExtensionDuplicateResourcesFolder]; }
Value getDeviceFamilyValue() { return getSetting (Ids::iosDeviceFamily); }
String getDeviceFamilyString() const { return settings [Ids::iosDeviceFamily]; }
Value getScreenOrientationValue() { return getSetting (Ids::iosScreenOrientation); }
String getScreenOrientationString() const { return settings [Ids::iosScreenOrientation]; }
@ -191,11 +197,17 @@ public:
"Don't add resources folder to app extension", "Enabled"),
"Enable this to prevent the Projucer from creating a resources folder for AUv3 app extensions.");
static const char* deviceFamilies[] = { "iPhone", "iPad", "Universal", nullptr};
static const char* deviceFamilyValues[] = { "1", "2", "1,2" };
props.add (new ChoicePropertyComponent (getDeviceFamilyValue(), "Device Family", StringArray (deviceFamilies), Array<var> (deviceFamilyValues)),
"The device family to target.");
static const char* orientations[] = { "Portrait and Landscape", "Portrait", "Landscape", nullptr };
static const char* orientationValues[] = { "portraitlandscape", "portrait", "landscape", nullptr };
props.add (new ChoicePropertyComponent (getScreenOrientationValue(), "Screen orientation",StringArray (orientations), Array<var> (orientationValues)),
"The screen orientations that this app should support");
props.add (new ChoicePropertyComponent (getScreenOrientationValue(), "Screen orientation", StringArray (orientations), Array<var> (orientationValues)),
"The screen orientations that this app should support.");
props.add (new BooleanPropertyComponent (getSetting ("UIFileSharingEnabled"), "File Sharing Enabled", "Enabled"),
"Enable this to expose your app's files to iTunes.");
@ -2096,7 +2108,7 @@ private:
{
s.add ("\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = " + config.codeSignIdentity.get().quoted());
s.add ("SDKROOT = iphoneos");
s.add ("TARGETED_DEVICE_FAMILY = \"1,2\"");
s.add (String ("TARGETED_DEVICE_FAMILY = \"") + getDeviceFamilyString() + String ("\""));
const String iosVersion (config.iosDeploymentTarget.get());
if (iosVersion.isNotEmpty() && iosVersion != osxVersionDefault)

View file

@ -193,6 +193,7 @@ namespace Ids
DECLARE_ID (androidSharedLibraries);
DECLARE_ID (androidScreenOrientation);
DECLARE_ID (androidExtraAssetsFolder);
DECLARE_ID (iosDeviceFamily);
DECLARE_ID (iosScreenOrientation);
DECLARE_ID (iosInAppPurchases);
DECLARE_ID (iosBackgroundAudio);