Layers
Layers

Reputation: 109

How to simulate visits on iOS?

how do we simulate a realistic path where you go to a particular location, stop for a while then move on. We are trying to trigger the visit monitoring API. preferably using the iPhone simulator

Upvotes: 4

Views: 811

Answers (3)

KoCMoHaBTa
KoCMoHaBTa

Reputation: 1519

An alternative approach is to subclass CLVisit and override all of its properties. This way you could create mock instances of your choice in order to test your functionality that works with visits.

Upvotes: 0

Adolfo
Adolfo

Reputation: 1862

You can generate a GPX file. Those files basically contains coordinates that simulates one location or a path.

Here is a very good article about it.

In the image below you can see the place in which you must add it in your Xcode project.

Edit Scheme -> Options -> "Default Location" combo -> Select a GPX file...

enter image description here

Upvotes: 0

Pieter
Pieter

Reputation: 17715

The simulator has options in the debug menu to simulate location changes.

Maybe temporary switching to a custom location, or simulating a bike ride in between locations, is enough to trigger a visit?

Upvotes: 2

Related Questions