In my case, data from the server comes in chunks and one line could be split in half. But String.enumerateSubstrings(... .options: byLines) counts unfinished line just like finished. So the result was that event was not processing at all. Critical bug.
Changing from enumerateSubstrings to "\n" search fixes that.
In my case, data from the server comes in chunks and one line could be split in half. But
String.enumerateSubstrings(... .options: byLines)
counts unfinished line just like finished. So the result was that event was not processing at all. Critical bug.Changing from enumerateSubstrings to "\n" search fixes that.