react-native-background-geolocation: No visible @interface for 'RCTEventEmitter' declares the selector 'invalidate' in RNBackgroundGeolocation.m

While trying to build the iOS app from Xcode, the following error is showing up on line 664 in RNBackgroundGeolocation.m: No visible @interface for ‘RCTEventEmitter’ declares the selector ‘invalidate’

This leads to inability to build the app or run it.

Your Environment

  • Plugin version: “^4.4.2”
  • Platform: iOS
  • OS version: 14.5
  • Device manufacturer / model: iPhone 11
  • React Native version (react-native -v): “^0.63.4”
  • Plugin config

Expected Behavior

Application should have been build and run on the device

Actual Behavior

Build Failed with the above error

Steps to Reproduce

  1. Install react-native-background-geolocation as per the guidelines in the doc
  2. Run npm i
  3. Build application in Xcode

Context

Simply trying to build and run the app

Debug logs

Logs
No visible @interface for 'RCTEventEmitter' declares the selector 'invalidate'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

@Vikmanatus Thank you for providing actual information. I’m investigating now.

Hello to everyone 😃

I am running the latest version 4.4.3 on IOS (iPhone 8 14.5.1) I am facing a similar error but it is only occuring when I try to run the remote Chrome Debugger

I have a XCode stack trace saying Thread 7: EXC_BAD_ACCESS (code=2, address=0x16db2ff90)

A warning below is saying Method possibly missing a [super invalidate] call

Otherwise I if dont’t run the chrome debugger, the app is compiling fine

Do you think they could be a quick fix to fix this issue ? 😃

I just installed latest version it is not working for me.

Try this:


if([super respondsToSelector:@selector(invalidate)]){
    [super performSelector:@selector(invalidate)];
}

You’re free to comment-out that line if it makes your app build. I’ll continue to investigate.