Help with iPhone XR GPS sampling rate
There's no way of explicity setting the update rate of your location. Note that you're not "communicating" directly with a GPS, but rather receiving location updates from Core Location that could come from a GPS source, but also from other sources.
Remember that the location updates are filtered to conserve power. This means that you only get updates when the phone has actually moved a certain distance - and the number of updates can be affected by external factors such as whether or not the phone is set in the power save state. Also remember to test this while outside and moving about. You won't get great positioning indoors.
You should ensure to set the distance filter to an appropriate distance for your application (you currently have it set to none), and also to set the correct activity (i.e. you currently have it set to other, but if you want to do for example automotive navigation, then set it to that).
In your attached source code, you only look at the first location given to you in didUpdateLocations
. You normally don't want to do that. The newest location is the last one in the array, so I would at least change it to look at the last one.
As you are interested in having more locations over a time period, remember to look at all the updates in the array. There might be more than one in each update.