Commit 5c1399a
authored
fix(core): stop AppMeta trapping when there is no app bundle (#762)
AppMeta force-unwrapped both Info.plist lookups, so reading version or build
outside an app bundle trapped. The FlipcashCore package test host has no
bundle, so UserAgentClientInterceptorTests took the whole process down with
SIGTRAP and no suite in the package could run under `swift test`. Only filtered
runs that excluded that test worked.
Both lookups now fall back to AppMeta.unknown. The stand-in is deliberately
non-numeric: SessionAuthenticator.requiresUpgrade parses build and treats an
unparseable value as "allow access", whereas "0" would parse as a build below
any server minimum and gate the app behind a forced upgrade it can never
satisfy.
The package already compiled for macOS, so the trap was the only thing in the
way: `swift test` now runs all 933 tests. That makes the testing doc's blanket
"packages are iOS-only" rule wrong for FlipcashCore and FlipcashCoreVectors,
which declare .macOS, so it is narrowed to the packages where it still holds.
UserAgentClientInterceptorTests is unchanged. The new AppMetaTests assert only
what is true under both hosts, since the app target does have a bundle.1 parent c7b18c4 commit 5c1399a
3 files changed
Lines changed: 46 additions & 3 deletions
File tree
- .claude/docs
- FlipcashCore
- Sources/FlipcashCore/Clients
- Tests/FlipcashCoreTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | | - | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
13 | 23 | | |
14 | | - | |
| 24 | + | |
15 | 25 | | |
16 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments