Skip to content

Commit 5d34fab

Browse files
feat(PBXFileReference): add expectedSignature property
1 parent 128d90e commit 5d34fab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/XcodeProj/Objects/Files/PBXFileReference.swift

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public final class PBXFileReference: PBXFileElement {
1515
/// Derived file type. For a file named "foo.swift" this value would be "sourcecode.swift"
1616
public var lastKnownFileType: String?
1717

18+
/// The XCFramework's expected code signature. `nil` if not an XCFramework reference or if the XCFramework is not signed.
19+
public var expectedSignature: String?
20+
1821
/// Line ending type for the file
1922
public var lineEnding: UInt?
2023

@@ -44,6 +47,7 @@ public final class PBXFileReference: PBXFileElement {
4447
/// - indentWidth: the number of positions to indent blocks of code
4548
/// - tabWidth: the visual width of tab characters
4649
/// - lineEnding: the line ending type for the file.
50+
/// - expectedSignature: code signature for signed XCFrameworks, `nil` otherwise.
4751
/// - languageSpecificationIdentifier: legacy programming language identifier.
4852
/// - xcLanguageSpecificationIdentifier: the programming language identifier.
4953
/// - plistStructureDefinitionIdentifier: the plist organizational family identifier.
@@ -59,13 +63,15 @@ public final class PBXFileReference: PBXFileElement {
5963
indentWidth: UInt? = nil,
6064
tabWidth: UInt? = nil,
6165
lineEnding: UInt? = nil,
66+
expectedSignature: String? = nil,
6267
languageSpecificationIdentifier: String? = nil,
6368
xcLanguageSpecificationIdentifier: String? = nil,
6469
plistStructureDefinitionIdentifier: String? = nil) {
6570
self.fileEncoding = fileEncoding
6671
self.explicitFileType = explicitFileType
6772
self.lastKnownFileType = lastKnownFileType
6873
self.lineEnding = lineEnding
74+
self.expectedSignature = expectedSignature
6975
self.languageSpecificationIdentifier = languageSpecificationIdentifier
7076
self.xcLanguageSpecificationIdentifier = xcLanguageSpecificationIdentifier
7177
self.plistStructureDefinitionIdentifier = plistStructureDefinitionIdentifier
@@ -86,6 +92,7 @@ public final class PBXFileReference: PBXFileElement {
8692
case explicitFileType
8793
case lastKnownFileType
8894
case lineEnding
95+
case expectedSignature
8996
case languageSpecificationIdentifier
9097
case xcLanguageSpecificationIdentifier
9198
case plistStructureDefinitionIdentifier
@@ -97,6 +104,7 @@ public final class PBXFileReference: PBXFileElement {
97104
explicitFileType = try container.decodeIfPresent(.explicitFileType)
98105
lastKnownFileType = try container.decodeIfPresent(.lastKnownFileType)
99106
lineEnding = try container.decodeIntIfPresent(.lineEnding)
107+
expectedSignature = try container.decodeIfPresent(.expectedSignature)
100108
languageSpecificationIdentifier = try container.decodeIfPresent(.languageSpecificationIdentifier)
101109
xcLanguageSpecificationIdentifier = try container.decodeIfPresent(.xcLanguageSpecificationIdentifier)
102110
plistStructureDefinitionIdentifier = try container.decodeIfPresent(.plistStructureDefinitionIdentifier)
@@ -122,6 +130,9 @@ public final class PBXFileReference: PBXFileElement {
122130
if let lineEnding {
123131
dictionary["lineEnding"] = .string(CommentedString("\(lineEnding)"))
124132
}
133+
if let expectedSignature {
134+
dictionary["expectedSignature"] = .string(CommentedString(expectedSignature))
135+
}
125136
if let languageSpecificationIdentifier {
126137
dictionary["languageSpecificationIdentifier"] = .string(CommentedString(languageSpecificationIdentifier))
127138
}

0 commit comments

Comments
 (0)