| 1 | import type { XcodeProject } from "expo/config-plugins"; |
| 2 | |
| 3 | export function addProductFile( |
| 4 | xcodeProject: XcodeProject, |
| 5 | { targetName, groupName }: { targetName: string; groupName: string }, |
| 6 | ) { |
| 7 | const options = { |
| 8 | basename: `${targetName}.app`, |
| 9 | // fileRef: xcodeProject.generateUuid(), |
| 10 | // uuid: xcodeProject.generateUuid(), |
| 11 | group: groupName, |
| 12 | explicitFileType: "wrapper.application", |
| 13 | /* fileEncoding: 4, */ |
| 14 | settings: { |
| 15 | ATTRIBUTES: ["RemoveHeadersOnCopy"], |
| 16 | }, |
| 17 | includeInIndex: 0, |
| 18 | path: `${targetName}.app`, |
| 19 | sourceTree: "BUILT_PRODUCTS_DIR", |
| 20 | }; |
| 21 | |
| 22 | const productFile = xcodeProject.addProductFile(targetName, options); |
| 23 | |
| 24 | return productFile; |
| 25 | } |