From fcf2f1286ff9b59d21995e5940aac5f157b15f27 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 4 Aug 2017 09:18:35 -0700 Subject: [PATCH] feat: Use CommonCrypto in JWT Pod --- CommonCrypto/module.modulemap | 4 ++++ CommonCrypto/shim.h | 1 + JSONWebToken.podspec | 15 +++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 CommonCrypto/module.modulemap create mode 100644 CommonCrypto/shim.h diff --git a/CommonCrypto/module.modulemap b/CommonCrypto/module.modulemap new file mode 100644 index 0000000..b70f7d6 --- /dev/null +++ b/CommonCrypto/module.modulemap @@ -0,0 +1,4 @@ +module CommonCrypto [system] { + header "shim.h" + export * +} diff --git a/CommonCrypto/shim.h b/CommonCrypto/shim.h new file mode 100644 index 0000000..c332624 --- /dev/null +++ b/CommonCrypto/shim.h @@ -0,0 +1 @@ +#include diff --git a/JSONWebToken.podspec b/JSONWebToken.podspec index fd86d92..42698f6 100644 --- a/JSONWebToken.podspec +++ b/JSONWebToken.podspec @@ -12,7 +12,18 @@ Pod::Spec.new do |spec| spec.tvos.deployment_target = '9.0' spec.watchos.deployment_target = '2.0' spec.requires_arc = true - spec.dependency 'CryptoSwift', '~> 0.6.1' spec.module_name = 'JWT' - spec.exclude_files = ['Sources/HMACCommonCrypto.swift'] + spec.exclude_files = ['Sources/HMACCryptoSwift.swift'] + + if ARGV.include?('lint') + spec.pod_target_xcconfig = { + 'SWIFT_INCLUDE_PATHS' => Dir.pwd, + } + else + spec.pod_target_xcconfig = { + 'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/JSONWebToken/', + } + end + + spec.preserve_paths = 'CommonCrypto/{shim.h,module.modulemap}' end