Uber attracted a great deal of criticism last year when it started tracking the location of customers even after their rides had ended. While the tracking was said to last for only five minutes, some riders reported that it appeared to be tracking them for days or even weeks after their rides.

The company offered an explanation for this the following day, but many were still unhappy that they were forced to choose between never allowing the app to track their location (which would make it next to impossible to use) or allowing it at all times. Uber says that it is now fixing the problem …

Reuters reports that the iPhone app will now be updated to allow tracking only while the app is open.

The change, which restores users’ ability to share location data only while using the app, is expected to be announced on Tuesday and rolled out to iPhone users starting this week. It comes as Uber tries to recover from a series of crises culminating in the ouster of Chief Executive Travis Kalanick and other top executives.

Uber still hasn’t explained why it wanted to track customers after the end of their rides, making only a vague claim that it was to protect customer safety. It has been speculated that it was instead to reduce driver fraud, ensuring that the end of a ride was accurately recorded.

Uber said that it never actually started collecting the data from iPhone users, though it did for a time with Android. The ability to limit location tracking to when the app is open is being made available to iPhone owners first, and will then be rolled out on Android.

Joe Sullivan, Uber’s chief security officer, told Reuters that it may bring the behavior back at some future point, but on an opt-in basis.

Sullivan said Uber made a mistake by asking for more information from users without making clear what value Uber would offer in return. If Uber decides that tracking a rider’s location for five minutes is valuable in the future, it will seek to explain what the value is and allow customers to opt in to the setting, he said..

Uber says it has been working on beefing up its privacy protections, recently adding a driver-rider chat facility that allows messages to be exchanged without sharing a cellphone number.

You can follow iPhoneFirmware.com on Twitter, add us to your circle on Google+ or like our Facebook page to keep yourself updated on all the latest from Apple and the Web.