@@ -380,6 +380,10 @@ struct FrameworkBuilder {
380
380
}
381
381
umbrellaHeader = umbrellaHeaderURL. lastPathComponent
382
382
}
383
+ // Add an Info.plist. Required by Carthage and SPM binary xcframeworks.
384
+ CarthageUtils . generatePlistContents ( forName: frameworkName,
385
+ withVersion: podInfo. version,
386
+ to: frameworkDir)
383
387
384
388
// TODO: copy PrivateHeaders directory as well if it exists. SDWebImage is an example pod.
385
389
@@ -590,8 +594,8 @@ struct FrameworkBuilder {
590
594
/// Groups slices for each platform into a minimal set of frameworks.
591
595
/// - Parameter withName: The framework name.
592
596
/// - Parameter isCarthage: Name the temp directory differently for Carthage.
593
- /// - Parameter fromFolder: The almost complete framework folder. Includes
594
- /// Headers, and Resources.
597
+ /// - Parameter fromFolder: The almost complete framework folder. Includes Headers, Info.plist,
598
+ /// and Resources.
595
599
/// - Parameter slicedFrameworks: All the frameworks sliced by platform.
596
600
/// - Parameter moduleMapContents: Module map contents for all frameworks in this pod.
597
601
private func groupFrameworks( withName framework: String ,
@@ -684,6 +688,15 @@ struct FrameworkBuilder {
684
688
fatalError ( " Could not create framework directory needed to build \( framework) : \( error) " )
685
689
}
686
690
691
+ // Info.plist from `fromFolder`
692
+ do {
693
+ let infoPlistSrc = fromFolder. appendingPathComponent ( " Info.plist " ) . resolvingSymlinksInPath ( )
694
+ let infoPlistDst = platformFrameworkDir. appendingPathComponent ( " Info.plist " )
695
+ try fileManager. copyItem ( at: infoPlistSrc, to: infoPlistDst)
696
+ } catch {
697
+ fatalError ( " Could not create framework directory needed to build \( framework) : \( error) " )
698
+ }
699
+
687
700
// Copy the binary to the right location.
688
701
let binaryName = frameworkPath. lastPathComponent. replacingOccurrences ( of: " .framework " ,
689
702
with: " " )
0 commit comments