Pick the fix
You want to show nearby stores once when a screen opens. Best approach?
Hint 1 of 1
How many locations do you need?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Request when-in-use permission and take one location, for example the first value from CLLocationUpdate.liveUpdates()
Correct. One fix with the least permission.
Why not the others?
- B Request Always permission. Background access isn't needed.
- C Start continuous updates with best accuracy and never stop. It drains the battery for a one-time need.
- D Use significant-change monitoring. It's for background movement, and too coarse for this.