Skip to content

Commit fcf2f12

Browse files
committed
feat: Use CommonCrypto in JWT Pod
1 parent 7451fcf commit fcf2f12

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

CommonCrypto/module.modulemap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module CommonCrypto [system] {
2+
header "shim.h"
3+
export *
4+
}

CommonCrypto/shim.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include <CommonCrypto/CommonCrypto.h>

JSONWebToken.podspec

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ Pod::Spec.new do |spec|
1212
spec.tvos.deployment_target = '9.0'
1313
spec.watchos.deployment_target = '2.0'
1414
spec.requires_arc = true
15-
spec.dependency 'CryptoSwift', '~> 0.6.1'
1615
spec.module_name = 'JWT'
17-
spec.exclude_files = ['Sources/HMACCommonCrypto.swift']
16+
spec.exclude_files = ['Sources/HMACCryptoSwift.swift']
17+
18+
if ARGV.include?('lint')
19+
spec.pod_target_xcconfig = {
20+
'SWIFT_INCLUDE_PATHS' => Dir.pwd,
21+
}
22+
else
23+
spec.pod_target_xcconfig = {
24+
'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/JSONWebToken/',
25+
}
26+
end
27+
28+
spec.preserve_paths = 'CommonCrypto/{shim.h,module.modulemap}'
1829
end

0 commit comments

Comments
 (0)