diff --git a/Sources/CreateXCFramework/Command+Options.swift b/Sources/CreateXCFramework/Command+Options.swift index d528752..03723f6 100644 --- a/Sources/CreateXCFramework/Command+Options.swift +++ b/Sources/CreateXCFramework/Command+Options.swift @@ -80,6 +80,9 @@ extension Command { @Flag(help: "Skip binary targets for project generation. Useful for creating and distributing a library from one Package.swift") var skipBinaryTargets: Bool = false + @Flag(help: "Specifies that the created xcframework contains information not suitable for public distribution.") + var allowInternalDistribution: Bool = false + // MARK: - Targets @Argument(help: "An optional list of products (or targets) to build. Defaults to building all `.library` products") diff --git a/Sources/CreateXCFramework/XcodeBuilder.swift b/Sources/CreateXCFramework/XcodeBuilder.swift index 9c1de7f..e754600 100644 --- a/Sources/CreateXCFramework/XcodeBuilder.swift +++ b/Sources/CreateXCFramework/XcodeBuilder.swift @@ -306,6 +306,10 @@ struct XcodeBuilder { return args } + if self.package.options.allowInternalDistribution { + command += [ "-allow-internal-distribution" ] + } + // and the output command += [ "-output", outputPath.path ]