Location Spoofing Detection

Hello, I have an attendance based app which uses user current location. I want to prevent my ios app from location spoofing which is done by itool or many other tools can anyone please help me out.

Pls. don't spam the forums w/duplicate questions.


SeeFor Best Results - Read the Label ..for how to delete/move/edit, thanks.

I have used the api isSimulatedBySoftware provided by apple. Its available from iOS 15 onwards.

if #available(iOS 15.0, *) {

                    // use UICollectionViewCompositionalLayout

                    let isLocationSimulated = manager.location?.sourceInformation?.isSimulatedBySoftware ?? false

                    let isProducedByAccess = locationManager.location?.sourceInformation?.isProducedByAccessory ?? false

                    

                    let info = CLLocationSourceInformation(softwareSimulationState: isLocationSimulated, andExternalAccessoryState: isProducedByAccess)

                    print("location simulation info \(info)")
              
                    if info.isSimulatedBySoftware == true || info.isProducedByAccessory == true{

                        isSimulatedLocation = true

                    } else {

                        isSimulatedLocation = false

                    }

                }

I could detect the location faking using third party application like iAnyGo..

Location Spoofing Detection
 
 
Q