(buildArgs, targetName)
| 724 | } |
| 725 | |
| 726 | function readXcodeBuildSettings(buildArgs, targetName) { |
| 727 | const output = runText("xcodebuild", [ |
| 728 | ...buildArgs, |
| 729 | "-showBuildSettings", |
| 730 | "-json", |
| 731 | ]); |
| 732 | const settings = JSON.parse(output); |
| 733 | if (!Array.isArray(settings) || settings.length === 0) { |
| 734 | throw new Error( |
| 735 | "xcodebuild -showBuildSettings returned no target settings.", |
| 736 | ); |
| 737 | } |
| 738 | if (targetName) { |
| 739 | const match = settings.find((item) => item.target === targetName); |
| 740 | if (match) { |
| 741 | return match; |
| 742 | } |
| 743 | } |
| 744 | return ( |
| 745 | settings.find((item) => item.buildSettings?.PRODUCT_MODULE_NAME) ?? |
| 746 | settings[0] |
| 747 | ); |
| 748 | } |
| 749 | |
| 750 | function findBuiltAppPath(settings) { |
| 751 | const wrapperName = settings.WRAPPER_NAME; |
no test coverage detected