In actuality Swift does (technically) guarantee Unicode-correct string ordering, with the exception that Apple doesn't use Unicode-correct string ordering on ASCII-ASCII string comparison, Apple uses ASCII standard string ordering when both strings are purely ASCII, which is faster.
So, probably unlike all other text bugs, this bug only appears on ASCII strings, in stead of emoji strings.
According to the latest comment in SR-982
String sort order and comparisons differ between Darwin and Linux this “This should've been fixed” – but I don't know which version has been decided to be “correct.” The latest developer snapshot for Xcode still sorts as ["Apple", "Banana", "apple", "banana"].
Finally, once it is agreed that the default role for String is to handle machine-generated and machine-readable text, the default ordering of Strings need no longer use the UCA at all. It is sufficient to order them in any way that's consistent with equality, so String ordering can simply be a lexicographical comparison of normalized forms, ...
This is the old behavior. Prior to Swift 4.1, Linux used UCA with DUCET ordering and comparisons. To improve performance on both Darwin and Linux (especially older Ubuntu's), we implemented a new comparison implementation for Swift 4.2. This new implementation is the same across Linux and Darwin, so both platforms get the same answer.
Have you tried with a recent 4.2 or master snapshot?
This is no specific formal guarantee, and the ordering is not guaranteed to be stable even across executions of the same program.
Right now it is the lexicographical order of the NFC-normalized UTF-16 code units, not the scalar values. It's likely that we may switch it to the scalar values in the future. The only place where this would cause an ordering difference would be BMP scalars beyond the surrogates.