Uber Technologies Inc. is becoming friends with a former foe.

The company has reached an agreement to list all New York City taxis on its app, an alliance that could ease the ride-hailing giant’s driver shortage and temper high fares while directing more business to cabdrivers, whose livelihoods were affected by the emergence of car-sharing apps and the pandemic.