Apple Inc’s App Store reversed a decision to reject a Hong Kong app that shows police activity amid pro-democracy protests in the territory.

The app, known as HKmap.live, is a mobile version of a Web site that helps people avoid potentially dangerous areas, said its developer, who uses the alias Kuma to remain anonymous.

It was rejected from the App Store because it “facilitates, enables and encourages an activity that is not legal,” Apple told the developer, according to a copy of the rejection notice seen by Bloomberg News.

“Specifically, the app allowed users to evade law enforcement,” Apple wrote.

On Friday, Apple reversed the decision and the app has been approved for sale in Hong Kong.

“Apple finally made the right decision,” Kuma said.

The developer said the app is built to “show events happening” in Hong Kong, but what users choose to do with that information is their choice.

“We don’t encourage any advice on the map in general. Our ultimate goal is safety for everyone,” Kuma said.

On Twitter, the developer had argued that the rejection was unfair because other apps, such as Google’s Waze, help drivers avoid traffic cameras and police.

Apple is assuming that HKmap.live users are lawbreakers “and therefore evading law enforcement, which is clearly not the same,” the developer wrote.

By contrast, the app was approved for download on Android phones via a “quick process,” Kuma said.

The app was submitted to the App Store on Sept. 21. It was initially rejected on Sept. 26 for another reason related to rules on payment options and what additional functions apps can tap, the developer said.

After addressing those issues, the app was resubmitted and rejected again on Oct. 2 for helping users evade law enforcement, they said.

The app was submitted for review again later that day, they said.

Apple sells millions of iPhones in Hong Kong and China, and indirectly supports millions of jobs there.

However, it must also follow local laws, which have become increasingly tough when it comes to digital information.

In 2017, the company set up a data center in China to abide by laws that require global companies to store information within China’s borders. Apple also pulled some virtual private network apps from its App Store in China, limiting people’s ability to bypass a local Web firewall and access overseas sites.

“We would obviously rather not remove the apps, but like we do in other countries, we follow the law wherever we do business,” Apple chief executive officer Tim Cook said at the time. “We strongly believe participating in markets and bringing benefits to customers is in the best interest of the folks there and in other countries as well.”

Apple could not immediately be reached for comment on the approval.

Reviewing app decisions several times is a common practice. According to Apple’s Web site, the company rejects 40 percent of the 100,000 apps considered each week. It has what is known as an App Review Board to evaluate rejections.

As part of its latest review of HKmap.live, Apple likely researched whether the software breached local laws. Apple typically examines such laws before making approval or rejection decisions on third-party apps.

The developer had hoped Apple would change its mind. They bought an iPhone and a Mac computer to build the app for the company’s platform.