4 ms·
I've been dogfooding the iPad layout of Element X under macOS on Apple Silicon since day 1 - it works pretty well. We could also ship it via Catalyst to run as
by Arathorn 4y ago
I've been dogfooding the iPad layout of Element X under macOS on Apple Silicon since day 1 - it works pretty well. We could also ship it via Catalyst to run as a pure macOS app (albeit with the iPad layout) on both Apple Silicon and Intel, once https://github.com/rust-lang/rust/issues/106021 https://github.com/rust-lang/rust/issues/106021 is fixed.
Unfortunately making it a "real" macOS app is much harder, as the UI is currently uses UIKit in a bunch of places to make up for feature and performance limitations in SwiftUI. These would have to be ported over to AppKit to run on macOS. I had a go at it over the holidays, but it's not trivial - perhaps someone with more AppKit skills than I could make it work (or maintain a fork) though.
To give an idea of the amount of UIKit that would need to be swapped out:
matthew@shadowfax ElementX % find . -name \*.swift | xargs perl -ne 'while (/[^a-zA-Z](UI[A-Z].*?)[^a-zA-Z]/g) { print "$1\n" }' | grep -v UITest | sort | uniq -c | sort -rn
52 UIKit
31 UIImage
20 UIApplication
13 UIScrollView
12 UITextView
11 UIDevice
11 UIConstants
10 UIColor
5 UIViewController
5 UIRectCorner
5 UIKitBackgroundTask
5 UIKeyCommand
4 UIView
4 UIPasteboard
4 UIBackgroundTaskIdentifier
3 UIViewControllerRepresentable
3 UITableView
3 UIScreen
3 UINavigationController
3 UIKitBackgroundTaskService
3 UIFont
3 UIActivityViewControllerWrapper
3 UIActivityViewController
2 UIViewRepresentableContext
2 UIViewControllerRepresentableContext
2 UITextViewWrapper
2 UITableViewDelegate
2 UIResponder
2 UIHostingController
2 UICollectionView
1 UIViewType
1 UIViewRepresentable
1 UITraitCollection
1 UITextViewDelegate
1 UITableViewDiffableDataSource
1 UITableViewController
1 UITableViewCell
1 UIScrollViewDelegate
1 UIKitAttributes
1 UIHostingConfiguration
1 UIContentSizeCategory
1 UIBezierPath
1 UIApplicationDelegateAdaptor
1 UIApplicationDelegate
1 UIActivity
- Klonoar 4y agoHonestly the iPad layout is probably "good enough" - though I agree that a macOS-AppKit-backed variant would be incredible. I've got a lot of experience with AppKit and may be down to look at doing that fork once the churn on Element X is lower...