From ee4a446fa5d29415769b0c99c568636516adde8b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 19 May 2019 11:46:43 +0200 Subject: [PATCH] Add new OpenVPN subspec - AppExtension will need to be protocol-agnostic - Adjust Errors.h access in LZO subspec Fixes "umbrella header for module 'xxx' does not include header". --- TunnelKit.podspec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/TunnelKit.podspec b/TunnelKit.podspec index 68e525f..974b79a 100644 --- a/TunnelKit.podspec +++ b/TunnelKit.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "11.0" s.osx.deployment_target = "10.11" - s.default_subspecs = "Core", "AppExtension" + s.default_subspecs = "Core", "OpenVPN", "AppExtension" s.subspec "Core" do |p| p.source_files = "TunnelKit/Sources/Core/**/*.{h,m,swift}" @@ -26,20 +26,30 @@ Pod::Spec.new do |s| p.libraries = "resolv" end + s.subspec "OpenVPN" do |p| + p.source_files = "TunnelKit/Sources/OpenVPN/**/*.{h,m,swift}" + p.private_header_files = "TunnelKit/Sources/OpenVPN/**/*.h" + p.preserve_paths = "TunnelKit/Sources/OpenVPN/*.modulemap" + p.pod_target_xcconfig = { "SWIFT_INCLUDE_PATHS" => "${PODS_TARGET_SRCROOT}/TunnelKit/Sources/OpenVPN", + "APPLICATION_EXTENSION_API_ONLY" => "YES" } + + p.dependency "TunnelKit/Core" + end + s.subspec "AppExtension" do |p| p.source_files = "TunnelKit/Sources/AppExtension/**/*.swift" p.frameworks = "NetworkExtension" p.pod_target_xcconfig = { "APPLICATION_EXTENSION_API_ONLY" => "YES" } - p.dependency "TunnelKit/Core" - p.dependency "SwiftyBeaver" + p.dependency "TunnelKit/OpenVPN" end s.subspec "LZO" do |p| p.source_files = "TunnelKit/Sources/Core/LZO.h", "TunnelKit/Sources/Core/Errors.{h,m}", - "TunnelKit/Sources/LZO/**/*lzo*.{h,m,c}" + "TunnelKit/Sources/LZO/lib/*lzo*.{h,m,c}" p.private_header_files = "TunnelKit/Sources/Core/LZO.h", + "TunnelKit/Sources/Core/Errors.h", "TunnelKit/Sources/LZO/lib/*lzo*.h" p.pod_target_xcconfig = { "APPLICATION_EXTENSION_API_ONLY" => "YES" } end