Support React Native 0.81 / New Architecture - #115
Open
s3y wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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
jvmTargetto 17. - Android: avoid
viewTagmember shadowing in event classes by no longer declaringprivate 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 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (
compileReleaseKotlinwas failing):android/build.gradle: bumpcompileOptionsto Java 17 and addkotlinOptions { jvmTarget = "17" }. RN 0.81 requires Java 17.private val viewTag, which now hides theviewTagmember the RN 0.81Eventbase class exposes ('viewTag' hides member of supertype 'Event' and needs an 'override' modifier). They now takeviewTagas a plain constructor parameter and use the inherited one indispatch().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
HaishinKit1.9.x (viaApiVideoLiveStream) 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 Podfilepost_installthat setsSWIFT_OPTIMIZATION_LEVEL = -Ononefor theHaishinKittarget. Happy to open a separate PR bumping the iOS SDK / HaishinKit if that's preferred.Testing
exampleapp built on iOS (Xcode 26) and Android (JDK 17), New Architecture on and off.