A Beijing regulator ordered Apple to stop selling some smartphones in the city because their design was too close to a Chinese firm’s model.