Reputation: 169
What I'm trying to do is set the location of my iPhone through my app. The only thing I've been able to do is in xcode go to debug->simulate location. My question is, is it possible to set the location without using xcode.
Thanks!
Upvotes: 0
Views: 46
Reputation: 1120
You may do some modification when you achieve your locations.
You can use a viewController with a map view to choose a location.
when you want to simulate a location, just achieve from your simulated locations.
I have wrote a similar function before, you can make a reference. The source codes
And the operations start->TabBarController->The Third Tab->The right Bar Item->The Second Row in the First Section->Long press to pick a location
If you have a locationManager, it will be very convenient. like
coordinate = [STDLocationPickerController cachedFakeLocationCoordinate]
if (coordinate.long * lat > 0) {
continue your logic
} else {
locate or pick a location
}
Upvotes: 1