Testing GPS in simulator with Fensing

Solution:

 It was not possible in simulator with realtime location updates.But you can create a fencing files and test it in a simulator.

Goto file->new in your xcode and create a blank file or goto textEdit and create an empty file and save it as filename.gpx and then drag into your xcode.

Write code into the file like below.

<?xml version="1.0"?>
<gpx version="1.1" creator="Xcode">
    <wpt lat="43.1257858" lon="-79.0912399">
        <name>Niagra</name>
    </wpt>

</gpx>

I had named the location name as Niagra with lattitude and longitude.
Run your app in the simulator.Goto Debug->Simulate location and selecet your file.Then the simultor location is changed to your mentioned location.

Comments

Popular posts from this blog

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift