Skip to content

feat(ios): support Mac Catalyst - #159

Merged
farfromrefug merged 12 commits into
masterfrom
feat/catalyst
Oct 2, 2026
Merged

farfromrefug merged 12 commits into
masterfrom
feat/catalyst

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Run Alpi Maps on macOS via Mac Catalyst, ported from oss-weather: resizable window, map data folder picked once and kept, and a release pipeline to the Mac App Store and Github.

Changes

  • build: @nativescript/ios 9.1.0; webpack maps --env.catalyst to ios and sets __CATALYST__; pods signed ad-hoc for macOS
  • app: scene manifest, UIRequiresFullScreen=false (also allows iPad multitasking), Mac App Store category, sandbox entitlements; shared window helper from tools (start 1200x800, min size, frame restored)
  • resize: app/variables.ts is a fork that read the screen size once (on Mac: the whole display). New windowSize store updated on root layout changes; the map bottom sheet width and landscape mode follow it. iOS/Android unchanged
  • Catalyst deployment target 14 in App_Resources/Catalyst/build.xcconfig (SimulatorCamera needs it); iOS stays 12
  • map data folder (Mac only): Settings "Map data path" row; picked folder kept as a security-scoped bookmark, restored on first getSavedMBTilesDir(), so map loading, offline routing/geocoding and styles use it
  • mouse and trackpad (Mac only): right-drag or ⌥-drag rotates/tilts, wheel and two-finger scroll zoom toward the cursor, trackpad pinch/rotate; right-click selects the place and opens its actions menu there. Right button read from AppKit events (App_Resources/iOS/src/MacRightMouse), UIApplicationSupportsIndirectInputEvents in Info.plist
  • fixes: layers list threw on iOS (ReorderLongPressHandler lost its export under @NativeClass); region mbtiles merged base-first so a folder with 4+ files no longer crashes the SDK
  • release: catalyst input in release.yml (runs after iOS, reuses its version bump), fastlane mac lanes (store pkg + notarized Developer ID zip), prepare.catalyst* scripts

Verification

  • svelte-check: 0 errors
  • app builds and runs on Mac (arm64) with the linked PRs below
  • to check: window resize reflows the bottom sheet; window frame restored on relaunch; pick a folder in Settings, restart, mbtiles still load
  • release lanes not run yet
  • mouse controls checked by hand on Mac: right-drag, ⌥-drag, wheel, trackpad, right-click menu

Depends on

Notes

  • tools bumped to app-tools main (window helper), which also brings 3 unrelated component commits; svelte-check clean
  • yarn.lock changes only the runtime entry: the lock is stale (removed 3dmap/peakfinder workspaces still listed), a full yarn install rewrites ~4k lines

🤖 Generated with Claude Code

farfromrefug and others added 12 commits October 2, 2026 15:55
The runtime the Mac Catalyst build was made to work with, as in oss-weather.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- map the catalyst webpack env to ios, with a __CATALYST__ flag
- declare a scene manifest and a resizable window, and a Mac App Store category
- start the shared window helper (bump tools): initial and minimum size, restored frame
- follow window resizes: a windowSize store sizes the map bottom sheet and picks landscape
- add Catalyst sandbox entitlements and build.xcconfig (Catalyst 14, needed by SimulatorCamera)
- sign pods ad-hoc for the macOS SDK

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sandbox only grants a picked folder until the app quits, so the folder is kept as a
security-scoped bookmark and its access restored on first use. Map loading, offline routing and
geocoding, and styles then read it. iPhone and iPad keep Documents/alpimaps_mbtiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thub

- add a catalyst input to the release workflow; the job runs after iOS and reuses its version
  bump, as both share the iOS Info.plist
- add mac lanes: the store pkg goes to TestFlight/App Store; a separate non-store build is
  Developer ID signed, notarized and zipped for the Github release
- move fastlane_match to the top level, with platform and additional_cert_types
- ignore the android scope in the catalyst changelog so ios-scoped commits are kept

Needs release_catalyst.yml in Akylas/app-tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desktop map controls, as in the web version: right-drag (or option-drag)
rotates and tilts, the wheel and two-finger scroll zoom toward the cursor,
pinch and rotate gestures work, and a right-click selects the place under
the cursor and opens its actions menu there.

UIKit gives no right-button drags to gesture recognizers and reports a
right-click on mouse down, so a small native helper (MacRightMouse) reads
the right button from AppKit events. Info.plist opts into indirect input
events, without which the mouse arrives as plain touches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The @nativeclass transform drops an `export default` written on the class
itself, so the import was undefined and opening the layers list threw
"Cannot read properties of undefined (reading 'initWithOwner')".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regions with four or more mbtiles were merged pairwise, so the top merge
had no MBTiles source directly under it. The SDK reads a package's tile
mask from such a child and crashed on a picked alpimaps_mbtiles folder.
Merges now nest to the right with the region's base package first, which
keeps the layer order and gives every level a direct MBTiles child.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le picker

- Massif from @massif-maps/styles: in dev the icon-font CartoCSS plus the Alpimaps OSM child
  (dev_assets/styles/massif) as a folder, recompiled on sync; `buildstyle` compiles and zips
  both into app/assets/styles/massif.zip for production. Default style is Massif Alpimaps OSM.
- The child moves bus stops to z15/z16 through constants and widens bakeries / holds pharmacies
  with templates.
- Style picker as a bottom sheet over the visible map: one row per style, its variants as
  square previews; Massif's five variants switch through the `variant` style parameter without
  reloading, e-ink also swapping the inner style. Legacy styles listed below.
- CustomLayersModule rebuilds only the layers on the decoder that changed: an inner style change
  rebuilt the base map on the inner decoder, leaving a blank map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review October 2, 2026 21:21
@farfromrefug
farfromrefug merged commit 739f323 into master Oct 2, 2026
@farfromrefug
farfromrefug deleted the feat/catalyst branch October 2, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant