Post

Replies

Boosts

Views

Activity

Prevent menu bar autohide when using ".menuBarExtraStyle(.window)"
If the user has "Automatically hide and show the menu bar" set to "Always" in macOS settings, when using the .menuBarExtraStyle(.window) modifier the menu bar hides when the user moves the mouse to the menu. I'm trying to prevent this from happening. This doesn't occur with .menuBarExtraStyle(.menu). To try to prevent this I am removing .autoHideMenuBar from NSApplication.shared.presentationOptions but it is ignored and the menu bar hides anyway. I've tried this in applicationDidFinishLaunching, the init() method of the App struct, and also in .onHover for the menu's view. I'm testing with macOS 14.5. Here is a minimal example to reproduce the issue: import SwiftUI @main struct UtilityApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { MenuBarExtra("Utility App", systemImage: "hammer") { Text("Hello world") Button("Quit") { NSApp.terminate(nil) } } .menuBarExtraStyle(.window) } } class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ notification: Notification) { var options = NSApplication.shared.presentationOptions options.remove(.autoHideMenuBar) NSApplication.shared.presentationOptions = options } }
0
0
192
Aug ’24
App not appearing in Full Disk Access list
The presenter in this WWDC session from 2019 (https://asciiwwdc.com/2019/sessions/701) states: "So, now in macOS Catalina, executables that are denied access to files due to a lack of Full Disk Access approval are now prepopulated unchecked." I'm unable to make this work. Included is a minimal test app that tries to access a resource that would require Full Disk Access (FDA) and then opens Privacy & Security ... FDA in settings. When I run this from Xcode or manually run the app from Finder the test app does not appear in the list of apps in FDA. If I manually drag and drop the app from the build folder into the FDA window and enable it then the app is granted FDA access successfully. To be clear I understand that even the app is automatically populated in the FDA list the user will still need to toggle the switch to enable it. But I'd like to avoid making the user hunt down the app manually add it. Testing on macOS Sonoma 14.5. Xcode 15.4. Link to project file: https://akiairzavu3i3x4dmaya-public.s3.amazonaws.com/FDA+test.zip
2
0
540
Jun ’24
Configuring Shared iPad
I'm looking to play around with the Shared iPad feature for application testing. I see that the Profile Manager in in OS X Server 5.1 provides Support for Shared iPad. However I'm not seeing where that would be enabled, nor am I able to find any documentation detailing the configuration. I also tried using Apple Conifigurator, and I don't see a checkbox for "Enable Shared iPad" (see this thread). Has anyone gotten this working? Is this feature only something that is available if you are an educational customer (which this note seems to allude to)?
3
0
879
Sep ’16