adkandari / react-native-mock-location-detector

**Only For Android**. Detects if the device is using mock location app to spoof it's real location. In that case user will be prompted to fix the mock location settings first before using the app.
27 stars 24 forks source link

Does this support javascript? #13

Closed jhexdejesus1 closed 1 year ago

jhexdejesus1 commented 2 years ago

Hi,

I'm new to react native and I'm currently using JavaScript. When I added this dependencies it's giving me errors.

ERROR: Unexpected identifier '_reactNativeMockLocationDetector'. Expected ';' after variable declaration.

I only added these lines and it gives me that error.

import RNMockLocationDetector from "react-native-mock-location-detector";

const isLocationMocked = await RNMockLocationDetector.checkMockLocationProvider();

This function is returning null

[Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNativeMockLocationDetector.default.checkMockLocationProvider')]

I would really appreciate the response.

rijan08 commented 1 year ago

Have u fixed this ?? @jhexdejesus1

adkandari commented 1 year ago

Hi, I am sorry I am not maintaining this library from quite sometime now. You can check a new fork of this one https://github.com/jpudysz/react-native-turbo-mock-location-detector, looks like it is maintained regularly