Skip to content

Commit

Permalink
Revert "[Release Tooling] Only embed bundles containing privacy manif…
Browse files Browse the repository at this point in the history
…ests (#12324)"

This reverts commit 4914cc2.
  • Loading branch information
ncooke3 committed Feb 19, 2024
1 parent 3de7e6c commit 3db9865
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -639,34 +639,6 @@ struct FrameworkBuilder {
"\(framework): \(error)")
}

// Move any privacy manifest-containing resource bundles into the
// platform framework.
try? fileManager.contentsOfDirectory(
at: frameworkPath.deletingLastPathComponent(),
includingPropertiesForKeys: nil
)
.filter { $0.pathExtension == "bundle" }
// TODO(ncooke3): Once the zip is built with Xcode 15, the following
// `filter` can be removed. The following block exists to preserve
// how resources (e.g. like FIAM's) are packaged for use in Xcode 14.
.filter { bundleURL in
let dirEnum = fileManager.enumerator(atPath: bundleURL.path)
var containsPrivacyManifest = false
while let relativeFilePath = dirEnum?.nextObject() as? String {
if relativeFilePath.hasSuffix("PrivacyInfo.xcprivacy") {
containsPrivacyManifest = true
break
}
}
return containsPrivacyManifest
}
// Bundles are moved rather than copied to prevent them from being
// packaged in a `Resources` directory at the root of the xcframework.
.forEach { try! fileManager.moveItem(
at: $0,
to: platformFrameworkDir.appendingPathComponent($0.lastPathComponent)
) }

// Headers from slice
do {
let headersSrc: URL = frameworkPath.appendingPathComponent("Headers")
Expand Down

0 comments on commit 3db9865

Please sign in to comment.