aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/ios_app_settings.py
blob: 8ae01b0ea0ccf5c203eade710038762cef1b6b01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import _common as common
import ymake


def onios_app_settings(unit, *args):
    tail, kv = common.sort_by_keywords({'OS_VERSION': 1, 'DEVICES': -1}, args)
    if tail:
        ymake.report_configure_error('Bad IOS_COMMON_SETTINGS usage - unknown data: ' + str(tail))
    if kv.get('OS_VERSION', []):
        unit.onios_app_common_flags(['--minimum-deployment-target', kv.get('OS_VERSION', [])[0]])
        unit.onios_app_assets_flags(['--filter-for-device-os-version', kv.get('OS_VERSION', [])[0]])
    devices_flags = []
    for device in kv.get('DEVICES', []):
        devices_flags += ['--target-device', device]
    if devices_flags:
        unit.onios_app_common_flags(devices_flags)