1"use strict"; 2Object.defineProperty(exports, "__esModule", { value: true }); 3const config_plugins_1 = require("expo/config-plugins"); 4const pluginConfig_1 = require("./pluginConfig"); 5const pkg = require('expo-dev-launcher/package.json'); 6exports.default = (0, config_plugins_1.createRunOncePlugin)((config, props) => { 7 (0, pluginConfig_1.validateConfig)(props || {}); 8 if (props.ios?.tryToLaunchLastOpenedBundle ?? props.tryToLaunchLastOpenedBundle) { 9 config = (0, config_plugins_1.withInfoPlist)(config, (config) => { 10 config.modResults['DEV_CLIENT_TRY_TO_LAUNCH_LAST_BUNDLE'] = true; 11 return config; 12 }); 13 } 14 if (props.android?.tryToLaunchLastOpenedBundle ?? props.tryToLaunchLastOpenedBundle) { 15 config = (0, config_plugins_1.withAndroidManifest)(config, (config) => { 16 const mainApplication = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults); 17 config_plugins_1.AndroidConfig.Manifest.addMetaDataItemToMainApplication(mainApplication, 'DEV_CLIENT_TRY_TO_LAUNCH_LAST_BUNDLE', true?.toString()); 18 return config; 19 }); 20 } 21 return config; 22}, pkg.name, pkg.version); 23