-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTokenSdk.podspec
More file actions
71 lines (61 loc) · 2.78 KB
/
TokenSdk.podspec
File metadata and controls
71 lines (61 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Performs protos codegen. The code is adopted after examples distributed with
# gRPC.
#
def Pod::tokenSdkVer; "2.1.4"; end
Pod::Spec.new do |s|
s.name = "TokenSdk"
s.version = tokenSdkVer
s.license = "New BSD"
s.authors = { "Token" => "eng@token.io" }
s.homepage = "http://www.token.io/"
s.source = { :git => "https://github.com/tokenio/sdk-objc.git",
:tag => "v2.1.4",
:submodules => true }
s.summary = "Token Objective-C SDK"
s.platform = :osx, '10.11'
s.platform = :ios, '9.0'
# Files generated by protoc
# Where the gRPC and proto generated files were placed
gendir = "src/generated"
# Non arc protoc *.m files and all generated headers
# These headers need the directory structure preserved
s.subspec "Messages" do |ss|
ss.public_header_files = gendir
ss.source_files = "#{gendir}/*.pbobjc.m", "#{gendir}/**/*.pbobjc.m", "#{gendir}/**/*.h"
ss.exclude_files = "#{gendir}/fank/*"
ss.requires_arc = false
ss.dependency "Protobuf"
end
# SDK & gRPC plugin on top of Messages. Needs arc
s.subspec "Implementation" do |ss|
ss.source_files = "src/api/*.{h,c,m}","src/rpc/*.{h,c,m}","src/authorization/*.{h,c,m}","src/security/*.{h,c,m}",
"src/util/*.{h,c,m}","src/ed25519/src/*.{h,c,m}","src/security/**/*.{h,c,m}",
"#{gendir}/*.pbrpc.m", "#{gendir}/**/*.pbrpc.m"
ss.ios.source_files = "src/authorization/ios/*.{h,c,m}"
ss.requires_arc = true
ss.public_header_files = "src/api", "src/security", "src/security/secureenclave", "src/authorization/", "src/security/token", "src/util"
ss.ios.public_header_files = "src/authorization/ios"
ss.exclude_files = "**/*_test.*","**/test_*.*","**/test/*.*","**/test.*", "#{gendir}/fank/*"
ss.dependency "BoringSSL-GRPC"
ss.dependency "gRPC-ProtoRPC"
ss.dependency "#{s.name}/Messages"
ss.dependency "OrderedDictionary"
ss.platform = :osx, '10.11'
ss.platform = :ios, '9.0'
end
# SDK resources
s.subspec "Resources" do |ss|
ss.resource = "resources/*.lproj/*.*", "resources/*.*"
ss.ios.resource = "resources/ios/*.*"
end
currentdir = Dir.getwd
s.pod_target_xcconfig = {
# This is needed by all pods that depend on Protobuf:
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
# This is needed by all pods that depend on gRPC-RxLibrary:
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
# Needed to find our generated headers that are quoted
'HEADER_SEARCH_PATHS' => "'#{currentdir}/#{gendir}' \"${PODS_ROOT}/TokenSdk/src/generated\" \"${PODS_ROOT}/TokenSdk/src/generated/fank\""
}
end