Native API Boundaries

Native APIs are where stack decisions stop being aesthetic. If the product depends on an OS capability, choose the stack that gives you the cleanest, policy-compliant path to that capability.

Boundary Examples

CapabilityPreferred familyWhy
SMS parsing on AndroidAndroid nativePermission model, Play policy, background/device behavior
Biometric lock for finance dataNative mobilePlatform trust and secure storage
File watching across large foldersDesktop shell or CLINative file APIs and performance
Window management, tray, menusDesktop shell/nativeOS-specific desktop affordances
Windows widgets, AppLifecycle, Fluent UIWindows App SDKMicrosoft platform APIs and WinUI 3
Offline installable formsPWABrowser APIs can be enough without native store work
Tool execution from AIAI-native stackNeeds sandboxing and audit, not just API calls

Abstraction Rule

Use a cross-platform abstraction only when the abstraction covers the core capability in the release path you need. If the feature immediately requires native modules, platform channels, or custom plugins, treat that as native work during planning.

AI Failure Pattern

AI agents often overfit to old examples:

  • UWP APIs in WinUI 3 projects.
  • Android permission snippets that ignore current Play policy.
  • Electron apps with unsafe Node exposure.
  • PWA examples without iOS/Safari install caveats.

Record the official docs that override model memory before implementation.