Beijing legalized online car hailing apps such as Uber China and its homegrown rival Didi Chuxing nationwide.