-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSyncSqlCipher.podspec
More file actions
105 lines (94 loc) · 4.46 KB
/
SyncSqlCipher.podspec
File metadata and controls
105 lines (94 loc) · 4.46 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
Pod::Spec.new do |s|
s.name = 'SyncSqlCipher'
s.version = '1.0.0'
s.summary = 'Synchronous, DispatchQueue-based SQLCipher wrapper for Swift.'
s.homepage = 'https://github.com/customerio/SyncSqlCipher'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "CustomerIO Team" => "win@customer.io" }
s.source = { :git => 'https://github.com/customerio/SyncSqlCipher.git', :tag => s.version.to_s }
s.swift_version = '5.10'
s.cocoapods_version = '>= 1.11.0'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.15'
# visionOS is supported via Swift Package Manager; add s.visionos.deployment_target
# = '1.0' here once CocoaPods visionOS support is required by your targets.
# ---------------------------------------------------------------------------
# Sources
#
# The C amalgamation, its headers, and all Swift sources compile into a
# single SyncSqlCipher framework — no separate CSqlCipher target needed.
# ---------------------------------------------------------------------------
s.source_files = [
'Sources/CSqlCipher/sqlite3.c',
'Sources/CSqlCipher/include/*.h',
'Sources/SyncSqlCipher/**/*.swift',
]
# The C headers are an internal implementation detail of this framework.
# Marking them private keeps them out of the generated umbrella header while
# still making them available to the compiler via the header search path.
s.private_header_files = 'Sources/CSqlCipher/include/*.h'
# CocoaPods does not copy .modulemap files automatically, but the Swift
# compiler needs it on disk to resolve `import CSqlCipher` (see
# SWIFT_INCLUDE_PATHS below).
s.preserve_paths = 'Sources/CSqlCipher/include/module.modulemap'
# SQLCipher on Apple platforms uses CommonCrypto, which lives in Security.
s.frameworks = 'Security'
# ---------------------------------------------------------------------------
# Build settings
# ---------------------------------------------------------------------------
s.pod_target_xcconfig = {
# SQLCipher compile-time feature flags for sqlite3.c.
#
# SQLITE_HAS_CODEC=1 is load-bearing: omitting it produces a valid but
# completely unencrypted SQLite database with no error at runtime.
#
# CocoaPods merges (not replaces) GCC_PREPROCESSOR_DEFINITIONS, so these
# are additive alongside whatever the host project sets.
'GCC_PREPROCESSOR_DEFINITIONS' =>
'SQLITE_HAS_CODEC=1 ' \
'SQLITE_TEMP_STORE=2 ' \
'SQLITE_EXTRA_INIT=sqlcipher_extra_init ' \
'SQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown ' \
'SQLCIPHER_CRYPTO_CC=1 ' \
'SQLITE_THREADSAFE=1 ' \
'HAVE_STDINT_H=1 ' \
'NDEBUG=1 ' \
'SQLITE_DQS=0',
# Resolves `import CSqlCipher` in the Swift sources.
#
# The Swift compiler searches every directory listed here for module maps.
# module.modulemap (preserved above) declares `module CSqlCipher { ... }`,
# so the compiler finds it and the import works even though CSqlCipher is
# not a separate CocoaPods target.
'SWIFT_INCLUDE_PATHS' => '$(PODS_TARGET_SRCROOT)/Sources/CSqlCipher/include',
# Enables library evolution mode, which makes `internal import` safe and
# warning-free. The generated .swiftinterface is unused for source-distributed
# pods but the flag also enforces ABI stability rules at compile time.
'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES',
# Suppress warnings from the upstream SQLite C amalgamation (sqlite3.c).
'OTHER_CFLAGS' => '$(inherited) -w',
}
# ---------------------------------------------------------------------------
# Test spec
#
# Not installed by default. Consumers opt in with:
# pod 'SyncSqlCipher', :testspecs => ['Tests']
# or by running:
# pod install --include-test-targets
#
# Run with:
# xcodebuild test \
# -workspace App.xcworkspace \
# -scheme SyncSqlCipher-Tests \
# -destination 'platform=iOS Simulator,name=iPhone 16'
#
# Requires Xcode 16+ — Swift Testing (@Suite / @Test / #expect) is
# integrated with the XCTest runner from that version onward.
# ---------------------------------------------------------------------------
s.test_spec 'Tests' do |ts|
ts.source_files = 'Tests/SyncSqlCipherTests/**/*.swift'
ts.framework = 'Foundation'
# `import Testing` resolves automatically; no explicit declaration needed
# because Swift Testing ships as a system framework in Xcode 16+.
end
end