Skip to content

Support React Native 0.81 / New Architecture - #115

Open
s3y wants to merge 1 commit into
apivideo:mainfrom
builtbyup:feat/react-native-0.81-new-architecture
Open

Support React Native 0.81 / New Architecture#115
s3y wants to merge 1 commit into
apivideo:mainfrom
builtbyup:feat/react-native-0.81-new-architecture

Conversation

@s3y

@s3y s3y commented Jul 19, 2026

Copy link
Copy Markdown

Fixes the library so it compiles and runs under React Native 0.81 with the New Architecture (Fabric) enabled, addressing #105, #107 and #109. Validated against Expo SDK 54 (RN 0.81.5, React 19.1, New Arch on) with real EAS builds on both platforms.

Changes

Android (compileReleaseKotlin was failing):

  • android/build.gradle: bump compileOptions to Java 17 and add kotlinOptions { jvmTarget = "17" }. RN 0.81 requires Java 17.
  • The five event classes declared private val viewTag, which now hides the viewTag member the RN 0.81 Event base class exposes ('viewTag' hides member of supertype 'Event' and needs an 'override' modifier). They now take viewTag as a plain constructor parameter and use the inherited one in dispatch().

iOS:

  • react-native-livestream.podspec: raise the deployment target from iOS 13.0 to 15.1 to match RN 0.81's floor.

Note for consumers on iOS

The library's own Fabric sources compile cleanly, but HaishinKit 1.9.x (via ApiVideoLiveStream) crashes the Swift compiler under whole-module optimisation in Release on Xcode 26 (MixerNode.init(format:) - "Found a leaked owned value that was never consumed"). Until the pinned HaishinKit is bumped, consumers can work around it with a Podfile post_install that sets SWIFT_OPTIMIZATION_LEVEL = -Onone for the HaishinKit target. Happy to open a separate PR bumping the iOS SDK / HaishinKit if that's preferred.

Testing

  • example app built on iOS (Xcode 26) and Android (JDK 17), New Architecture on and off.
  • End-to-end build of a consuming Expo SDK 54 app on EAS, both platforms, FINISHED.

Copilot AI review requested due to automatic review settings July 19, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the library’s native build settings to support React Native 0.81 (including New Architecture/Fabric), focusing on Android build compatibility and iOS minimum deployment target alignment.

Changes:

  • Android: compile with Java 17 and set Kotlin jvmTarget to 17.
  • Android: avoid viewTag member shadowing in event classes by no longer declaring private val viewTag.
  • iOS: raise the podspec iOS deployment target to 15.1.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
react-native-livestream.podspec Raises minimum iOS deployment target to align with RN 0.81 requirements.
android/build.gradle Switches Android compilation to Java 17 and sets Kotlin JVM target to 17.
android/src/main/java/video/api/reactnative/livestream/events/OnStartStreamingEvent.kt Removes viewTag property shadowing to match RN 0.81 Event base class changes.
android/src/main/java/video/api/reactnative/livestream/events/OnPermissionsDeniedEvent.kt Removes viewTag property shadowing.
android/src/main/java/video/api/reactnative/livestream/events/OnDisconnectEvent.kt Removes viewTag property shadowing.
android/src/main/java/video/api/reactnative/livestream/events/OnConnectionSuccessEvent.kt Removes viewTag property shadowing.
android/src/main/java/video/api/reactnative/livestream/events/OnConnectionFailedEvent.kt Removes viewTag property shadowing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread android/build.gradle
Comment on lines 86 to 93
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}
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.

2 participants