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

Issue on IOS #191

Open
mak12 opened this issue Jun 16, 2022 · 10 comments
Open

Issue on IOS #191

mak12 opened this issue Jun 16, 2022 · 10 comments

Comments

@mak12
Copy link

mak12 commented Jun 16, 2022

Hi, not able to run app in iOS after installing this library , issue is
Invariant Violation: new NativeEventEmitter() requires a non-null argument.
This issue is already reported and closed but its not fixed.

@kadirmenz
Copy link

Hi did you fix it? I face with same problem

@mak12
Copy link
Author

mak12 commented Jun 25, 2022

No, I ended up changing the library.

@kadirmenz
Copy link

Can you give me advice for this future?

@mak12
Copy link
Author

mak12 commented Jun 25, 2022

I used this one
https://github.com/Richou/react-native-android-location-enabler#readme

@aataa-fa
Copy link

aataa-fa commented Jul 3, 2022

You can use the platform-specific code of react-native.
import the package when the phone is only android. first create two files by the name locationEnabler.android.js and locationEnabler.ios.js
import the package in locationEnabler.android.js and use it as usual.

@aataa-fa
Copy link

aataa-fa commented Jul 3, 2022

the link for platform-specific code of react-native
https://reactnative.dev/docs/platform-specific-code.html#platform-specific-extensions

@sameerasad
Copy link

is there any way to edit the alert content?

@aataa-fa
Copy link

aataa-fa commented Aug 9, 2022

is there any way to edit the alert content?

there is not any way to change the alert content, cause it comes from native android settings api

@KienHaVan
Copy link

`import {Platform} from 'react-native';

import AddingDevicesScreenAndroid from './AddingDevicesScreen.android';
import AddingDevicesScreenIos from './AddingDevicesScreen.ios';

export default Platform.select({
ios: AddingDevicesScreenIos,
android: AddingDevicesScreenAndroid,
});`

You guys can try this. This work for me. I made 2 versions for each specific platform.

@amir-ibrahim
Copy link

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

6 participants