Skip to content

Commit

Permalink
Merge pull request kylef#79 from kylef/kylef/cocoapods-cc
Browse files Browse the repository at this point in the history
Use CommonCrypto in JWT Pod
  • Loading branch information
kylef authored Aug 4, 2017
2 parents 558eaf1 + fcf2f12 commit 4e49b0a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CommonCrypto/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module CommonCrypto [system] {
header "shim.h"
export *
}
1 change: 1 addition & 0 deletions CommonCrypto/shim.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <CommonCrypto/CommonCrypto.h>
15 changes: 13 additions & 2 deletions JSONWebToken.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4e49b0a

Please sign in to comment.