@@ -651,7 +651,20 @@ struct FrameworkBuilder {
651
651
platform == . catalyst || platform == . macOS ? " Resources " : " "
652
652
)
653
653
. resolvingSymlinksInPath ( )
654
- processPrivacyManifests ( fileManager, frameworkPath, resourceDir)
654
+
655
+ // Move resource bundles into the platform framework.
656
+ try ? fileManager. contentsOfDirectory (
657
+ at: frameworkPath. deletingLastPathComponent ( ) ,
658
+ includingPropertiesForKeys: nil
659
+ )
660
+ . filter { $0. pathExtension == " bundle " }
661
+ // Bundles are moved rather than copied to prevent them from being
662
+ // packaged in a `Resources` directory at the root of the xcframework.
663
+ . forEach { try ! fileManager. moveItem (
664
+ at: $0,
665
+ to: platformFrameworkDir. appendingPathComponent ( $0. lastPathComponent)
666
+ ) }
667
+
655
668
656
669
// Use the appropriate moduleMaps
657
670
packageModuleMaps ( inFrameworks: [ frameworkPath] ,
@@ -663,25 +676,6 @@ struct FrameworkBuilder {
663
676
}
664
677
}
665
678
666
- /// Process privacy manifests.
667
- ///
668
- /// Move any privacy manifest-containing resource bundles into the platform framework.
669
- func processPrivacyManifests( _ fileManager: FileManager ,
670
- _ frameworkPath: URL ,
671
- _ platformFrameworkDir: URL ) {
672
- try ? fileManager. contentsOfDirectory (
673
- at: frameworkPath. deletingLastPathComponent ( ) ,
674
- includingPropertiesForKeys: nil
675
- )
676
- . filter { $0. pathExtension == " bundle " }
677
- // Bundles are moved rather than copied to prevent them from being
678
- // packaged in a `Resources` directory at the root of the xcframework.
679
- . forEach { try ! fileManager. moveItem (
680
- at: $0,
681
- to: platformFrameworkDir. appendingPathComponent ( $0. lastPathComponent)
682
- ) }
683
- }
684
-
685
679
/// Package the built frameworks into an XCFramework.
686
680
/// - Parameter withName: The framework name.
687
681
/// - Parameter frameworks: The grouped frameworks.
0 commit comments