react-native icon indicating copy to clipboard operation
react-native copied to clipboard

DeviceEventEmitter fails to build in iOS

Open mjstelly opened this issue 3 years ago • 8 comments

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 avatar Nov 04 '22 20:11 mjstelly

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.

mjstelly avatar Nov 04 '22 21:11 mjstelly

@mjstelly any solution?

isaakSicor avatar Nov 17 '22 09:11 isaakSicor

any solutions?

walterwootz avatar Jan 19 '23 11:01 walterwootz

I have that issue with Intel chip on my mac

maestrolsj avatar Mar 28 '23 21:03 maestrolsj

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.

github-actions[bot] avatar Sep 25 '23 05:09 github-actions[bot]

I have the same issue.

chrisunl avatar Sep 27 '23 14:09 chrisunl

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:'

dhavalbhuva avatar Mar 20 '24 13:03 dhavalbhuva