Skip to content

feat(iOS): Add Fake GPS iOS support#452

Open
gustavoabel wants to merge 1 commit intoAgontuk:masterfrom
gustavoabel:feat/add-fakegpsdetection-ios
Open

feat(iOS): Add Fake GPS iOS support#452
gustavoabel wants to merge 1 commit intoAgontuk:masterfrom
gustavoabel:feat/add-fakegpsdetection-ios

Conversation

@gustavoabel
Copy link
Copy Markdown

Summary

This pull request adds fake GPS (mock location) detection support by exposing whether a location was simulated by software.

A new mocked field is added to the location object, using the native sourceInformation.isSimulatedBySoftware flag when available, with a safe fallback to false for compatibility with older iOS versions.

This allows applications using react-native-geolocation-service to reliably detect mocked locations and apply additional validation or security rules when needed.

Test Plan

Tested on iOS device/emulator with:

Mock location app enabled → mocked returns true

Real GPS location → mocked returns false

Verified backward compatibility on devices where sourceInformation is not available

Confirmed no breaking changes to the existing location API

Ensured the new field is optional and safely defaults to false

@gustavoabel gustavoabel changed the title feat(iOS): add fake gps iOS support feat(iOS): Add Fake GPS iOS support Dec 17, 2025
hrmharshsolanki05

This comment was marked as resolved.

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

Successfully merging this pull request may close these issues.

2 participants