Chinese smartphone giant Xiaomi Corporation swung to a net profit of $679.2 million (4.9 billion yuan) for the third quarter of 2023, compared with a net loss of $205.6 million (1.5 billion yuan) in the year-earlier period.