rork-xcode 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.ts +347 -51
- package/dist/index.js +400 -72
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -204,20 +204,26 @@ declare class PbxprojBuildError extends Error {
|
|
|
204
204
|
*/
|
|
205
205
|
declare const Isa: {
|
|
206
206
|
readonly aggregateTarget: "PBXAggregateTarget";
|
|
207
|
+
readonly appleScriptBuildPhase: "PBXAppleScriptBuildPhase";
|
|
207
208
|
readonly buildFile: "PBXBuildFile";
|
|
208
209
|
readonly buildRule: "PBXBuildRule";
|
|
210
|
+
readonly buildStyle: "PBXBuildStyle";
|
|
209
211
|
readonly containerItemProxy: "PBXContainerItemProxy";
|
|
210
212
|
readonly copyFilesBuildPhase: "PBXCopyFilesBuildPhase";
|
|
211
213
|
readonly fileReference: "PBXFileReference";
|
|
212
214
|
readonly fileSystemSynchronizedBuildFileExceptionSet: "PBXFileSystemSynchronizedBuildFileExceptionSet";
|
|
215
|
+
readonly fileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet: "PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet";
|
|
213
216
|
readonly fileSystemSynchronizedRootGroup: "PBXFileSystemSynchronizedRootGroup";
|
|
214
217
|
readonly frameworksBuildPhase: "PBXFrameworksBuildPhase";
|
|
215
218
|
readonly group: "PBXGroup";
|
|
219
|
+
readonly headersBuildPhase: "PBXHeadersBuildPhase";
|
|
216
220
|
readonly legacyTarget: "PBXLegacyTarget";
|
|
217
221
|
readonly nativeTarget: "PBXNativeTarget";
|
|
218
222
|
readonly project: "PBXProject";
|
|
219
223
|
readonly referenceProxy: "PBXReferenceProxy";
|
|
220
224
|
readonly resourcesBuildPhase: "PBXResourcesBuildPhase";
|
|
225
|
+
readonly rezBuildPhase: "PBXRezBuildPhase";
|
|
226
|
+
readonly shellScriptBuildPhase: "PBXShellScriptBuildPhase";
|
|
221
227
|
readonly sourcesBuildPhase: "PBXSourcesBuildPhase";
|
|
222
228
|
readonly targetDependency: "PBXTargetDependency";
|
|
223
229
|
readonly variantGroup: "PBXVariantGroup";
|
|
@@ -405,21 +411,31 @@ interface ReferenceProxyProperties extends PbxprojObject {
|
|
|
405
411
|
sourceTree?: string;
|
|
406
412
|
}
|
|
407
413
|
/**
|
|
408
|
-
* Properties shared by
|
|
409
|
-
* shell-script phases carry the destination and script keys. The standard
|
|
410
|
-
* phases leave them absent.
|
|
414
|
+
* Properties shared by every `PBX*BuildPhase` kind.
|
|
411
415
|
*/
|
|
412
416
|
interface BuildPhaseProperties extends PbxprojObject {
|
|
413
417
|
buildActionMask?: number;
|
|
418
|
+
files?: string[];
|
|
419
|
+
name?: string;
|
|
420
|
+
runOnlyForDeploymentPostprocessing?: number;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Properties of a `PBXCopyFilesBuildPhase`, which adds the destination
|
|
424
|
+
* the files are copied to.
|
|
425
|
+
*/
|
|
426
|
+
interface CopyFilesBuildPhaseProperties extends BuildPhaseProperties {
|
|
414
427
|
dstPath?: string;
|
|
415
428
|
dstSubfolderSpec?: number;
|
|
416
|
-
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Properties of a `PBXShellScriptBuildPhase`, which adds the script, its
|
|
432
|
+
* interpreter, and the declared inputs and outputs.
|
|
433
|
+
*/
|
|
434
|
+
interface ShellScriptBuildPhaseProperties extends BuildPhaseProperties {
|
|
417
435
|
inputFileListPaths?: string[];
|
|
418
436
|
inputPaths?: string[];
|
|
419
|
-
name?: string;
|
|
420
437
|
outputFileListPaths?: string[];
|
|
421
438
|
outputPaths?: string[];
|
|
422
|
-
runOnlyForDeploymentPostprocessing?: number;
|
|
423
439
|
shellPath?: string;
|
|
424
440
|
shellScript?: string;
|
|
425
441
|
}
|
|
@@ -487,15 +503,25 @@ interface ContainerItemProxyProperties extends PbxprojObject {
|
|
|
487
503
|
remoteInfo?: string;
|
|
488
504
|
}
|
|
489
505
|
/**
|
|
490
|
-
* Properties
|
|
491
|
-
*
|
|
492
|
-
* and requirement. Local ones carry the relative path.
|
|
506
|
+
* Properties shared by the Swift package reference kinds. The remote and
|
|
507
|
+
* local interfaces below add their own keys.
|
|
493
508
|
*/
|
|
494
|
-
interface SwiftPackageReferenceProperties extends PbxprojObject {
|
|
495
|
-
|
|
509
|
+
interface SwiftPackageReferenceProperties extends PbxprojObject {}
|
|
510
|
+
/**
|
|
511
|
+
* Properties of an `XCRemoteSwiftPackageReference`, which names a
|
|
512
|
+
* repository and a version requirement.
|
|
513
|
+
*/
|
|
514
|
+
interface RemoteSwiftPackageReferenceProperties extends SwiftPackageReferenceProperties {
|
|
496
515
|
repositoryURL?: string;
|
|
497
516
|
requirement?: PbxprojObject;
|
|
498
517
|
}
|
|
518
|
+
/**
|
|
519
|
+
* Properties of an `XCLocalSwiftPackageReference`, which names a package
|
|
520
|
+
* directory relative to the project.
|
|
521
|
+
*/
|
|
522
|
+
interface LocalSwiftPackageReferenceProperties extends SwiftPackageReferenceProperties {
|
|
523
|
+
relativePath?: string;
|
|
524
|
+
}
|
|
499
525
|
/**
|
|
500
526
|
* Properties of an `XCSwiftPackageProductDependency`.
|
|
501
527
|
*/
|
|
@@ -504,14 +530,28 @@ interface SwiftPackageProductDependencyProperties extends PbxprojObject {
|
|
|
504
530
|
productName?: string;
|
|
505
531
|
}
|
|
506
532
|
/**
|
|
507
|
-
* Properties
|
|
508
|
-
* build-phase-membership variant.
|
|
533
|
+
* Properties shared by the synchronized-folder exception set kinds.
|
|
509
534
|
*/
|
|
510
535
|
interface ExceptionSetProperties extends PbxprojObject {
|
|
511
|
-
buildPhase?: string;
|
|
512
536
|
membershipExceptions?: string[];
|
|
513
537
|
target?: string;
|
|
514
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* Properties of a
|
|
541
|
+
* `PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet`, which
|
|
542
|
+
* adds the build phase the listed files belong to.
|
|
543
|
+
*/
|
|
544
|
+
interface BuildPhaseMembershipExceptionSetProperties extends ExceptionSetProperties {
|
|
545
|
+
buildPhase?: string;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Properties of a `PBXBuildStyle`, the pre-Xcode-2 predecessor of
|
|
549
|
+
* `XCBuildConfiguration` still found in old documents.
|
|
550
|
+
*/
|
|
551
|
+
interface BuildStyleProperties extends PbxprojObject {
|
|
552
|
+
buildSettings?: BuildSettings;
|
|
553
|
+
name?: string;
|
|
554
|
+
}
|
|
515
555
|
//#endregion
|
|
516
556
|
//#region src/model/target.d.ts
|
|
517
557
|
/**
|
|
@@ -526,15 +566,20 @@ declare class Target<Properties extends TargetProperties = TargetProperties> ext
|
|
|
526
566
|
* The target's name, when present.
|
|
527
567
|
*/
|
|
528
568
|
get name(): string | undefined;
|
|
569
|
+
/**
|
|
570
|
+
* The view of the target's configuration list, when the reference
|
|
571
|
+
* resolves.
|
|
572
|
+
*/
|
|
573
|
+
configurationList(): ConfigurationList | undefined;
|
|
529
574
|
/**
|
|
530
575
|
* The views of the target's build configurations, in list order.
|
|
531
576
|
*/
|
|
532
|
-
buildConfigurations():
|
|
577
|
+
buildConfigurations(): BuildConfiguration[];
|
|
533
578
|
/**
|
|
534
|
-
* The settings dictionary of the target's default configuration
|
|
535
|
-
* named by the list's `defaultConfigurationName`, falling
|
|
536
|
-
* first configuration. Returns `undefined` when the target
|
|
537
|
-
* configurations or the default carries no settings dictionary.
|
|
579
|
+
* The settings dictionary of the target's default configuration, which
|
|
580
|
+
* is the one named by the list's `defaultConfigurationName`, falling
|
|
581
|
+
* back to the first configuration. Returns `undefined` when the target
|
|
582
|
+
* has no configurations or the default carries no settings dictionary.
|
|
538
583
|
*/
|
|
539
584
|
defaultConfigurationSettings(): PbxprojObject | undefined;
|
|
540
585
|
/**
|
|
@@ -558,11 +603,10 @@ declare class Target<Properties extends TargetProperties = TargetProperties> ext
|
|
|
558
603
|
*/
|
|
559
604
|
removeBuildSetting(key: string): void;
|
|
560
605
|
/**
|
|
561
|
-
* The views of the target's
|
|
562
|
-
*
|
|
563
|
-
* target through its `target` property.
|
|
606
|
+
* The views of the target's dependencies, in declaration order. Resolve
|
|
607
|
+
* a dependency's target through {@link TargetDependency.target}.
|
|
564
608
|
*/
|
|
565
|
-
dependencies():
|
|
609
|
+
dependencies(): TargetDependency[];
|
|
566
610
|
/**
|
|
567
611
|
* The views of the target's build phases, in build order.
|
|
568
612
|
*/
|
|
@@ -589,7 +633,7 @@ declare class Target<Properties extends TargetProperties = TargetProperties> ext
|
|
|
589
633
|
* @param name Display name of the phase, which is also its match key.
|
|
590
634
|
* @param properties Phase properties, most usefully `shellScript`.
|
|
591
635
|
*/
|
|
592
|
-
ensureShellScriptPhase(name: string, properties?: PbxprojObject):
|
|
636
|
+
ensureShellScriptPhase(name: string, properties?: PbxprojObject): ShellScriptBuildPhase;
|
|
593
637
|
/**
|
|
594
638
|
* Adds a dependency on another target of the same project, wiring the
|
|
595
639
|
* `PBXContainerItemProxy` and `PBXTargetDependency` pair Xcode uses to
|
|
@@ -597,13 +641,14 @@ declare class Target<Properties extends TargetProperties = TargetProperties> ext
|
|
|
597
641
|
*
|
|
598
642
|
* @returns The view of the target dependency object.
|
|
599
643
|
*/
|
|
600
|
-
addDependency(dependency: Target):
|
|
644
|
+
addDependency(dependency: Target): TargetDependency;
|
|
601
645
|
}
|
|
602
646
|
/**
|
|
603
647
|
* A `PBXNativeTarget` is a product the project compiles and packages
|
|
604
648
|
* itself, such as an application or an app extension.
|
|
605
649
|
*/
|
|
606
650
|
declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
651
|
+
static readonly isa: string | null;
|
|
607
652
|
/**
|
|
608
653
|
* The target's product type identifier, for example
|
|
609
654
|
* `com.apple.product-type.application`.
|
|
@@ -618,7 +663,7 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
618
663
|
* The view of the target's product file reference, when the target has
|
|
619
664
|
* one.
|
|
620
665
|
*/
|
|
621
|
-
get productReference():
|
|
666
|
+
get productReference(): FileReference | undefined;
|
|
622
667
|
/**
|
|
623
668
|
* Whether the target builds for watchOS, decided by its product type or
|
|
624
669
|
* its watchOS deployment-target setting.
|
|
@@ -628,7 +673,7 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
628
673
|
* The views of the target's Swift package product dependencies, in
|
|
629
674
|
* declaration order.
|
|
630
675
|
*/
|
|
631
|
-
packageProductDependencies():
|
|
676
|
+
packageProductDependencies(): SwiftPackageProductDependency[];
|
|
632
677
|
/**
|
|
633
678
|
* The views of the target's file-system-synchronized folders, in
|
|
634
679
|
* declaration order.
|
|
@@ -642,15 +687,15 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
642
687
|
/**
|
|
643
688
|
* The target's sources phase, created when missing.
|
|
644
689
|
*/
|
|
645
|
-
ensureSourcesPhase():
|
|
690
|
+
ensureSourcesPhase(): SourcesBuildPhase;
|
|
646
691
|
/**
|
|
647
692
|
* The target's frameworks phase, created when missing.
|
|
648
693
|
*/
|
|
649
|
-
ensureFrameworksPhase():
|
|
694
|
+
ensureFrameworksPhase(): FrameworksBuildPhase;
|
|
650
695
|
/**
|
|
651
696
|
* The target's resources phase, created when missing.
|
|
652
697
|
*/
|
|
653
|
-
ensureResourcesPhase():
|
|
698
|
+
ensureResourcesPhase(): ResourcesBuildPhase;
|
|
654
699
|
/**
|
|
655
700
|
* Embeds another target's product into this target through the
|
|
656
701
|
* copy-files phase its product type calls for ("Embed Foundation
|
|
@@ -664,7 +709,7 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
664
709
|
* @returns The view of the embed phase, or `undefined` when the embedded
|
|
665
710
|
* target has no product reference to embed.
|
|
666
711
|
*/
|
|
667
|
-
embed(extension: NativeTarget):
|
|
712
|
+
embed(extension: NativeTarget): CopyFilesBuildPhase | undefined;
|
|
668
713
|
/**
|
|
669
714
|
* The on-disk folder paths of the file-system-synchronized groups linked
|
|
670
715
|
* to this target. Empty for targets without synchronized folders
|
|
@@ -699,7 +744,7 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
699
744
|
addSwiftPackageProduct(options: {
|
|
700
745
|
productName: string;
|
|
701
746
|
packageReference: XcodeObject;
|
|
702
|
-
}):
|
|
747
|
+
}): SwiftPackageProductDependency;
|
|
703
748
|
/**
|
|
704
749
|
* Links a system framework (for example `Messages`) to this target. It
|
|
705
750
|
* reuses or creates the file reference under the SDK's frameworks
|
|
@@ -709,19 +754,22 @@ declare class NativeTarget extends Target<NativeTargetProperties> {
|
|
|
709
754
|
* @param name Framework name without the `.framework` suffix.
|
|
710
755
|
* @returns The view of the framework's file reference.
|
|
711
756
|
*/
|
|
712
|
-
addSystemFramework(name: string):
|
|
757
|
+
addSystemFramework(name: string): FileReference;
|
|
713
758
|
}
|
|
714
759
|
/**
|
|
715
760
|
* An aggregate target produces nothing itself. It exists to group other
|
|
716
761
|
* targets through its dependencies and to run script or copy-files
|
|
717
762
|
* phases, and the shared target surface covers everything it carries.
|
|
718
763
|
*/
|
|
719
|
-
declare class AggregateTarget extends Target {
|
|
764
|
+
declare class AggregateTarget extends Target {
|
|
765
|
+
static readonly isa: string | null;
|
|
766
|
+
}
|
|
720
767
|
/**
|
|
721
768
|
* A legacy target shells out to an external build tool such as make
|
|
722
769
|
* instead of using Xcode's build system.
|
|
723
770
|
*/
|
|
724
771
|
declare class LegacyTarget extends Target<LegacyTargetProperties> {
|
|
772
|
+
static readonly isa: string | null;
|
|
725
773
|
/**
|
|
726
774
|
* The build tool the target invokes, as an absolute path.
|
|
727
775
|
*/
|
|
@@ -740,11 +788,11 @@ declare class LegacyTarget extends Target<LegacyTargetProperties> {
|
|
|
740
788
|
//#region src/model/objects.d.ts
|
|
741
789
|
/**
|
|
742
790
|
* A `PBXGroup` is a folder in Xcode's navigator, holding references to
|
|
743
|
-
* files and other groups.
|
|
744
|
-
*
|
|
745
|
-
* shape.
|
|
791
|
+
* files and other groups. The type parameter lets subclasses carry a more
|
|
792
|
+
* specific property shape.
|
|
746
793
|
*/
|
|
747
794
|
declare class Group<Properties extends GroupProperties = GroupProperties> extends XcodeObject<Properties> {
|
|
795
|
+
static readonly isa: string | null;
|
|
748
796
|
/**
|
|
749
797
|
* Ids of the group's children, in navigator order. Non-string entries of
|
|
750
798
|
* a malformed document are skipped.
|
|
@@ -786,11 +834,21 @@ declare class Group<Properties extends GroupProperties = GroupProperties> extend
|
|
|
786
834
|
*/
|
|
787
835
|
createFile(path: string): XcodeObject;
|
|
788
836
|
}
|
|
837
|
+
/**
|
|
838
|
+
* A `PBXVariantGroup` holds the localized variants of one file, one child
|
|
839
|
+
* per language. Everything else behaves like a plain group.
|
|
840
|
+
*/
|
|
841
|
+
declare class VariantGroup extends Group {
|
|
842
|
+
static readonly isa: string | null;
|
|
843
|
+
}
|
|
789
844
|
/**
|
|
790
845
|
* A build phase is an ordered list of build files processed by one step
|
|
791
|
-
* of a target's build. Every `PBX*BuildPhase` kind
|
|
846
|
+
* of a target's build. Every `PBX*BuildPhase` kind extends this view, and
|
|
847
|
+
* kinds without a class of their own still map here through the factory's
|
|
848
|
+
* suffix fallback. The type parameter lets subclasses carry a more
|
|
849
|
+
* specific property shape.
|
|
792
850
|
*/
|
|
793
|
-
declare class BuildPhase extends XcodeObject<
|
|
851
|
+
declare class BuildPhase<Properties extends BuildPhaseProperties = BuildPhaseProperties> extends XcodeObject<Properties> {
|
|
794
852
|
/**
|
|
795
853
|
* The phase's display name, when it carries an explicit one. Xcode names
|
|
796
854
|
* copy-files and shell-script phases; the standard phases derive their
|
|
@@ -831,13 +889,102 @@ declare class BuildPhase extends XcodeObject<BuildPhaseProperties> {
|
|
|
831
889
|
ensureBuildFile(reference: XcodeObject, options?: {
|
|
832
890
|
referenceKey?: "fileRef" | "productRef";
|
|
833
891
|
settings?: Record<string, string[] | string>;
|
|
834
|
-
}):
|
|
892
|
+
}): BuildFile;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* A `PBXSourcesBuildPhase` compiles the target's source files.
|
|
896
|
+
*/
|
|
897
|
+
declare class SourcesBuildPhase extends BuildPhase {
|
|
898
|
+
static readonly isa: string | null;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* A `PBXFrameworksBuildPhase` links the target against frameworks,
|
|
902
|
+
* libraries, and Swift package products.
|
|
903
|
+
*/
|
|
904
|
+
declare class FrameworksBuildPhase extends BuildPhase {
|
|
905
|
+
static readonly isa: string | null;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* A `PBXResourcesBuildPhase` copies the target's resources into the
|
|
909
|
+
* built product.
|
|
910
|
+
*/
|
|
911
|
+
declare class ResourcesBuildPhase extends BuildPhase {
|
|
912
|
+
static readonly isa: string | null;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* A `PBXHeadersBuildPhase` installs a framework target's headers with
|
|
916
|
+
* their public, private, or project visibility.
|
|
917
|
+
*/
|
|
918
|
+
declare class HeadersBuildPhase extends BuildPhase {
|
|
919
|
+
static readonly isa: string | null;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* A `PBXCopyFilesBuildPhase` copies its build files to a destination
|
|
923
|
+
* inside the built product, which is how extensions and watch apps embed.
|
|
924
|
+
*/
|
|
925
|
+
declare class CopyFilesBuildPhase extends BuildPhase<CopyFilesBuildPhaseProperties> {
|
|
926
|
+
static readonly isa: string | null;
|
|
927
|
+
/**
|
|
928
|
+
* The destination path inside the folder `dstSubfolderSpec` selects,
|
|
929
|
+
* when present.
|
|
930
|
+
*/
|
|
931
|
+
get dstPath(): string | undefined;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* A `PBXShellScriptBuildPhase` runs a script during the build.
|
|
935
|
+
*/
|
|
936
|
+
declare class ShellScriptBuildPhase extends BuildPhase<ShellScriptBuildPhaseProperties> {
|
|
937
|
+
static readonly isa: string | null;
|
|
938
|
+
/**
|
|
939
|
+
* The script's source text, when present.
|
|
940
|
+
*/
|
|
941
|
+
get shellScript(): string | undefined;
|
|
942
|
+
/**
|
|
943
|
+
* The interpreter the script runs under, when present. Xcode's default
|
|
944
|
+
* is `/bin/sh`.
|
|
945
|
+
*/
|
|
946
|
+
get shellPath(): string | undefined;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* A `PBXRezBuildPhase` runs Rez, the classic Mac OS resource compiler,
|
|
950
|
+
* over `.r` files. Xcode's UI called it "Build Carbon Resources".
|
|
951
|
+
* Current Xcode no longer creates these phases, but old documents still
|
|
952
|
+
* carry them.
|
|
953
|
+
*/
|
|
954
|
+
declare class RezBuildPhase extends BuildPhase {
|
|
955
|
+
static readonly isa: string | null;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* A `PBXAppleScriptBuildPhase` compiles AppleScript sources. Current
|
|
959
|
+
* Xcode no longer creates these, but old documents still carry them.
|
|
960
|
+
*/
|
|
961
|
+
declare class AppleScriptBuildPhase extends BuildPhase {
|
|
962
|
+
static readonly isa: string | null;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* A `PBXBuildFile` places one file reference or package product inside
|
|
966
|
+
* one build phase, optionally with per-file settings.
|
|
967
|
+
*/
|
|
968
|
+
declare class BuildFile extends XcodeObject<BuildFileProperties> {
|
|
969
|
+
static readonly isa: string | null;
|
|
970
|
+
/**
|
|
971
|
+
* The view of the file reference the build file points at, when it
|
|
972
|
+
* points at one. Build files for Swift package products carry a
|
|
973
|
+
* `productRef` instead; see {@link productDependency}.
|
|
974
|
+
*/
|
|
975
|
+
fileReference(): XcodeObject | undefined;
|
|
976
|
+
/**
|
|
977
|
+
* The view of the Swift package product dependency the build file
|
|
978
|
+
* points at, when it points at one.
|
|
979
|
+
*/
|
|
980
|
+
productDependency(): SwiftPackageProductDependency | undefined;
|
|
835
981
|
}
|
|
836
982
|
/**
|
|
837
983
|
* A `PBXFileSystemSynchronizedRootGroup` is an Xcode 16 folder whose
|
|
838
984
|
* members are synchronized from disk instead of listed individually.
|
|
839
985
|
*/
|
|
840
986
|
declare class SyncRootGroup extends XcodeObject<SyncRootGroupProperties> {
|
|
987
|
+
static readonly isa: string | null;
|
|
841
988
|
/**
|
|
842
989
|
* The group's on-disk folder path, when present.
|
|
843
990
|
*/
|
|
@@ -860,13 +1007,51 @@ declare class SyncRootGroup extends XcodeObject<SyncRootGroupProperties> {
|
|
|
860
1007
|
* @param membershipExceptions File names inside the folder to exclude.
|
|
861
1008
|
* @returns The view of the target's exception set for this folder.
|
|
862
1009
|
*/
|
|
863
|
-
addMembershipExceptions(target: NativeTarget, membershipExceptions: string[]):
|
|
1010
|
+
addMembershipExceptions(target: NativeTarget, membershipExceptions: string[]): BuildFileExceptionSet;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Behavior shared by the synchronized-folder exception set kinds, which
|
|
1014
|
+
* carve files out of a folder's automatic membership for one target. The
|
|
1015
|
+
* type parameter lets subclasses carry a more specific property shape.
|
|
1016
|
+
*/
|
|
1017
|
+
declare class ExceptionSet<Properties extends ExceptionSetProperties = ExceptionSetProperties> extends XcodeObject<Properties> {
|
|
1018
|
+
/**
|
|
1019
|
+
* The file names the set excludes, in declaration order. Non-string
|
|
1020
|
+
* entries of a malformed document are skipped.
|
|
1021
|
+
*/
|
|
1022
|
+
get membershipExceptions(): string[];
|
|
1023
|
+
/**
|
|
1024
|
+
* The view of the target whose membership the set restricts, when the
|
|
1025
|
+
* reference resolves.
|
|
1026
|
+
*/
|
|
1027
|
+
target(): XcodeObject | undefined;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* A `PBXFileSystemSynchronizedBuildFileExceptionSet` excludes files from
|
|
1031
|
+
* a synchronized folder's automatic target membership.
|
|
1032
|
+
*/
|
|
1033
|
+
declare class BuildFileExceptionSet extends ExceptionSet {
|
|
1034
|
+
static readonly isa: string | null;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* A `PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet`
|
|
1038
|
+
* assigns some of a synchronized folder's files to a different build
|
|
1039
|
+
* phase than the automatic one.
|
|
1040
|
+
*/
|
|
1041
|
+
declare class BuildPhaseMembershipExceptionSet extends ExceptionSet<BuildPhaseMembershipExceptionSetProperties> {
|
|
1042
|
+
static readonly isa: string | null;
|
|
1043
|
+
/**
|
|
1044
|
+
* The view of the build phase the listed files belong to, when the
|
|
1045
|
+
* reference resolves.
|
|
1046
|
+
*/
|
|
1047
|
+
buildPhase(): BuildPhase | undefined;
|
|
864
1048
|
}
|
|
865
1049
|
/**
|
|
866
1050
|
* A `PBXBuildRule` tells a target which compiler or script processes a
|
|
867
1051
|
* kind of file.
|
|
868
1052
|
*/
|
|
869
1053
|
declare class BuildRule extends XcodeObject<BuildRuleProperties> {
|
|
1054
|
+
static readonly isa: string | null;
|
|
870
1055
|
/**
|
|
871
1056
|
* The rule's script, when it is a script rule rather than a reference
|
|
872
1057
|
* to a compiler specification.
|
|
@@ -879,6 +1064,7 @@ declare class BuildRule extends XcodeObject<BuildRuleProperties> {
|
|
|
879
1064
|
* `currentVersion` names the active one.
|
|
880
1065
|
*/
|
|
881
1066
|
declare class VersionGroup extends Group<VersionGroupProperties> {
|
|
1067
|
+
static readonly isa: string | null;
|
|
882
1068
|
/**
|
|
883
1069
|
* The view of the active model version's file reference, when the group
|
|
884
1070
|
* names one.
|
|
@@ -895,6 +1081,7 @@ declare class VersionGroup extends Group<VersionGroupProperties> {
|
|
|
895
1081
|
* target or of the project, for example Debug or Release.
|
|
896
1082
|
*/
|
|
897
1083
|
declare class BuildConfiguration extends XcodeObject<BuildConfigurationProperties> {
|
|
1084
|
+
static readonly isa: string | null;
|
|
898
1085
|
/**
|
|
899
1086
|
* The configuration's name, when present.
|
|
900
1087
|
*/
|
|
@@ -907,11 +1094,30 @@ declare class BuildConfiguration extends XcodeObject<BuildConfigurationPropertie
|
|
|
907
1094
|
*/
|
|
908
1095
|
get buildSettings(): BuildSettings | undefined;
|
|
909
1096
|
}
|
|
1097
|
+
/**
|
|
1098
|
+
* A `PBXBuildStyle` is the pre-Xcode-2 predecessor of
|
|
1099
|
+
* `XCBuildConfiguration`. Current Xcode neither creates nor reads them,
|
|
1100
|
+
* but old documents still carry them.
|
|
1101
|
+
*/
|
|
1102
|
+
declare class BuildStyle extends XcodeObject<BuildStyleProperties> {
|
|
1103
|
+
static readonly isa: string | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* The style's name, when present.
|
|
1106
|
+
*/
|
|
1107
|
+
get name(): string | undefined;
|
|
1108
|
+
/**
|
|
1109
|
+
* The style's settings dictionary, or `undefined` when the style
|
|
1110
|
+
* carries none. The dictionary is live. Writes through it land in the
|
|
1111
|
+
* document.
|
|
1112
|
+
*/
|
|
1113
|
+
get buildSettings(): BuildSettings | undefined;
|
|
1114
|
+
}
|
|
910
1115
|
/**
|
|
911
1116
|
* A `PBXFileReference` names one file on disk, from source files to the
|
|
912
1117
|
* built products themselves.
|
|
913
1118
|
*/
|
|
914
1119
|
declare class FileReference extends XcodeObject<FileReferenceProperties> {
|
|
1120
|
+
static readonly isa: string | null;
|
|
915
1121
|
/**
|
|
916
1122
|
* The reference's path, relative to its `sourceTree`, when present.
|
|
917
1123
|
*/
|
|
@@ -927,17 +1133,96 @@ declare class FileReference extends XcodeObject<FileReferenceProperties> {
|
|
|
927
1133
|
* target dependency and the target it points at.
|
|
928
1134
|
*/
|
|
929
1135
|
declare class ContainerItemProxy extends XcodeObject<ContainerItemProxyProperties> {
|
|
1136
|
+
static readonly isa: string | null;
|
|
930
1137
|
/**
|
|
931
1138
|
* The display name of the object the proxy points at, when present.
|
|
932
1139
|
* For target dependencies this is the target's name.
|
|
933
1140
|
*/
|
|
934
1141
|
get remoteInfo(): string | undefined;
|
|
935
1142
|
}
|
|
1143
|
+
/**
|
|
1144
|
+
* A `PBXTargetDependency` records that one target must build before
|
|
1145
|
+
* another, through a container item proxy naming the prerequisite.
|
|
1146
|
+
*/
|
|
1147
|
+
declare class TargetDependency extends XcodeObject<TargetDependencyProperties> {
|
|
1148
|
+
static readonly isa: string | null;
|
|
1149
|
+
/**
|
|
1150
|
+
* The view of the target this dependency points at, when the reference
|
|
1151
|
+
* resolves to one inside this document.
|
|
1152
|
+
*/
|
|
1153
|
+
target(): XcodeObject | undefined;
|
|
1154
|
+
/**
|
|
1155
|
+
* The view of the dependency's container item proxy, when the reference
|
|
1156
|
+
* resolves.
|
|
1157
|
+
*/
|
|
1158
|
+
targetProxy(): ContainerItemProxy | undefined;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* An `XCConfigurationList` owns the named build configurations of one
|
|
1162
|
+
* target or of the project, plus the default configuration choice.
|
|
1163
|
+
*/
|
|
1164
|
+
declare class ConfigurationList extends XcodeObject<ConfigurationListProperties> {
|
|
1165
|
+
static readonly isa: string | null;
|
|
1166
|
+
/**
|
|
1167
|
+
* The name of the configuration builds use when none is specified, when
|
|
1168
|
+
* present.
|
|
1169
|
+
*/
|
|
1170
|
+
get defaultConfigurationName(): string | undefined;
|
|
1171
|
+
/**
|
|
1172
|
+
* The views of the list's build configurations, in list order. Dangling
|
|
1173
|
+
* ids and objects of other kinds are skipped.
|
|
1174
|
+
*/
|
|
1175
|
+
configurations(): BuildConfiguration[];
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Behavior shared by the Swift package reference kinds. The type
|
|
1179
|
+
* parameter lets subclasses carry a more specific property shape.
|
|
1180
|
+
*/
|
|
1181
|
+
declare class SwiftPackageReference<Properties extends SwiftPackageReferenceProperties = SwiftPackageReferenceProperties> extends XcodeObject<Properties> {}
|
|
1182
|
+
/**
|
|
1183
|
+
* An `XCRemoteSwiftPackageReference` names a package repository and a
|
|
1184
|
+
* version requirement.
|
|
1185
|
+
*/
|
|
1186
|
+
declare class RemoteSwiftPackageReference extends SwiftPackageReference<RemoteSwiftPackageReferenceProperties> {
|
|
1187
|
+
static readonly isa: string | null;
|
|
1188
|
+
/**
|
|
1189
|
+
* The package's repository URL, when present.
|
|
1190
|
+
*/
|
|
1191
|
+
get repositoryURL(): string | undefined;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* An `XCLocalSwiftPackageReference` names a package directory relative
|
|
1195
|
+
* to the project.
|
|
1196
|
+
*/
|
|
1197
|
+
declare class LocalSwiftPackageReference extends SwiftPackageReference<LocalSwiftPackageReferenceProperties> {
|
|
1198
|
+
static readonly isa: string | null;
|
|
1199
|
+
/**
|
|
1200
|
+
* The package's path relative to the project, when present.
|
|
1201
|
+
*/
|
|
1202
|
+
get relativePath(): string | undefined;
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* An `XCSwiftPackageProductDependency` links one product of a Swift
|
|
1206
|
+
* package to the target that consumes it.
|
|
1207
|
+
*/
|
|
1208
|
+
declare class SwiftPackageProductDependency extends XcodeObject<SwiftPackageProductDependencyProperties> {
|
|
1209
|
+
static readonly isa: string | null;
|
|
1210
|
+
/**
|
|
1211
|
+
* The product's name as the package manifest declares it, when present.
|
|
1212
|
+
*/
|
|
1213
|
+
get productName(): string | undefined;
|
|
1214
|
+
/**
|
|
1215
|
+
* The view of the package reference the product comes from, when the
|
|
1216
|
+
* reference resolves. Products of local packages can omit it.
|
|
1217
|
+
*/
|
|
1218
|
+
packageReference(): SwiftPackageReference | undefined;
|
|
1219
|
+
}
|
|
936
1220
|
/**
|
|
937
1221
|
* A `PBXReferenceProxy` stands in for a product built by a target of
|
|
938
1222
|
* another project referenced from this one.
|
|
939
1223
|
*/
|
|
940
1224
|
declare class ReferenceProxy extends XcodeObject<ReferenceProxyProperties> {
|
|
1225
|
+
static readonly isa: string | null;
|
|
941
1226
|
/**
|
|
942
1227
|
* The proxy's product path inside the other project's build directory,
|
|
943
1228
|
* when present.
|
|
@@ -947,7 +1232,7 @@ declare class ReferenceProxy extends XcodeObject<ReferenceProxyProperties> {
|
|
|
947
1232
|
* The view of the container item proxy that names the remote target,
|
|
948
1233
|
* when the reference resolves.
|
|
949
1234
|
*/
|
|
950
|
-
remoteReference():
|
|
1235
|
+
remoteReference(): ContainerItemProxy | undefined;
|
|
951
1236
|
}
|
|
952
1237
|
//#endregion
|
|
953
1238
|
//#region src/model/project.d.ts
|
|
@@ -956,6 +1241,7 @@ declare class ReferenceProxy extends XcodeObject<ReferenceProxyProperties> {
|
|
|
956
1241
|
* the main group, and the project-level configurations.
|
|
957
1242
|
*/
|
|
958
1243
|
declare class RootProject extends XcodeObject<RootProjectProperties> {
|
|
1244
|
+
static readonly isa: string | null;
|
|
959
1245
|
/**
|
|
960
1246
|
* Ids of the project's targets, in project order.
|
|
961
1247
|
*/
|
|
@@ -975,7 +1261,7 @@ declare class RootProject extends XcodeObject<RootProjectProperties> {
|
|
|
975
1261
|
* The views of the project's Swift package references, remote and local,
|
|
976
1262
|
* in declaration order.
|
|
977
1263
|
*/
|
|
978
|
-
packageReferences():
|
|
1264
|
+
packageReferences(): SwiftPackageReference[];
|
|
979
1265
|
/**
|
|
980
1266
|
* The group product references live in, creating it (and registering it
|
|
981
1267
|
* as the project's `productRefGroup`) when missing.
|
|
@@ -1131,7 +1417,7 @@ declare class XcodeProject {
|
|
|
1131
1417
|
/**
|
|
1132
1418
|
* Finds the remote Swift package reference for a repository URL.
|
|
1133
1419
|
*/
|
|
1134
|
-
findSwiftPackage(repositoryUrl: string):
|
|
1420
|
+
findSwiftPackage(repositoryUrl: string): RemoteSwiftPackageReference | undefined;
|
|
1135
1421
|
/**
|
|
1136
1422
|
* Adds a remote Swift package reference and registers it on the project.
|
|
1137
1423
|
* When the project already references the repository, the existing
|
|
@@ -1148,11 +1434,11 @@ declare class XcodeProject {
|
|
|
1148
1434
|
addSwiftPackage(options: {
|
|
1149
1435
|
repositoryURL: string;
|
|
1150
1436
|
requirement: Record<string, string>;
|
|
1151
|
-
}):
|
|
1437
|
+
}): RemoteSwiftPackageReference;
|
|
1152
1438
|
/**
|
|
1153
1439
|
* Finds the local Swift package reference for a directory path.
|
|
1154
1440
|
*/
|
|
1155
|
-
findLocalSwiftPackage(relativePath: string):
|
|
1441
|
+
findLocalSwiftPackage(relativePath: string): LocalSwiftPackageReference | undefined;
|
|
1156
1442
|
/**
|
|
1157
1443
|
* Adds a local (path-based) Swift package reference and registers it on
|
|
1158
1444
|
* the project, returning the existing reference when the path is already
|
|
@@ -1162,13 +1448,13 @@ declare class XcodeProject {
|
|
|
1162
1448
|
* @param relativePath The package directory, relative to the project.
|
|
1163
1449
|
* @returns The view of the package reference for the path.
|
|
1164
1450
|
*/
|
|
1165
|
-
addLocalSwiftPackage(relativePath: string):
|
|
1451
|
+
addLocalSwiftPackage(relativePath: string): LocalSwiftPackageReference;
|
|
1166
1452
|
/**
|
|
1167
1453
|
* The views of every `PBXBuildFile` that points at the referenced object
|
|
1168
1454
|
* through `fileRef` or `productRef`. Useful for relocating a product
|
|
1169
1455
|
* between copy phases.
|
|
1170
1456
|
*/
|
|
1171
|
-
buildFilesReferencing(reference: XcodeObject):
|
|
1457
|
+
buildFilesReferencing(reference: XcodeObject): BuildFile[];
|
|
1172
1458
|
/**
|
|
1173
1459
|
* Validates the document's object graph and returns every problem
|
|
1174
1460
|
* found. An empty array means the graph is structurally sound. The
|
|
@@ -1233,8 +1519,10 @@ declare class XcodeProject {
|
|
|
1233
1519
|
*/
|
|
1234
1520
|
findFileReference(projectRelativePath: string): XcodeObject | undefined;
|
|
1235
1521
|
/**
|
|
1236
|
-
* Creates the typed view for an object, dispatching on
|
|
1237
|
-
*
|
|
1522
|
+
* Creates the typed view for an object, dispatching on the isa each
|
|
1523
|
+
* view class declares. Unknown `PBX*BuildPhase` kinds still map to
|
|
1524
|
+
* {@link BuildPhase}, and everything else outside the vocabulary gets
|
|
1525
|
+
* the generic base view.
|
|
1238
1526
|
*/
|
|
1239
1527
|
private createView;
|
|
1240
1528
|
}
|
|
@@ -1253,6 +1541,14 @@ declare class XcodeProject {
|
|
|
1253
1541
|
* itself always reads through the narrowing accessors.
|
|
1254
1542
|
*/
|
|
1255
1543
|
declare class XcodeObject<Properties extends PbxprojObject = PbxprojObject> {
|
|
1544
|
+
/**
|
|
1545
|
+
* The `isa` name this view class models. Each concrete view declares
|
|
1546
|
+
* its own, and the project's view factory dispatches on it, so the
|
|
1547
|
+
* class itself is the source of truth for which objects it covers.
|
|
1548
|
+
* Classes that only share behavior, like this base class and the
|
|
1549
|
+
* abstract target and phase bases, declare `null` and never route.
|
|
1550
|
+
*/
|
|
1551
|
+
static readonly isa: string | null;
|
|
1256
1552
|
/** The project this object belongs to. */
|
|
1257
1553
|
readonly project: XcodeProject;
|
|
1258
1554
|
/** The object's 24-character identifier (its key in `objects`). */
|
|
@@ -1574,4 +1870,4 @@ declare function parseXcscheme(text: string): XcschemeDocument;
|
|
|
1574
1870
|
*/
|
|
1575
1871
|
declare function generateObjectId(seed: string, existing: ReadonlySet<string>): string;
|
|
1576
1872
|
//#endregion
|
|
1577
|
-
export { type AddNativeTargetOptions, AggregateTarget, type ApplePlatform, BuildConfiguration, type BuildConfigurationProperties, type BuildFileProperties, BuildPhase, type BuildPhaseProperties, BuildRule, type BuildRuleProperties, type BuildSettings, BuildableReference, type ConfigurationListProperties, ContainerItemProxy, type ContainerItemProxyProperties, CopyFilesDestination, type CreateXcschemeOptions, type ExceptionSetProperties, FileReference, type FileReferenceProperties, Group, type GroupProperties, Isa, LegacyTarget, type LegacyTargetProperties, NativeTarget, type NativeTargetProperties, type PbxprojArray, PbxprojBuildError, type PbxprojErrorPosition, type PbxprojObject, PbxprojParseError, type PbxprojValue, ProductType, type ProjectIssue, type ProjectIssueKind, ReferenceProxy, type ReferenceProxyProperties, RootProject, type RootProjectProperties, type SwiftPackageProductDependencyProperties, type SwiftPackageReferenceProperties, SyncRootGroup, type SyncRootGroupProperties, Target, type TargetDependencyProperties, type TargetProperties, VersionGroup, type VersionGroupProperties, XcodeModelError, XcodeObject, XcodeProject, Xcscheme, XcschemeBuildError, type XcschemeComment, type XcschemeDocument, type XcschemeElement, type XcschemeNode, XcschemeParseError, buildPbxproj, buildXcscheme, createXcscheme, generateObjectId, isXcschemeElement, parsePbxproj, parseXcscheme, xcschemeElements };
|
|
1873
|
+
export { type AddNativeTargetOptions, AggregateTarget, type ApplePlatform, AppleScriptBuildPhase, BuildConfiguration, type BuildConfigurationProperties, BuildFile, BuildFileExceptionSet, type BuildFileProperties, BuildPhase, BuildPhaseMembershipExceptionSet, type BuildPhaseMembershipExceptionSetProperties, type BuildPhaseProperties, BuildRule, type BuildRuleProperties, type BuildSettings, BuildStyle, type BuildStyleProperties, BuildableReference, ConfigurationList, type ConfigurationListProperties, ContainerItemProxy, type ContainerItemProxyProperties, CopyFilesBuildPhase, type CopyFilesBuildPhaseProperties, CopyFilesDestination, type CreateXcschemeOptions, ExceptionSet, type ExceptionSetProperties, FileReference, type FileReferenceProperties, FrameworksBuildPhase, Group, type GroupProperties, HeadersBuildPhase, Isa, LegacyTarget, type LegacyTargetProperties, LocalSwiftPackageReference, type LocalSwiftPackageReferenceProperties, NativeTarget, type NativeTargetProperties, type PbxprojArray, PbxprojBuildError, type PbxprojErrorPosition, type PbxprojObject, PbxprojParseError, type PbxprojValue, ProductType, type ProjectIssue, type ProjectIssueKind, ReferenceProxy, type ReferenceProxyProperties, RemoteSwiftPackageReference, type RemoteSwiftPackageReferenceProperties, ResourcesBuildPhase, RezBuildPhase, RootProject, type RootProjectProperties, ShellScriptBuildPhase, type ShellScriptBuildPhaseProperties, SourcesBuildPhase, SwiftPackageProductDependency, type SwiftPackageProductDependencyProperties, SwiftPackageReference, type SwiftPackageReferenceProperties, SyncRootGroup, type SyncRootGroupProperties, Target, TargetDependency, type TargetDependencyProperties, type TargetProperties, VariantGroup, VersionGroup, type VersionGroupProperties, XcodeModelError, XcodeObject, XcodeProject, Xcscheme, XcschemeBuildError, type XcschemeComment, type XcschemeDocument, type XcschemeElement, type XcschemeNode, XcschemeParseError, buildPbxproj, buildXcscheme, createXcscheme, generateObjectId, isXcschemeElement, parsePbxproj, parseXcscheme, xcschemeElements };
|