Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violations on iOS ("new NativeEventEmitter() requires a non-null argument", and "Module AppRegistry is not a registered callable module") #145

Open
dyelax opened this issue Mar 6, 2022 · 2 comments

Comments

@dyelax
Copy link

dyelax commented Mar 6, 2022

I'm trying to use this package on iOS. If I just import SystemSetting from "react-native-system-setting" without using it, it runs fine, but when calling any of the SystemSetting methods, I get the following breaking errors:

 ERROR  Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. 
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

I've tried SystemSetting.getVolume(), SystemSetting.setVolume() and SystemSetting.getBrightness() and all fail.

I've tried applying the fix from #140 but it doesn't resolve the errors.

=============

react-native-system-setting Version: 1.7.6
iOS Version: 14.8.1

Installation Steps:

yarn add react-native-system-setting
react-native link react-native-system-setting

Code:

import SystemSetting from "react-native-system-setting";

class SystemSettingExample extends Component {
  async componentDidMount() {
    this.volumeListener = SystemSetting.addVolumeListener(data => {
      console.log("DATA", data);
    });
  }
}
@geroale
Copy link

geroale commented Mar 9, 2022

Same issue here

@GabLeRoux
Copy link

Most likely a duplicate of #137 but for the iOS side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants