wonday / react-native-orientation-locker

A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
MIT License
763 stars 274 forks source link

feat(android/ios): support new arch #297

Open ngocle2497 opened 6 months ago

ngocle2497 commented 6 months ago

Migrate Android/IOS to new arch

ngocle2497 commented 6 months ago

Hi @wonday can u review this PR

taongocson commented 6 months ago

@ngocle2497 i am using the library and getting error while rotating screen on IOS 16, Do you have any solution please help me!

ngocle2497 commented 6 months ago

@ngocle2497 i am using the library and getting error while rotating screen on IOS 16, Do you have any solution please help me!

what the error?

wonday commented 5 months ago

please fix the conflict

karlhorky commented 5 months ago

I guess this PR description can also have a line with Closes #272 added to it

leo6104 commented 1 month ago

iOS works well. (first moment it doesn't work but it was my project's misconfiguration in Info.pList) However, android has error.

e: file:///home/runner/work/vscore-rn/vscore-rn/node_modules/react-native-orientation-locker/android/src/main/java/com/orientationlocker/OrientationLockerModule.kt:28:1 Class 'OrientationLockerModule' is not abstract and does not implement abstract base class member public abstract fun removeListeners(count: Double): Unit defined in com.orientationlocker.OrientationLockerSpec
e: file:///home/runner/work/vscore-rn/vscore-rn/node_modules/react-native-orientation-locker/android/src/main/java/com/orientationlocker/OrientationLockerModule.kt:277:3 'removeListeners' overrides nothing

Here is the error when install the branch and call gradlew assembleRelease in android project.

I installed your repository like this.

In package.json,

    "react-native-orientation-locker": "github:ngocle2497/react-native-orientation-locker#feat/new_arch",
softgenicsShubham commented 1 month ago

@leo6104 Ios also works fine for me and android have the same issues. have you find any solutions ?