Commit daac154
committed
Exclude PrivacyInfo.xcprivacy resource on Android
Declaring a resource on the SQLite target makes SwiftPM generate a
Bundle.module accessor that unconditionally imports Foundation and
calls Bundle.main/Bundle(path:), which requires linking all of
Foundation (plus FoundationInternationalization and ICU on affected
SDKs) even for consumers that otherwise only need FoundationEssentials.
PrivacyInfo.xcprivacy only has meaning for the Apple App Store, so this
excludes it under a TARGET_OS_ANDROID environment variable, following
the same convention swift-android-native uses to detect an Android
cross-compile from Package.swift (which always evaluates on the host
and has no direct way to see the build destination). No effect on
existing consumers since the variable is unset by default.1 parent ccaae3d commit daac154
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | 16 | | |
| |||
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
15 | | - | |
16 | | - | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| |||
0 commit comments