Skip to content

Commit 815e3e9

Browse files
authored
fix(tooling): Use module name over spec name in XCFramework module maps (#15229)
1 parent 69b57a7 commit 815e3e9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ struct FrameworkBuilder {
272272
///
273273
/// - Parameter framework: The name of the pod to be built.
274274
/// - Returns: The corresponding framework/module name.
275-
private static func frameworkBuildName(_ framework: String) -> String {
275+
static func frameworkBuildName(_ framework: String) -> String {
276276
switch framework {
277277
case "abseil":
278278
return "absl"

ReleaseTooling/Sources/ZipBuilder/ModuleMapBuilder.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ struct ModuleMapBuilder {
248248
installedPods[name]?.transitiveFrameworks = transitiveFrameworkDeps
249249
installedPods[name]?.transitiveLibraries = transitiveLibraryDeps
250250

251-
return ModuleMapContents(module: name, frameworks: myFrameworkDeps, libraries: myLibraryDeps)
251+
let moduleName = FrameworkBuilder.frameworkBuildName(name)
252+
return ModuleMapContents(
253+
module: moduleName,
254+
frameworks: myFrameworkDeps,
255+
libraries: myLibraryDeps
256+
)
252257
}
253258
}

0 commit comments

Comments
 (0)