Skip to content

Migrate iOS route details backend to OsmAnd-shared - #5707

Open
alex-dev-neo wants to merge 15 commits into
masterfrom
shared-route-details-migration
Open

Migrate iOS route details backend to OsmAnd-shared#5707
alex-dev-neo wants to merge 15 commits into
masterfrom
shared-route-details-migration

Conversation

@alex-dev-neo

@alex-dev-neo alex-dev-neo commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Related to https://github.com/osmandapp/OsmAnd-Issues/issues/1794

Summary

Migrate the iOS route-details backend and duplicated data models to OsmAnd-shared.

This is a backend migration only. It does not introduce new UI or intentionally change route-details presentation.

Changes

  • Add an iOS adapter that creates an immutable shared RouteDetailsSnapshot from native route calculation results.
  • Route geometry and maneuver calculations through the shared backend.
  • Route traffic warnings, cameras, hazards, crossings, tunnels, and other route events through the shared event backend.
  • Route route-statistics calculations through the shared statistics backend.
  • Replace duplicated iOS models with shared equivalents:
    • OARouteStatistics → shared RouteStatistic
    • OAExitInfo → shared RouteExitInfo
    • EOAAlarmInfoType → shared RouteEventType
  • Remove obsolete conversion code where iOS now stores shared types directly.
  • Update existing route-details and route-analysis consumers to accept the shared models.

Compatibility

  • Keep OAAlarmInfo as the mutable iOS OALocationPoint wrapper required for navigation and tunnel aggregation.
  • Preserve existing warning icons, localized names, priorities, filtering, announcements, and deduplication behavior.
  • Preserve historical OAAlarmInfo hash values despite the old iOS and shared enum ordering difference.
  • Keep explicit route-service conversion because persisted iOS route-service integer values do not match shared enum ordinals.

Tests

Added or updated coverage for:

  • Native-to-shared route snapshot conversion
  • Shared geometry and maneuver calculations
  • Route-event creation, selection, ordering, and deduplication
  • Route-statistics compatibility and renderer fallback behavior
  • Shared model integration with existing iOS consumers

Dependency

Depends on the corresponding OsmAnd-shared route-details backend changes from the Android PR osmandapp/OsmAnd#25773.

@alex-dev-neo
alex-dev-neo requested a review from tigrim August 30, 2026 07:55
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