From b091ba88bb2a0a912723b00353ce738503db38c0 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 11 May 2022 14:15:09 -0700 Subject: [PATCH] AIRHelper: can specify -appstore and -adhoc for AIR ios builds, similar to cpp ios builds Uses ipa-app-store or ipa-ad-hoc, instead of ipa-test --- src/lime/tools/AIRHelper.hx | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/lime/tools/AIRHelper.hx b/src/lime/tools/AIRHelper.hx index 1f5f768cd..5da7de433 100644 --- a/src/lime/tools/AIRHelper.hx +++ b/src/lime/tools/AIRHelper.hx @@ -33,13 +33,42 @@ class AIRHelper } else { + var supportedExportMethods = ["adhoc", "appstore"]; + var exportMethod:String = null; + for (m in supportedExportMethods) + { + if (project.targetFlags.exists(m)) + { + if (exportMethod != null) + { + Log.error("Must not specify multiple export methods. Found: " + exportMethod + " and " + m); + } + exportMethod = m; + } + } + if (exportMethod == null && project.targetFlags.exists("final")) { + exportMethod = "appstore"; + } + if (project.debug) { + if (exportMethod != null) + { + Log.error("Must not specify export method for a debug build. Found: " + exportMethod); + } airTarget = "ipa-debug"; } else { - airTarget = "ipa-test"; + switch (exportMethod) + { + case "appstore": + airTarget = "ipa-app-store"; + case "adhoc": + airTarget = "ipa-ad-hoc"; + default: + airTarget = "ipa-test"; + } } }