Skip to content

Conversation

@mfazekas
Copy link
Contributor

Since @rnmapbox/maps 10.3.0 only supports React Native's new architecture, this removes all old architecture related code from Android:

  • Delete android/src/main/old-arch directory with generated specs
  • Remove isNewArchitectureEnabled() checks from build.gradle
  • Remove IS_NEW_ARCHITECTURE_ENABLED BuildConfig field
  • Always apply com.facebook.react plugin (required for new arch)
  • Simplify ViewTagResolver to always use FABRIC UIManager
  • Remove old arch event emission fallback in RNMBXLocationModule
  • Update RNMBXPackage to always use isTurboModule=true for TurboModules
  • Delete unused EventEmitter.java (was only used for old arch events)
  • Delete scripts/codegen-old-arch.js and remove from autogenerate.mjs
  • Update CONTRIBUTING.md to remove old-arch references

The new architecture codegen by React Native's Gradle plugin now generates the required specs during build.

Description

Fixes #

Added your feature that allows ...

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

Component to reproduce the issue you're fixing

Since @rnmapbox/maps 10.3.0 only supports React Native's new architecture,
this removes all old architecture related code from Android:

- Delete android/src/main/old-arch directory with generated specs
- Remove isNewArchitectureEnabled() checks from build.gradle
- Remove IS_NEW_ARCHITECTURE_ENABLED BuildConfig field
- Always apply com.facebook.react plugin (required for new arch)
- Simplify ViewTagResolver to always use FABRIC UIManager
- Remove old arch event emission fallback in RNMBXLocationModule
- Update RNMBXPackage to always use isTurboModule=true for TurboModules
- Delete unused EventEmitter.java (was only used for old arch events)
- Delete scripts/codegen-old-arch.js and remove from autogenerate.mjs
- Update CONTRIBUTING.md to remove old-arch references

The new architecture codegen by React Native's Gradle plugin now generates
the required specs during build.
@mfazekas mfazekas marked this pull request as ready for review January 1, 2026 18:44
@mfazekas mfazekas merged commit 89ebfd9 into main Jan 1, 2026
7 checks passed
@mfazekas mfazekas deleted the claude/remove-android-new-arch-3RtQb branch January 1, 2026 18:45
mfazekas pushed a commit that referenced this pull request Jan 1, 2026
Remove React Native old architecture (Paper/Bridge) code from iOS,
keeping only new architecture (Fabric/TurboModules) code.

Changes:
- Delete all *ViewManager.m and *ViewManager.swift files (old arch view managers)
- Remove #ifdef RCT_NEW_ARCH_ENABLED guards from ComponentView files
- Simplify Module.h files to only conform to TurboModule protocols
- Remove old arch conditionals from Module.mm files
- Update RNMBXViewResolver to remove old arch code paths
- Remove unused RCTViewManager imports from Bridge/RNMBX.h and Swift.pre.h
- Remove guards from RNMBXFabricPropConvert.mm and RNMBXFollyConvert.h

This is a follow-up to the Android old architecture removal (#4128)
and continues the 10.3.0 cleanup work (#4118).
mfazekas added a commit that referenced this pull request Jan 18, 2026
* chore(ios): remove old architecture code

Remove React Native old architecture (Paper/Bridge) code from iOS,
keeping only new architecture (Fabric/TurboModules) code.

Changes:
- Delete all *ViewManager.m and *ViewManager.swift files (old arch view managers)
- Remove #ifdef RCT_NEW_ARCH_ENABLED guards from ComponentView files
- Simplify Module.h files to only conform to TurboModule protocols
- Remove old arch conditionals from Module.mm files
- Update RNMBXViewResolver to remove old arch code paths
- Remove unused RCTViewManager imports from Bridge/RNMBX.h and Swift.pre.h
- Remove guards from RNMBXFabricPropConvert.mm and RNMBXFollyConvert.h

This is a follow-up to the Android old architecture removal (#4128)
and continues the 10.3.0 cleanup work (#4118).

* fix(ios): add __cplusplus guard to ComponentView.h files

The umbrella header is compiled as Objective-C (not Objective-C++),
which causes errors when ComponentView.h files import Fabric headers
that transitively include C++ code like <atomic>.

Use #ifdef __cplusplus guard instead of RCT_NEW_ARCH_ENABLED to:
- Allow content when compiled as Objective-C++ (.mm files)
- Hide content when compiled as Objective-C (umbrella header)

* fix(ios): add module wrapper methods to RNMBXMapView

Move 16 module methods from static RNMBXMapViewManager methods to instance methods on RNMBXMapView, fixing build errors after old architecture removal.

* fix(ios): restructure Module.h files for Swift compilation

Move Foundation/UIKit imports outside __cplusplus guard and provide
plain NSObject interface for non-C++ contexts (Swift).

* fix(ios): add module wrapper methods to RNMBXViewport and RNMBXShapeSource

Call methods directly on view instances instead of through Manager classes.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants