Skip to content

Commit

Permalink
Improve a method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Jan 15, 2025
1 parent 2555ffb commit 6cf2c33
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Sources/ScipioKit/Producer/PIF/FrameworkBundleAssembler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ extension FrameworkBundleAssembler {
if let resourceBundleName = sourceContext.resourceBundlePath?.basename {
let resourceBundlePath = destinationResourcesPath.appending(component: resourceBundleName)
// A resource bundle of versioned bundle framework has "Contents/Resources" directory.
try extractPrivacyInfoFromEmbeddedResourceBundleToFrameworkIfExists(
resourceBundlePath: resourceBundlePath,
relativePrivacyInfoPath: TSCRelativePath(validating: "Contents/Resources/PrivacyInfo.xcprivacy")
try extractPrivacyInfoIfExists(
from: TSCRelativePath(validating: "Contents/Resources/PrivacyInfo.xcprivacy"),
in: resourceBundlePath
)
}
} else {
Expand All @@ -204,9 +204,9 @@ extension FrameworkBundleAssembler {
)

if let copiedResourceBundlePath {
try extractPrivacyInfoFromEmbeddedResourceBundleToFrameworkIfExists(
resourceBundlePath: copiedResourceBundlePath,
relativePrivacyInfoPath: TSCRelativePath(validating: "PrivacyInfo.xcprivacy")
try extractPrivacyInfoIfExists(
from: TSCRelativePath(validating: "PrivacyInfo.xcprivacy"),
in: copiedResourceBundlePath
)
}
}
Expand Down Expand Up @@ -238,9 +238,9 @@ extension FrameworkBundleAssembler {
/// Extracts PrivacyInfo.xcprivacy to expected location (if exists in the resource bundle).
///
/// - seealso: https://developer.apple.com/documentation/bundleresources/adding-a-privacy-manifest-to-your-app-or-third-party-sdk#Add-a-privacy-manifest-to-your-framework
private func extractPrivacyInfoFromEmbeddedResourceBundleToFrameworkIfExists(
resourceBundlePath: TSCAbsolutePath,
relativePrivacyInfoPath: TSCRelativePath
private func extractPrivacyInfoIfExists(
from relativePrivacyInfoPath: TSCRelativePath,
in resourceBundlePath: TSCAbsolutePath
) throws {
let privacyInfoPath = resourceBundlePath.appending(relativePrivacyInfoPath)
if fileSystem.exists(privacyInfoPath) {
Expand Down

0 comments on commit 6cf2c33

Please sign in to comment.