@@ -80,17 +80,18 @@ public struct RswiftCore {
8080 structGenerators. append ( AccessibilityIdentifierStructGenerator ( nibs: resources. nibs, storyboards: resources. storyboards) )
8181 }
8282 if callInformation. generators. contains ( . info) {
83-
84- let infoPlists = buildConfigurations. compactMap {
85- return loadPropertyList ( name: $0 . name, path : $0 . infoPlistPath , callInformation: callInformation)
83+
84+ let infoPlists = buildConfigurations. compactMap { config in
85+ return loadPropertyList ( name: config . name, url : callInformation . infoPlistFile , callInformation: callInformation)
8686 }
8787
8888 structGenerators. append ( PropertyListGenerator ( name: " info " , plists: infoPlists, toplevelKeysWhitelist: infoPlistWhitelist) )
8989 }
9090 if callInformation. generators. contains ( . entitlements) {
9191
92- let entitlements = buildConfigurations. compactMap {
93- return loadPropertyList ( name: $0. name, path: $0. entitlementsPath, callInformation: callInformation)
92+ let entitlements = buildConfigurations. compactMap { config -> PropertyList ? in
93+ guard let codeSignEntitlement = callInformation. codeSignEntitlements else { return nil }
94+ return loadPropertyList ( name: config. name, url: codeSignEntitlement, callInformation: callInformation)
9495 }
9596
9697 structGenerators. append ( PropertyListGenerator ( name: " entitlements " , plists: entitlements, toplevelKeysWhitelist: nil ) )
@@ -164,10 +165,8 @@ public struct RswiftCore {
164165 }
165166}
166167
167- private func loadPropertyList( name: String , path: Path ? , callInformation: CallInformation ) -> PropertyList ? {
168- guard let path = path else { return nil }
168+ private func loadPropertyList( name: String , url: URL , callInformation: CallInformation ) -> PropertyList ? {
169169 do {
170- let url = path. url ( with: callInformation. urlForSourceTreeFolder)
171170 return try PropertyList ( buildConfigurationName: name, url: url)
172171 } catch let ResourceParsingError . parsingFailed( humanReadableError) {
173172 warn ( humanReadableError)
0 commit comments