Created
June 26, 2023 14:46
-
-
Save cfdrake/134f996aaa308e04a265b844834210dd to your computer and use it in GitHub Desktop.
j2objc iOS 17 issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On iOS 16 I see that the reader indicates it is ready, the stream has 10 characters | |
// available to read, and the loop executes printing each character out line by line. | |
// | |
// With no changes, on iOS 17 beta I see that the reader indicates it is ready, the first | |
// byte is read, but the loop only executes once printing 65533 and exiting. | |
func testDecodeStream() { | |
let testString = "{testtest}" | |
let data = testString.data(using: .utf8) | |
let byteArray = IOSByteArray(nsData: data) | |
let stream: JavaIoInputStream = JavaIoByteArrayInputStream(byteArray: byteArray) | |
let reader: JavaIoReader = JavaIoInputStreamReader(javaIoInputStream: stream, with: "UTF-8") | |
print("ready? \(reader.ready())") | |
while (reader.ready()) { | |
let byte = reader.read() | |
print(byte) | |
print("--") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment