Skip to content

Commit 1129af1

Browse files
Update Web3Core podspec to setup conditional building pipeline.
1 parent 5a58f76 commit 1129af1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Sources/Core/Utility/BigUInt+Extension.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@ public extension BigUInt {
1313
self = value
1414
}
1515
}
16+
17+
#if COCOAPODS
18+
extension BigUInt {
19+
var isZero: Bool {
20+
switch kind {
21+
case .inline(0, 0): return true
22+
case .array: return storage.isEmpty
23+
default:
24+
return false
25+
}
26+
}
27+
}
28+
#endif

Web3Core.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
Pod::Spec.new do |spec|
2+
spec.compiler_flags = '-DCOCOAPODS'
3+
24
spec.name = 'Web3Core'
35
spec.version = '3.0.0'
46
spec.module_name = 'Core'
@@ -12,7 +14,7 @@ Pod::Spec.new do |spec|
1214
spec.swift_version = '5.5'
1315

1416
spec.dependency 'secp256k1.c', '~> 0.1'
15-
spec.dependency 'BigInt', '~> 5.2.0'
17+
spec.dependency 'BigInt', '~> 5.2.0' # no newer version in pods.
1618
spec.dependency 'CryptoSwift', '~> 1.5.1'
1719
spec.source_files = "Sources/Core/**/*.swift"
1820
end

0 commit comments

Comments
 (0)