-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMobileCoin.podspec
More file actions
120 lines (93 loc) · 4.37 KB
/
MobileCoin.podspec
File metadata and controls
120 lines (93 loc) · 4.37 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "MobileCoin"
s.version = "6.0.5"
s.summary = "A library for communicating with MobileCoin network"
s.author = "MobileCoin"
s.homepage = "https://www.mobilecoin.com/"
s.license = { :type => "GPLv3" }
s.source = {
:git => "https://github.com/mobilecoinofficial/MobileCoin-Swift.git",
:tag => "v#{s.version}",
:submodules => true
}
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.platform = :ios, "12.2"
# ――― Subspecs ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.default_subspec = :none
s.test_spec do |test_spec|
test_spec.source_files = "Tests/{Unit,Common}/**/*.swift"
test_spec.resources = [
"Tests/Common/FixtureData/**/*",
"Vendor/libmobilecoin/Vendor/mobilecoin/test-vectors/vectors/**/*",
]
end
s.test_spec 'IntegrationTransactingTests' do |test_spec|
test_spec.source_files = "Tests/{Common,Integration/Common,Integration/Transacting}/**/*.swift"
test_spec.resource = "Tests/Common/FixtureData/**/*",
test_spec.resource = "Tests/Common/Secrets/process_info.json"
end
s.test_spec 'IntegrationNonTransactingTests' do |test_spec|
test_spec.source_files = "Tests/{Common,Util,Integration/Common,Integration/NonTransacting}/**/*.swift"
test_spec.resource = "Tests/Common/FixtureData/**/*",
test_spec.resource = "Tests/Common/Secrets/process_info.json"
end
s.test_spec 'PerformanceTests' do |test_spec|
test_spec.source_files = "Tests/{Performance,Common}/**/*.swift"
test_spec.test_type = :ui
test_spec.requires_app_host = true
end
s.subspec "CoreHTTP" do |subspec|
subspec.source_files = [
"Sources/{Common,HTTPS}/**/*.swift",
"CocoapodsOnly/*.{h,m,swift}",
"HTTPOnly/WrappedNIOSSLCertificateValidator.swift"
]
subspec.dependency "LibMobileCoin/CoreHTTP", "~> 6.0.0-pre1"
subspec.dependency "Logging", "~> 1.4"
subspec.test_spec 'HttpProtocolUnitTests' do |test_spec|
test_spec.source_files = "Tests/ProtocolSpecific/Http/**/*.swift"
test_spec.resource = "Tests/ProtocolSpecific/Http/FixtureData/**/*"
end
unless ENV["MC_ENABLE_SWIFTLINT_SCRIPT"].nil?
subspec.dependency 'SwiftLint'
end
end
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.swift_version = "5.2"
# The LibMobileCoin podspec specifies these xcconfig values in
# `user_target_xcconfig`, however that only applies to app targets, not to the
# intermediary frameworks. These must be speicifed here for CocoaPods to set them
# on the framework target and any testspec targets for this pod.
pod_target_xcconfig = {
"GCC_OPTIMIZATION_LEVEL" => "z",
"ENABLE_BITCODE" => "YES",
"SUPPORTS_MACCATALYST" => "YES",
# The LibMobileCoin vendored binary doesn't include support for 32-bit
# architectures or for arm64 iphonesimulator.
"VALID_ARCHS[sdk=iphoneos*]" => "arm64",
"VALID_ARCHS[sdk=iphonesimulator*]" => "x86_64 arm64",
}
unless ENV["MC_ENABLE_WARN_LONG_COMPILE_TIMES"].nil?
pod_target_xcconfig['OTHER_SWIFT_FLAGS'] = '-Xfrontend -warn-long-function-bodies=500'
pod_target_xcconfig['OTHER_SWIFT_FLAGS'] += ' -Xfrontend -warn-long-expression-type-checking=500'
end
s.pod_target_xcconfig = pod_target_xcconfig
unless ENV["MC_ENABLE_SWIFTLINT_SCRIPT"].nil?
s.script_phases = [
{
:name => "Run SwiftLint",
:execution_position => :any,
:script => <<~'EOS'
SWIFTLINT="${PODS_ROOT}/SwiftLint/swiftlint"
if which ${SWIFTLINT} >/dev/null; then
cd "${PODS_TARGET_SRCROOT}"
${SWIFTLINT}
else
echo "warning: SwiftLint not installed, run \`pod install\`"
fi
EOS
},
]
end
end