Commit 815c978
authored
fix(mas,ios): drop the network.server entitlement with Earth Engine sign-in (#1651)
* fix(mas,ios): drop the network.server entitlement with Earth Engine sign-in
App Review rejected GeoLibre Desktop 2.4.0 under guideline 2.4.5: the bundle
carried com.apple.security.network.server with no functionality the automated
analysis could match to it.
The entitlement was real, not stray. Earth Engine sign-in uses Google's OAuth
loopback-redirect flow, so earth_engine_oauth.rs binds 127.0.0.1:5173 and
accepts the browser's inbound redirect to receive the token. The bind happens
lazily inside a Tauri command, which is why nothing static pointed at it.
Rather than justify the entitlement in App Review Information, drop the feature
from both Apple targets: the module is gated
`#[cfg(not(any(feature = "mas", target_os = "ios")))]` and replaced by stub
commands that bind nothing, so neither the Mac App Store build nor the iOS app
ever opens a listening socket. This was the only inbound listener left in those
builds — wait_for_port_free (Jupyter) and spawn_martin_server were already
compiled out.
Every other target keeps Earth Engine unchanged: Developer ID macOS, Windows,
Linux, Android, and the web build (a browser uses Google's popup/redirect flow
and binds nothing, so Earth Engine still works in Safari on iOS).
- Remove com.apple.security.network.server from the MAS entitlements template.
- Fail mas-store.yml if it ever reappears in the signature.
- Hide the Processing menu item and command-palette entry behind
isEarthEngineAvailable(); authenticateEarthEngine throws early if a restored
panel state or an external plugin still reaches it.
- Document the rejection and the constraint in docs/mac-app-store.md.
* chore: bump the version to 2.4.1 for the App Store resubmission
App Store Connect rejects a re-upload at a version already submitted, and 2.4.0
was rejected under guideline 2.4.5 (see the previous commit). Bump every
version declaration that tracks the app release.
Workers stay at 0.0.0 (deliberately unversioned), and the historical 2.4.0
references in docs/ios.md, docs/mac-app-store.md, ios.yml, publish-embed.yml,
and mas-store.yml are left alone — they describe the rejected submission.
* chore: sync CITATION.cff with the 2.4.1 version bump
CI's "Validate CITATION.cff" job asserts the cff version matches
package.json, so the bump left it failing.
* Address Claude review feedback
- tests/earth-engine-availability.test.ts: correct the "plain Node" comment.
It claimed both defaults resolve to false because there is no `navigator`,
but Node exposes a global `navigator` (userAgent "Node.js/<major>"). The
assertion was always right — that UA matches none of the Apple patterns, and
maxTouchPoints is undefined so the `> 1` check is false — only the stated
reasoning was wrong.
* Address Claude review feedback
- maplibre-geoagent.ts: gate the GeoAgent Earth Engine overlay behind
isEarthEngineAvailable(). enhanceEarthEngineSignIn injected a "Sign in"
button unconditionally, so on the Apple App Store builds it rendered and only
failed on click via the defense-in-depth throw -- worse UX than the Processing
menu, which hides its entry outright, and it contradicted
docs/mac-app-store.md's claim that those builds remove the overlay. Hide the
whole .geoagent-earth-engine section instead: every control in it (status
line, OAuth client id, project id) is Earth Engine-specific and useless
without sign-in.
* Address Claude review feedback
- Extract the iPadOS "desktop Macintosh UA" heuristic into
@geolibre/core's new platform.ts and call it from both copies. is-mobile.ts
and earth-engine-auth.ts each encoded `/Macintosh/.test(ua) && touch > 1`
independently, so a future correction to an Apple behaviour could land in one
and miss the other. Only that clause is shared -- the surrounding UA patterns
legitimately differ (is-mobile includes Android, the Earth Engine check is
Apple-only), so they stay separate.
* Address Claude review feedback
- Hoist the Earth Engine gate to a module-level EARTH_ENGINE_AVAILABLE
constant in ProcessingMenu.tsx and import it in TopToolbar.tsx. TopToolbar
called isEarthEngineAvailable() inside the commands array, which is rebuilt
every render, while ProcessingMenu memoized it per instance. Both inputs (the
build define and the user agent) are fixed for the session, so one
module-level constant matches the IS_MAS_BUILD pattern and removes the
inconsistency in both directions.
- mas-store.yml: annotate a codesign failure. Capturing its output meant a bad
signature or path aborted the step with a bare shell error instead of an
::error:: message, unlike the two entitlement assertions below it.1 parent dc962f9 commit 815c978
27 files changed
Lines changed: 296 additions & 46 deletions
File tree
- .github/workflows
- apps/geolibre-desktop
- src-tauri
- mas
- src
- src
- components/layout
- toolbar
- lib
- docs
- packages
- core
- src
- embed
- map
- plugins
- src
- plugins
- processing
- ui
- python/src/geolibre
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
135 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
136 | 148 | | |
137 | 149 | | |
138 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
34 | | - | |
35 | | - | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
1 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
2 | 30 | | |
3 | 31 | | |
4 | 32 | | |
| |||
28 | 56 | | |
29 | 57 | | |
30 | 58 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
34 | 62 | | |
35 | 63 | | |
36 | 64 | | |
| |||
255 | 283 | | |
256 | 284 | | |
257 | 285 | | |
258 | | - | |
259 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
260 | 293 | | |
261 | 294 | | |
262 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1210 | 1219 | | |
1211 | 1220 | | |
1212 | 1221 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| |||
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
| 84 | + | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
| |||
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
107 | | - | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| |||
530 | 540 | | |
531 | 541 | | |
532 | 542 | | |
533 | | - | |
| 543 | + | |
534 | 544 | | |
535 | 545 | | |
536 | 546 | | |
| |||
0 commit comments