Post

Replies

Boosts

Views

Activity

Reply to Table view with dynamic content - is it possible?
It's now possible in SwiftUI with TableColumnForEach [1] But don't use it. I tried and I got crashes when reloading data using Observable, I got crashes when changing columns. My app hung and needed killing when switching away from the table view and back. It crashes if there are zero columns. It's also really slow. Unusably so with about 200 rows and 150 columns. I tried with a release build and no difference was noticable. NSTable on the other hand handles everything admirably. [1] https://developer.apple.com/documentation/swiftui/tablecolumnforeach
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’25
Reply to Running local package's tests in main app's test plan
It does seem that if a local package can be edited, it should be testable too. My workaround is to use a custom behaviour in Xcode to run a script via a shortcut. (Xcode>behaviors>edit behaviors) I'm using osascript to display text using the following bash script which is totally AI generated (Gemini) #!/bin/bash # Create a temporary file temp_file=$(mktemp /tmp/swift_test_output.XXXXXX) # Run swift test and redirect output cd /Users/will/songket/FontUI swift test > "$temp_file" 2>&1 # Check the exit code of swift test. testResult=$? # Read the output from the temporary file output=$(cat "$temp_file") # Clean up the temporary file rm "$temp_file" # Format the output for display. if [[ "$testResult" -ne 0 ]]; then message="Swift tests failed:\n$output" else message="Swift tests completed:\n$output" fi # Display the output in a dialog box osascript -e "display dialog \"$message\"" exit $testResult`
Mar ’25
Reply to Table view with dynamic content - is it possible?
It's now possible in SwiftUI with TableColumnForEach [1] But don't use it. I tried and I got crashes when reloading data using Observable, I got crashes when changing columns. My app hung and needed killing when switching away from the table view and back. It crashes if there are zero columns. It's also really slow. Unusably so with about 200 rows and 150 columns. I tried with a release build and no difference was noticable. NSTable on the other hand handles everything admirably. [1] https://developer.apple.com/documentation/swiftui/tablecolumnforeach
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Running local package's tests in main app's test plan
It does seem that if a local package can be edited, it should be testable too. My workaround is to use a custom behaviour in Xcode to run a script via a shortcut. (Xcode>behaviors>edit behaviors) I'm using osascript to display text using the following bash script which is totally AI generated (Gemini) #!/bin/bash # Create a temporary file temp_file=$(mktemp /tmp/swift_test_output.XXXXXX) # Run swift test and redirect output cd /Users/will/songket/FontUI swift test > "$temp_file" 2>&1 # Check the exit code of swift test. testResult=$? # Read the output from the temporary file output=$(cat "$temp_file") # Clean up the temporary file rm "$temp_file" # Format the output for display. if [[ "$testResult" -ne 0 ]]; then message="Swift tests failed:\n$output" else message="Swift tests completed:\n$output" fi # Display the output in a dialog box osascript -e "display dialog \"$message\"" exit $testResult`
Replies
Boosts
Views
Activity
Mar ’25
Reply to Table TableColumn Metal failed to load render pipeline Failed to find reflection in binary archives
Having had exactly the same issue when using Table in SwiftUI: Metal failed to load render pipeline: pipeline=PLA88Xmw_A3Xghfc sdk=23A322 Failed to find reflection in binary archives I can confirm adding Metal.framework to "Frameworks, Libraries, and Embedded Content" fixes the issue on Xcode 15 & Sonoma.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23