Context 🕵️♀️
- Xcode 16.3 (16E140)
- Xcode project format: Xcode 16.3 (
objectVersion = 90)
- Periphery 3.0.3
- XcodeProj 8.27.3
project.pbxproj:
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 90;
objects = {
…
/* Begin PBXShellScriptBuildPhase section */
A42660D00000000000000000 /* Test Shell Script */ = {
isa = PBXShellScriptBuildPhase;
name = "Test Shell Script";
shellPath = /bin/zsh;
shellScript = (
"echo 'Hello World!'",
"",
);
};
/* End PBXShellScriptBuildPhase section */
…
};
rootObject = A42B35300000000000000000 /* Project object */;
}
What 🌱
When I try to scan my project with Periphery (which uses XcodeProj) with periphery scan, I get this error message:
error: (DecodingError) typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "objects", intValue: nil), _DictionaryCodingKey(stringValue: "A42660D12C729D04000E0507", intValue: nil), CodingKeys(stringValue: "shellScript", intValue: nil)], debugDescription: "Expected to decode String but found an array instead.", underlyingError: nil))
It seems that at least since Xcode project format 16.3 (objectVersion = 90), shell scripts (Targets → <target name> → Build Phases → New Run Script Phase) are stored in arrays where each element represents a line, whereas before they were stored as a single string.
Context 🕵️♀️
objectVersion = 90)project.pbxproj:
What 🌱
When I try to scan my project with Periphery (which uses XcodeProj) with
periphery scan, I get this error message:error: (DecodingError) typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "objects", intValue: nil), _DictionaryCodingKey(stringValue: "A42660D12C729D04000E0507", intValue: nil), CodingKeys(stringValue: "shellScript", intValue: nil)], debugDescription: "Expected to decode String but found an array instead.", underlyingError: nil))It seems that at least since Xcode project format 16.3 (
objectVersion = 90), shell scripts (Targets→ <target name> →Build Phases→New Run Script Phase) are stored in arrays where each element represents a line, whereas before they were stored as a single string.