Sorting with .sorted works perfectly when the values are positive. Even everything works perfectly on my simulators. I am getting this error on my release builds that the negative values are coming on top. Will wait for your response on the same.
ex : from 22,10, 21, 5, -1, 6 return is like : -1, 22, 21,10, 6, 5