Post

Replies

Boosts

Views

Activity

Simulators fail to download in Xcode
Recently simulators have not been able to be downloaded from Xcode, after endlessly trying the transfer rate was well below 100kb/s and would fail after a short while. The speed was on average 100x slower than other servers with the exception of a short spike of passable speeds. Because Xcode for some reason doesn't support resuming simulator downloads, I downloaded the simulators directly from the dvtdownloadableindex file using two different methods but the fileSize values consistently differed slightly from the downloaded files. This resulted in a Missing Signature error when adding the simulator with xcrun simctl runtime add.
1
0
1.7k
Jan ’23
HTML NSAttributedString technique that avoids Sonoma's TextKit issues
Basic HTML strings do not display correctly on macOS Sonoma, I am wondering if there is an alternative technique that can be utilized. There was a minor change in macOS 14.2, which fixed some cases but made others much worse. Consider the following code: override func viewDidLoad() { super.viewDidLoad() let html = """ <table width="100%" border="1" style="color: white"> <tr> <td align="left">Left</td> <td align="right">Right</td> </tr> </table> """ let data = Data(html.utf8) let definition = try! NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .characterEncoding: NSNumber(value: String.Encoding.utf8.rawValue)], documentAttributes: nil) let frameRect = NSRect(x: 100, y: 0, width: 300, height: 200) let textView = NSTextView(frame: frameRect) textView.textStorage?.setAttributedString(definition) textView.backgroundColor = .clear view.addSubview(textView) } On macOS 14 (23A5312d) it looks like this (FB13170237): On macOS 14.2 (23C64) it looks like this (FB13465833):
1
0
1.1k
Jan ’24
Simulators fail to download in Xcode
Recently simulators have not been able to be downloaded from Xcode, after endlessly trying the transfer rate was well below 100kb/s and would fail after a short while. The speed was on average 100x slower than other servers with the exception of a short spike of passable speeds. Because Xcode for some reason doesn't support resuming simulator downloads, I downloaded the simulators directly from the dvtdownloadableindex file using two different methods but the fileSize values consistently differed slightly from the downloaded files. This resulted in a Missing Signature error when adding the simulator with xcrun simctl runtime add.
Replies
1
Boosts
0
Views
1.7k
Activity
Jan ’23
HTML NSAttributedString technique that avoids Sonoma's TextKit issues
Basic HTML strings do not display correctly on macOS Sonoma, I am wondering if there is an alternative technique that can be utilized. There was a minor change in macOS 14.2, which fixed some cases but made others much worse. Consider the following code: override func viewDidLoad() { super.viewDidLoad() let html = """ <table width="100%" border="1" style="color: white"> <tr> <td align="left">Left</td> <td align="right">Right</td> </tr> </table> """ let data = Data(html.utf8) let definition = try! NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .characterEncoding: NSNumber(value: String.Encoding.utf8.rawValue)], documentAttributes: nil) let frameRect = NSRect(x: 100, y: 0, width: 300, height: 200) let textView = NSTextView(frame: frameRect) textView.textStorage?.setAttributedString(definition) textView.backgroundColor = .clear view.addSubview(textView) } On macOS 14 (23A5312d) it looks like this (FB13170237): On macOS 14.2 (23C64) it looks like this (FB13465833):
Replies
1
Boosts
0
Views
1.1k
Activity
Jan ’24