-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppductCore.podspec
More file actions
61 lines (56 loc) · 3.69 KB
/
Copy pathAppductCore.podspec
File metadata and controls
61 lines (56 loc) · 3.69 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
require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'packages', 'react-native', 'package.json')))
Pod::Spec.new do |s|
s.name = 'AppductCore'
# Version is single-sourced from @appduct/react-native's package.json (see
# docs/tasks/14-native-core-extraction.md): the RN, Swift, and Kotlin packages have always
# versioned in lockstep in this repo (docs/CI.md's release policy), and a native-core-specific
# version number would just be another place that number could drift.
s.version = package['version']
s.summary = 'Framework-free Swift core for Appduct: TLS-pinned session transport and resume leases.'
s.description = 'The native connection layer behind @appduct/react-native, usable directly ' \
'from plain iOS/tvOS/macOS apps. See packages/native/README.md.'
s.license = { :type => package['license'], :file => 'LICENSE' }
s.author = package['author']
s.homepage = package['homepage']
s.platforms = {
:ios => '15.1',
:tvos => '15.1'
}
# Language mode, not a toolchain version: `-swift-version` accepts only 4, 4.2, 5, and 6, so
# '6.1' is not a legal value here despite Package.swift's `swift-tools-version: 6.1`. Set to 6 to
# match the mode SwiftPM actually compiles these same sources in (verified: an iOS build of the
# root Package.swift passes `-swift-version 6`); the previous '5.9' was normalised to mode 5 by
# Xcode, quietly building the pod under laxer rules than the SwiftPM package.
s.swift_version = '6.0'
s.source = { git: 'https://github.com/callstackincubator/appduct.git', tag: "v#{s.version}" }
s.static_framework = true
s.source_files = 'packages/native/ios/Sources/AppductCore/Real/**/*.swift'
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
# Unconditional, unlike the SwiftPM target's configuration-gated define: a CocoaPods consumer
# (this repo's own @appduct/react-native, or any other pod depending on this one) gates
# *inclusion* with `:configurations => ['Debug']` on the dependency itself, exactly as the RN
# pod does today -- by the time this podspec's sources are compiled at all, the decision to
# include them has already been made, so the code inside should always be the real
# implementation, never the stub. All connection state lives behind a single actor (see
# AppductConnectionManager); `-strict-concurrency=complete` keeps it that way by failing the
# build on any new concurrency violation. Redundant while `s.swift_version` is 6.0 -- language
# mode 6 implies complete checking -- but kept explicit so lowering that value back to 5 cannot
# silently drop the strictness along with it.
'OTHER_SWIFT_FLAGS' => '-DAPPDUCT_ENABLED -strict-concurrency=complete',
}
s.test_spec 'Tests' do |test_spec|
# Pure-logic tests (actor state transitions, SPKI pin parity with
# packages/appduct/src/spki-pin.ts) that need only Foundation/Security.
test_spec.source_files = 'packages/native/ios/Tests/AppductCoreTests/**/*.swift'
# FixturesConformanceTests reads the cross-language vectors in packages/native/fixtures/ at a
# path relative to its own source file (`#filePath`), not from a bundle. CocoaPods deletes every
# file no pattern names when it downloads a pod, so without this the fixtures are gone and the
# suite fails -- but only for a *downloaded* pod: `pod spec lint` and `pod trunk push`, never
# `pod lib lint`, which uses the working tree in place. Kept in place, at the same relative path,
# rather than copied as resources, because the test resolves them by path.
test_spec.preserve_paths = 'packages/native/fixtures/*.json'
test_spec.requires_app_host = true
end
end