xref: /expo/tools/src/prebuilds/XcodeGen.types.ts (revision eeffdb10)
1// More detailed spec schema available here:
2// https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md
3export type ProjectSpec = {
4  name: string;
5  projectReferences?: {
6    [key: string]: {
7      path: string;
8    };
9  };
10  targets?: {
11    [targetName: string]: {
12      type: string;
13      platform: ProjectSpecPlatform[];
14      sources?: ProjectSpecSource[];
15      dependencies?: ProjectSpecDependency[];
16      settings?: ProjectSpecSettings;
17      info?: {
18        path: string;
19        properties: Record<string, string>;
20      };
21    };
22  };
23  options?: ProjectSpecOptions;
24  settings?: ProjectSpecSettings;
25};
26
27export type ProjectSpecPlatform = 'iOS' | 'macOS' | 'tvOS' | 'watchOS';
28
29export type ProjectSpecSource = {
30  path: string;
31  name?: string;
32  createIntermediateGroups?: boolean;
33  includes?: string[];
34  excludes?: string[];
35  compilerFlags?: string;
36};
37
38export type ProjectSpecDependency = {
39  // framework type
40  framework?: string;
41  implicit?: boolean;
42
43  // target/project type
44  target?: string;
45
46  // SDK framework
47  sdk?: string;
48
49  // shared options
50  embed?: boolean;
51  link?: boolean;
52  codeSign?: boolean;
53  removeHeaders?: boolean;
54  weak?: boolean;
55};
56
57export type ProjectSpecOptions = {
58  minimumXcodeGenVersion: string;
59  deploymentTarget: Record<ProjectSpecPlatform, string>;
60};
61
62export type ProjectSpecSettings = {
63  base: XcodeConfig;
64};
65
66export type XcodeConfig = Record<string, string>;
67