Anyone use https://github.com/tuist/tuist in lieu of a native .xcodeproj? I mainly ask because git merge flows are painful with the latter format. Too many conflicts that result from irrelevant internals.
@el_gaucho If you like to create/use the backend in C and #ObjC (use @objfw), then you will be able to use #ObjC for the frontend. Either using #AppKit #UIKit on Apple devices or using #ObjGTK on other Posix devices as soon as I manage to complete it. As long you may want to look at @vala_lang which provides C bindings for many #FLOSS libraries and more if you create VAPIs yourself.
#objc #appkit #uikit #objgtk #floss
anyone have a good way of subscribing to the changing of the dark / light theme in #macOS using #ObjectiveC or #AppKit, but in a background thread?
i am running out of options š
#macos #ObjectiveC #appkit #rust
Anyway, filed as FB12602377. With a sample project.
(Iām not _that_ experienced with #AppKit, so I may also be misunderstanding something.)
Is there some Apple HIG guidance on choosing colors based on ādistanceā (contrast-ish)? Something like
```swift
static let palette = [NSColor.systemOrange,
NSColor.systemBlue,
NSColor.systemYellow,
NSColor.systemMint,
[..]
```
(A bit surprisingly, Finderās default Tag colors seemā¦Ā poorly chosen in that regard?)
More specialized #AppKit NSButton bezel types are finally being added to #SwiftUI :)
Help button: https://developer.apple.com/documentation/swiftui/helplink
Recessed (scope) button: https://developer.apple.com/documentation/swiftui/primitivebuttonstyle/accessorybar
RoundRect button: https://developer.apple.com/documentation/swiftui/primitivebuttonstyle/accessorybaraction
#WWDC23 #MacDev
#appkit #swiftui #wwdc23 #macdev
I wasted 5 hours trying to figure out an #AppKit/#CoreData crash in a macOS High Sierra VM.
I eventually tracked it down to it refusing to load a resource, but was still in the entirely wrong rabbit hole trying to figure out why.
It had nothing to do with High Sierra. Or Core Data. Or the resource being in a framework bundle.
No, it was because I was opening the app from an SMB volume, which apparently silently refuses to load some resources.
š
One of the best things about #AppKit (over #macCatalyst): keyboard navigation comes for free (if you implement things correctly) unlike UIKit which requires me to handle a gazllion things before it can even do half of it correctly
I made a little extension method for getting an `NSFont` with a specific `weight` that uses an approximation of the `systemFont`ās new `weight` behavior. So you can do:
var regularFont: NSFont
let sameFontButBolder = regularFont.withWeight(weight: .semibold)
Found that someone else on Stack Overflow seemed to have a similar problem, so I posted my code there: https://stackoverflow.com/a/76143011/1600
I was curious if that bottom window toolbar that was used in some Mac system apps a few versions back is still a thing. So, apparently this is "setContentBorderThickness" and it still works on Monterey.
The problem: it was mentioned in the HIG as discouraged already in 2011 š #AppKit #MacDev
In a view-based #NSTableView, how do I draw with the same color as text fields? I tried `cellView.textField?.textColor?.cgColor`, but that gives me the default text color, which is wrong when a row is highlighted. (It does, however, seem to work correctly with dark mode.)
I find many results for setting (overriding) the text color, but notā¦Ā getting it in the first place.
Am I supposed to check myself if a row is selected?
Iām observing something from NSNotificationCenter. How do I rewrite this to allow for async/await?
I see that you can await `NotificationCenter.default.notifications`, but I donāt want to await the _subscription_, but rather the _notification_. Basically, something like:
```swift
@objc
func didBecomeKey(notification: AppKit.Notification) async {}
```
Localizing hundreds of strings is an important lesson to have done this along the way. šµāš«#Swift #AppKit #StellarForReddit
#swift #appkit #stellarforreddit
Anyone know of a good open source example or writeup of how to build a standard-looking macOS Preferences window using SwiftUI? As a SwiftUI newbie, Iām not sure where to start.
Note: Iād like to find a way to build it myself without using the (admittedly great) Preferences library from Sindre Sorhus. https://github.com/sindresorhus/Preferences
cc @marioguzman
Is it just me, or have the last couple of versions of #macOS introduced a change where switching back to an app (using ā-tab) results in no window having focus/being active?
No keyboard commands can then work until you actively click on (or ā-~ to) a window.
This includes the Finder in cases where there are 2 or 3 open windows, & apps that are primarily single-window apps. #Catalyst vs #AppKit issue?
Iāve been a Mac user since 1991; this feels recent. (Or maybe Iām just losing my mind.)