Building native modules in cross-platform mobile architectures often introduces redundant interop layers and custom domain-specific languages. For teams scaling cross-platform codebases, maintaining this interface code adds friction during dependency upgrades.

Expo Modules 2.0 addresses this maintainability barrier by shifting native interop directly onto standard language features. Instead of requiring a custom DSL, modules are authored as annotated Swift or Kotlin classes.

In short

  • Expo Modules 2.0 replaces custom DSL boilerplate with annotated Swift and Kotlin classes to streamline cross-platform native interop.

  • Type conversion, thread synchronization, and app lifecycle management remain handled by the framework while authoring code mimics standard mobile patterns.

  • SDK 57 introduces iOS support via Swift macros, while Android authoring models and view support follow in subsequent releases.

Swapping Custom DSLs for Native Classes

In the previous version of the architecture, developers had to describe module APIs using a purpose-built domain-specific language. This meant learning framework-specific syntax that did not map cleanly to standard iOS or Android conventions.

Version 2.0 eliminates this interop friction. A module becomes an annotated Swift or Kotlin class where developers write ordinary methods and properties, marking specific items for JavaScript exposure without maintaining separate mapping boilerplate.

Preserving Thread Safety and Type Conversion

While the authoring experience shifts to native classes, the core engine continues to manage complex runtime tasks. Data conversion between JavaScript values and native types happens automatically.

The framework also executes functions on the correct threads to utilize device cores effectively, removing the need for developers to write manual thread synchronization logic.

Rollout Timeline and Architectural Caveats

Developers can evaluate the new Swift macros on iOS starting in SDK 57, which covers functions, records, shared objects, and events. UI views are not included in this initial release.

Android support using the same authoring model is currently in development. SDK 58 will mark the beta release of Expo Modules 2.0 alongside official documentation and agent skills to assist coding assistants with the new API.

Adopting cleaner native interop patterns reduces long-term maintenance overhead in cross-platform architectures.

Evaluating these capabilities early helps teams prepare their custom native layers before the upcoming stable release.