Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objectVersion = 90;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -48,15 +48,13 @@
/* Begin PBXCopyFilesBuildPhase section */
BF31C3A479ECD7CBA0640A2F /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed this is another change in Xcode 26. I created an issue for it to tackle separately.

dstSubfolder = Frameworks;
files = (
C2317A164A6A4F635FE4CCD7 /* Framework1.framework in Embed Frameworks */,
3108C05C7B0C4FD6AC077294 /* Framework2.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

Expand All @@ -67,18 +65,15 @@
6D728BF5C49E97251DA378AE /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
87A3E8A0727A99EE88ED4E64 /* Framework1.xcodeproj */ = {isa = PBXFileReference; explicitFileType = "wrapper.pb-project"; includeInIndex = 0; name = Framework1.xcodeproj; path = ../Framework1/Framework1.xcodeproj; sourceTree = SOURCE_ROOT; };
E203E65EDD1A90FCBAA42C9E /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
F09268C492FF78A6C82868C6 /* App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "App-Info.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B27C7CF4B617049554976EFD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5D8C48ABB7D5D013DDBD67AA /* Framework1.framework in Frameworks */,
C57CB036110A3D5DCC9E437A /* Framework2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

Expand All @@ -100,14 +95,6 @@
name = Products;
sourceTree = "<group>";
};
20C83B4860AC239B5E5FDF3C /* InfoPlists */ = {
isa = PBXGroup;
children = (
F09268C492FF78A6C82868C6 /* App-Info.plist */,
);
path = InfoPlists;
sourceTree = "<group>";
};
30CD57449DD0BAD1F51809C3 /* Products */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -160,6 +147,7 @@
F1BC716AD69EACCBD2A2DDBC /* Resources */,
BF31C3A479ECD7CBA0640A2F /* Embed Frameworks */,
B27C7CF4B617049554976EFD /* Frameworks */,
0579081E2ED74460006A6AFB /* custom script */,
);
buildRules = (
);
Expand All @@ -168,8 +156,6 @@
CD591349E38A6A3EB5AA81DD /* PBXTargetDependency */,
);
name = App;
packageProductDependencies = (
);
productName = App;
productReference = E203E65EDD1A90FCBAA42C9E /* App.app */;
productType = "com.apple.product-type.application";
Expand All @@ -181,16 +167,17 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1640;
};
buildConfigurationList = C94346B8B75719D8319921C2 /* Build configuration list for PBXProject "Test" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 0767F0D2E9F7C0B23673A1B1;
preferredProjectObjectVersion = 90;
productRefGroup = 73B13978C93862E5AD69BCC8 /* Products */;
projectDirPath = "";
projectReferences = (
Expand Down Expand Up @@ -230,21 +217,31 @@
/* Begin PBXResourcesBuildPhase section */
F1BC716AD69EACCBD2A2DDBC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0579081E2ED74460006A6AFB /* custom script */ = {
isa = PBXShellScriptBuildPhase;
name = "custom script";
shellPath = /bin/sh;
shellScript = (
"# comment",
"ls -la",
"ls -la",
"",
);
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
2053EE4C6238D6C3AEB2ADB3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D2AE54DED6608D5B956A5E45 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

Expand All @@ -262,7 +259,7 @@
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
0B98A64D6F621FDCEEA0CE44 /* Debug */ = {
0B98A64D6F621FDCEEA0CE44 /* Debug configuration for PBXNativeTarget "App" */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
Expand All @@ -287,7 +284,7 @@
};
name = Debug;
};
58BAFCCFAE3AD62113BBEDEF /* Debug */ = {
58BAFCCFAE3AD62113BBEDEF /* Debug configuration for PBXProject "Test" */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
Expand Down Expand Up @@ -326,6 +323,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -346,7 +344,7 @@
};
name = Debug;
};
5904C1CCA86A83838723C772 /* Release */ = {
5904C1CCA86A83838723C772 /* Release configuration for PBXProject "Test" */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
Expand Down Expand Up @@ -385,6 +383,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -399,7 +398,7 @@
};
name = Release;
};
5E15950A8DD3B82ED1ED7849 /* Release */ = {
5E15950A8DD3B82ED1ED7849 /* Release configuration for PBXNativeTarget "App" */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
Expand Down Expand Up @@ -429,19 +428,17 @@
BAA38452720711B406475F28 /* Build configuration list for PBXNativeTarget "App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0B98A64D6F621FDCEEA0CE44 /* Debug */,
5E15950A8DD3B82ED1ED7849 /* Release */,
0B98A64D6F621FDCEEA0CE44 /* Debug configuration for PBXNativeTarget "App" */,
5E15950A8DD3B82ED1ED7849 /* Release configuration for PBXNativeTarget "App" */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C94346B8B75719D8319921C2 /* Build configuration list for PBXProject "Test" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58BAFCCFAE3AD62113BBEDEF /* Debug */,
5904C1CCA86A83838723C772 /* Release */,
58BAFCCFAE3AD62113BBEDEF /* Debug configuration for PBXProject "Test" */,
5904C1CCA86A83838723C772 /* Release configuration for PBXProject "Test" */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ public final class PBXShellScriptBuildPhase: PBXBuildPhase {
inputPaths = try (container.decodeIfPresent(.inputPaths)) ?? []
outputPaths = try (container.decodeIfPresent(.outputPaths)) ?? []
shellPath = try container.decodeIfPresent(.shellPath)
shellScript = try container.decodeIfPresent(.shellScript)
// Xcode 16.0 introduced a new format for shellScript, so we need to handle both cases.
if let scriptArray = try? container.decodeIfPresent([String].self, forKey: .shellScript) {
shellScript = scriptArray.joined(separator: "\n")
} else {
shellScript = try container.decodeIfPresent(.shellScript)
}
showEnvVarsInLog = try container.decodeIntBoolIfPresent(.showEnvVarsInLog) ?? true
alwaysOutOfDate = try container.decodeIntBoolIfPresent(.alwaysOutOfDate) ?? false
dependencyFile = try container.decodeIfPresent(.dependencyFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,4 @@ final class PBXShellScriptBuildPhaseTests: XCTestCase {

XCTAssertNotEqual(noDiscovery, discovery)
}

private func testDictionary() -> [String: Any] {
[
"files": ["files"],
"inputPaths": ["input"],
"outputPaths": ["output"],
"shellPath": "shellPath",
"shellScript": "shellScript",
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@
private func loadProjectWithWrongProjectReferencesOrder() throws {
proj = try PBXProj(data: projectWithWrongProjectReferencesOrder())
}

private func loadProjectWithShellScriptBuildPhase() throws {
proj = try PBXProj(data: projectWithCustomShellScript())
}
}

// MARK: - Line validations
Expand Down
5 changes: 5 additions & 0 deletions Tests/XcodeProjTests/Tests/Fixtures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ func projectWithWrongProjectReferencesOrder() throws -> Data {
let iosProjectWithProjectReferences = fixturesPath() + "Xcode16ProjectReferenceOrder/Wrong.xcodeproj/project.pbxproj"
return try Data(contentsOf: iosProjectWithProjectReferences.url)
}

func projectWithCustomShellScript() throws -> Data {
let iosProjectWithShellScript = fixturesPath() + "Xcode16ProjectReferenceOrder/Test.xcodeproj/project.pbxproj"
return try Data(contentsOf: iosProjectWithShellScript.url)
}
Loading