facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.06k stars 24.32k forks source link

DeviceEventEmitter fails to build in iOS #35205

Closed mjstelly closed 1 month ago

mjstelly commented 1 year ago

New Version

0.69.0

Old Version

0.64.1

Build Target(s)

iPhone 13 / iOS 15.5

Output of react-native info

System: OS: macOS 12.5.1 CPU: (10) arm64 Apple M1 Pro Memory: 113.67 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/AH94896/.rvm/gems/ruby-3.0.0/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 30, 31, 33 Build Tools: 29.0.2, 30.0.2, 30.0.3, 33.0.0 System Images: android-31 | ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.16 - /Users/AH94896/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.69.0 => 0.69.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Building source code through Xcode, the build fails with the following error

.../node_modules/@unimodules/react-native-adapter/ios/UMReactNativeAdapter/Services/UMReactNativeEventEmitter.m:11:1: Illegal redeclaration of property in class extension 'UMReactNativeEventEmitter' (attribute must be 'readwrite', while its primary must be 'readonly')

We use DeviceEventEmitter extensively and it has worked as intended on 0.64.1. Now, trying to get a basic build fails with no further guidance on how to resolve the problem. I don't know what you would need to research this issue. Because DeviceEventEmitter is not a simple library to implement, I wouldn't know how to create a test case for this. If you have any suggestions, I'd be willing to try them.

mjstelly commented 1 year ago

Another important point. This issue appears to affect only Apple M1 hardware. Another colleague and I with M1's are both affected. One colleague on an Intel Macbook is not.

isaakSicor commented 1 year ago

@mjstelly any solution?

walterwootz commented 1 year ago

any solutions?

maestrolsj commented 1 year ago

I have that issue with Intel chip on my mac

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

chrisunl commented 1 year ago

I have the same issue.

dhavalbhuva commented 7 months ago

I have the same issue.

/node_modules/@unimodules/react-native-adapter/ios/UMReactNativeAdapter/Services/UMReactNativeEventEmitter.m:11:1 Illegal redeclaration of property in class extension 'UMReactNativeEventEmitter' (attribute must be 'readwrite', while its primary must be 'readonly')

No known class method for selector 'getAllExportedModules'
No known class method for selector 'getExportedModuleForName:'
No known class method for selector 'getExportedModuleForName:'
react-native-bot commented 1 month ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

react-native-bot commented 1 month ago

This issue was closed because it has been stalled for 7 days with no activity.