Post

Replies

Boosts

Views

Activity

NSScrollPocket overlay appearing on scroll views in NSSplitViewController on macOS Tahoe
I have an NSSplitViewController with three columns: sidebar full-height content view with NSScrollView/NSTableView detail view. There's no (visible) titlebar and no toolbar. This layout has worked fine for years, but in Tahoe an unwanted overlay (~30-50px high) appears at the top of any column containing a scroll view with table content. Xcode suggests it's an NSScrollPocket. My research suggests it... Only affects columns with NSScrollView Plain NSView columns are unaffected Overlay height varies (~50px or ~30px depending on how I mess with title / toolbar settings) Disabling titlebar/toolbar settings reduces but doesn't eliminate the overlay The overlay obscures content and there doesn't appear to be any API to control its visibility. Is this intended behavior, and if so, is there a way to disable it for applications that don't need this UI element? If it helps visualise the desired result, the app is https://indigostack.app Any guidance would be appreciated!
Topic: UI Frameworks SubTopic: AppKit
2
1
104
1w
Xcode 15 beta Command PhaseScriptExecution failed with a nonzero exit code
I have a Build Phase which runs a script. The script is a swift file, which I have simplified to illustrate the crash, like so: #!/usr/bin/env xcrun --sdk macosx swift import Foundation import CryptoKit var sha256 = SHA256() // Do other stuff... All the Xcode 15 betas fail to build my app, instead throwing the error: Command PhaseScriptExecution failed with a nonzero exit code. The logs: JIT session error: Symbols not found: [ _$s9CryptoKit6SHA256VMa, _$s9CryptoKit6SHA256VACycfC ] Failed to materialize symbols: { (main, { _$s20PropertyListModifier6sha2569CryptoKit6SHA256Vvp, _main, __swift_FORCE_LOAD_$_swiftDarwin_$_PropertyListModifier, __swift_FORCE_LOAD_$_swiftIOKit_$_PropertyListModifier, ___swift_project_value_buffer, __swift_FORCE_LOAD_$_swiftFoundation_$_PropertyListModifier, ___swift_allocate_value_buffer, __swift_FORCE_LOAD_$_swiftObjectiveC_$_PropertyListModifier, __swift_FORCE_LOAD_$_swiftXPC_$_PropertyListModifier, __swift_FORCE_LOAD_$_swiftCoreFoundation_$_PropertyListModifier, __swift_FORCE_LOAD_$_swiftDispatch_$_PropertyListModifier }) } Does anyone know of a work-around or solution, or does this just look like nothing more than a bug in the betas, which I should "wait out"? It's had the same problem right from beta 1 to the current beta 5 so it's starting to look like it won't be fixed which is worrying me.
4
0
7.4k
Jul ’23
Can I use NWConnection to monitor for server availability?
I want my app to react when it sees that a certain port is being listened to, and likewise when it stops being listened to. Specifically, another app will start a gdb server (at 127.0.0.1 on 9003) and I want mine to detect that. I don't really even care that it's a gdb server, just when the port is in use or not. I can do it right now using polling using a variation of this but that's not great for CPU wakes. I'm wondering if I can use an NWConnection (with no timeout) to monitor for these events (port in use, port no longer in use). If so, any pointers would be very gratefully received :) Even if just to say I'm barking up the wrong tree!
2
0
902
Jun ’22
Failed to resolve dependencies: incompatible tools version
I'm using Xcode 12.4 on Catalina (for testing purposes). My app uses some SPM packages (eg Blessed) which specify // swift-tools-version:5.5. Am I correct believing Xcode 12.4 can be made to compile these packages by downloading and installing a later Swift? This is what I've tried: downloaded and installed Swift 5.6.1 from https://www.swift.org/download/ selected the new Swift in Xcode > Toolchains > Swift 5.6.1 confirmed it in Xcode's preferences > Components > Toolchains attempted to resolve my package versions: Xcode File menu > Swift Packages > Resolve Package Versions Unfortunately this results in an error: "Failed to resolve dependencies" "because every version of Blessed contains incompatible tools version and root depends on Blessed 0.3.0..<1.0.0, version solving failed." I'm left wondering, is "Toolchain" something different than "Tools"? My Xcode's "Command Line Tools" is still "Xcode 12.4" (the only option).
0
0
2.0k
Apr ’22
Trying to show sheet on first app launch
I would like to show a welcome sheet when my app first launches. Starting with a blank Xcode project, I've set up a WelcomeStoryboard how I want it. I can show it as a sheet using a button click, calling this in my ViewController: func showWelcome() { let welcomeStoryboard = NSStoryboard(name: "WelcomeStoryboard", bundle: nil) guard let welcomeViewController = (welcomeStoryboard.instantiateInitialController() as? NSWindowController)?.contentViewController else { return } self.presentAsSheet(welcomeViewController) } However, I am finding it hard to see where I can call that so it will show the sheet when the window first loads. Inside viewDidLoad is too soon, it seems: Assertion failure in -[NSViewControllerSheetTransition animatePresentationOfViewController:fromViewController:], NSViewControllerSheetTransition.m:33 Failed to set (contentViewController) user defined inspected property on (NSWindow): self.fromViewController.view.window should be valid! I noticed that if I wrap presentAsSheet inside DispatchQueue.main.async it works! But I don't understand why that would work, and am reluctant to trust it. I'm hoping someone can shed some light on this for me? It feels like a trivial requirement but I'm stuck on it!
Topic: UI Frameworks SubTopic: AppKit Tags:
3
0
1.2k
Apr ’22