SAN FRANCISCO—Apple Inc. on Friday secured a permit for​​autonomous-vehicle testing in California, the clearest sign to date of progress in the company’s secretive efforts to develop self-driving car technology.

The permit, awarded by California’s Department of Motor Vehicles, is Apple’s first for autonomous cars and allows it to test drive vehicles on public roads in the largest U.S. state by population, adding it to a list of rivals that includes Google parent Alphabet Inc. and Tesla Inc. The move indicates Apple is going...