My UIKit/Mac Catalyst app supports a user opening multiple windows (multiple scenes). One of these is a special scene that shows content that I want to appear in front of all other app windows/scenes, even while the user is interacting with one of the app's other scenes. I do not need this special scene to stay in front of the windows of other apps, just in front of the windows of my own app.
While I'm not 100% sure, it seems that AppKit supports this through the NSWindow level property. I can't find any equivalent feature in UIKit/Mac Catalyst. UIWindow windowLevel is not the same thing since that only affects the order of windows within a given scene. I need an entire scene (and its windows) to stay in front of my app's other scenes (and their windows).
I don't see anything relevant in UIWindow, UIScene, UIWindowScene, UISceneSession, UIScene.ActivationRequestOptions, or UIWindowScene.ActivationRequestOptions.
Posts under macOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I'm trying to setup a AVAudioEngine for USB Audio recording and monitoring playthrough.
As soon as I try to setup playthough I get an error in the console: AVAEInternal.h:83 required condition is false: [AVAudioEngineGraph.mm:1361:Initialize: (IsFormatSampleRateAndChannelCountValid(outputHWFormat))]
Any ideas how to fix it?
// Input-Device setzen
try? setupInputDevice(deviceID: inputDevice)
let input = audioEngine.inputNode
// Stereo-Format erzwingen
let inputHWFormat = input.inputFormat(forBus: 0)
let stereoFormat = AVAudioFormat(commonFormat: inputHWFormat.commonFormat, sampleRate: inputHWFormat.sampleRate, channels: 2, interleaved: inputHWFormat.isInterleaved)
guard let format = stereoFormat else {
throw AudioError.deviceSetupFailed(-1)
}
print("Input format: \(inputHWFormat)")
print("Forced stereo format: \(format)")
audioEngine.attach(monitorMixer)
audioEngine.connect(input, to: monitorMixer, format: format)
// MonitorMixer -> MainMixer (Output)
// Problem here, format: format also breaks.
audioEngine.connect(monitorMixer, to: audioEngine.mainMixerNode, format: nil)
Hi,
I am currently developing a document-based application with additional WindowGroup for macOS and have encountered a challenge related to document container management. Specifically, I need to open a windowGroup that shares the same container as the one used in the DocumentGroup. However, my current approach of using a global shared model container has led to unintended behavior: any new document created is linked to existing ones, and changes made in one document are reflected across all documents.
To address this issue, I am looking for a solution that allows each newly created document to be individualized while still sharing the document container with all relevant WindowGroups that require access to the data it holds. I would greatly appreciate any insights or recommendations you might have on how to achieve this.
struct Todo: App {
var body: some Scene {
DocumentGroup(editing: Item.self, contentType: .item) {
ContentView()
}
WindowGroup(for: Item.self) { $item in
ItemView(item:$item)
.modelContainer(Of DocumentGroup above)
}
}
}
Thank you for your time and assistance.
Best regards,
After updating to MacOS 26.1 I encountered an issue that Roblox tends to freeze quite often for 10 - 60 seconds at most, this is really annoying that it is doing this as i play the game a lot. My theory is that it is like a driver issue with metal or something, I have reinstalled MacOS, reinstalled the game and lowed the performance manually but nothing is working.
Wondering if you could help, when it will be fixed and if others are having the same issue.
Many thanks, William.
Is anyone else using one of the "Dark" editor themes (such as "Default (Dark)" or "Classic (Dark)" in Xcode? And is anyone doing this with Xcode 26 on macOS 26?
Here's the result while using the "Default (Dark)" theme while my Mac is in "light" mode:
Note that the black background of the editor goes all the way to the far left edge of the Xcode window. The large gray area in the project tree is the black background bleeding through the sidebar.
This is really distracting. Is there a way to fix this (besides not using a dark theme - I've been using dark themes for over 30 years)? This appears to be a poor design decision in macOS 26 to have split views show the background of the secondary column behind the primary column. iPadOS 26 has the same issue (see https://developer.apple.com/forums/thread/800073).
I've been trying to add a CoreSpotlight indexer to my macOS application. The new template for the indexer uses the new appex CSImportExtension style importer.
I've been following this ->
https://developer.apple.com/documentation/corespotlight/csimportextension
I changed the CSSupportedContentTypes in the Info.plist file to the correct file type uti.
I added a dummy value into the attributes (see code below) - just setting contentDescription to 'noodle' (easy to search for)
class ImportExtension: CSImportExtension {
override func update(_ attributes: CSSearchableItemAttributeSet, forFileAt: URL) throws {
// Add a dummy value, and see whether spotlight finds it
attributes.contentDescription = "noodle"
}
}
I have a number of files on disk that match the uti (and can be found when I search by the file name)
Yet, when I build and run my app, the a spotlight search for 'noodle' finds no results.
Can anyone give me any advice? I cannot find any indication that the ImportExtension is called (although when I put a log message at the start of the update() call there's no message in the console which seems to suggest it's not being called).
Is there any way of debugging this?
Cheers and thanks -- Darren.
Hi,
I am looking for comprehensive "controls" documentation for SwiftUI.
When searching on the Apple site, I have not seen any documentation that shows a picture of a control and an explantation of what it does, for all the available controls.
I have also searched the web for such documentation, and have not found any.
When I was learning Rust, I came across a beautiful document about GTK3 (PDF) that had a complete list of controls, including pictures. If something looked interesting I could do a search for more details.
Thanks, Jim
Is there a way to configure the style and toolbar of the macOS window that Xcode uses in #Preview?
I am working on a macOS application and want to preview some SwiftUI views within different window styles, toolbar styles and window title/subtitle visibilities.
Some of the modifiers to control the look-and-feel of a window are actually Scene Modifiers, not View Modifiers:
.windowStyle
.windowToolbarLabelStyle
.windowToolbarStyle
But #Preview does not accept Scenes, so I can't apply these modifiers:
// Error, not a view modifier.
#Preview {
ContentView()
.windowStyle(...)
}
// Error, Window is not supported in #Preview.
#Preview {
Window("Browser", id: "browser") {
ContentView()
}
}
If I give my ContentView a .toolbar(...), Xcode's Preview will correctly show a window with a toolbar, but not necessarily in the style I want.
Is there a way to apply the Scene Modifiers to #Preview so that I can see how they affect the window's chrome and toolbar?
I am facing an issue while codesigning the Content/MacOS executable. The executable name is exactly similar to the .app file, and the signing certificates have not expired yet.
Steps followed to generate signed files:
Executed codesign on files within the .app folder.
Then executed codesign on the .app folder.
Tried to notarize with the new notarization tool.
Do we have to sign each individual file and folder?
Observations:
.DS_Store files were removed from the .app before signing.
Another app with the same certificate is able to sign correctly.
Content/MacOS contains multiple files, including the app executable. These files are signed except the main executable.
same installed_app after copying at another location showing signed.
Getting:
App Sandbox-Not enabled
Hardening-Enabled - Version 10.9.0
Notarization-Granted
Gatekeeper-Can't evaluate
Signed By- Can't verify signature
Hello Team,
We are currently experiencing an issue where some of our devices are not receiving push notifications. We are sending notifications via the Apple Push Notification portal (https://developer.apple.com/notifications/push-notifications-console/) using the following two requests. However, in both cases, the notifications are not being delivered to the devices.
Scenario 1 :
When we send a request with apns-push-type set to alert, we receive the following error.
Request :
curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: alert"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/*devicetoken*
Response:
{
"code": 400,
"message": "bad-request",
"reason": "The device token is inactive for the specified topic. There is no need to send further pushes to the same device token, unless your application retrieves the same device token.",
"requestUuid": "c4ae39b4-87e1-4269-a1e9-163f60ec0385"
}
Scenario 2 :
However, if we send the request with apns-push-type set to background, the request is processed successfully by APNs, but no notification is received on the device.
Request :
curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: background"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/*devicetoken*
Response:
Getting a message that The notification sent successfully but no notification is received on the device.
In both cases (with alert and background push types), the push notification does not reach the device.
Additionally, when we validated the device token using the APNs Device Token Validator, it appears to be valid and returns the following message.
"Device Token is valid for sending Alert & Background push-type notifications in the Production environment"
Affected Device:
macOS version : MacOS 15.3.1
Processor : Apple M1
Could you please assist me in resolving this issue?
Thanks
In the online documentation for InstallerJS, it is stated that the unit for the availableKilobytes property of the target field is kilobytes.
Isn't it actually bytes because of a bug in the very first release of macOS that supported InstallerJS?
[Q] Has there been a fix in the recent years regarding this property that would explain why the documentation says it's kilobytes? Even though at the time of this writing, the unit is still bytes when you call my.target.availableKilobytes
I'm using this call to dump the value of this property in install.log:
system.log(my.target.availableKilobytes + '');
Ref. https://developer.apple.com/documentation/installer_js/target/1811975-availablekilobytes
(FB20448952)
Hey,
Just recently I realized something I have been overlooking in my build pipelines.
I thought that by adding the the "hardened runtime", I disable 3rd-party library injection (I do not have the disable-library-validation entitlement added).
However, I was using some checks on my code and I noticed that the "library validation" code signature check fails on my applications (e.g. adding the .libraryValidation requirement via the LightweightCodeRequirements framework) - with codesign -dvvvv /path/to/app I can check it doesn't have the CS_REQUIRE_LV flag:
[...]
CodeDirectory v=20500 size=937 flags=0x10000(runtime) hashes=18+7 location=embedded
[...]
then I used in Xcode the "Other Code Signing Flags" setting and added the -o library option, which added the flag:
[...]
CodeDirectory v=20500 size=937 flags=0x12000(library-validation,runtime) hashes=18+7 location=embedded
[...]
Is this flag something I should be explicitly setting? Because I was under the impression enabling hardened runtime would be enough. Popular Developer ID distributed applications (e.g. Google Chrome, Parallels Desktop, Slack) all have this flag set.
Hi,
I am facing a very weird issue where I am unable to download our own application from TestFlight for testing.
This issue only happens for one of our applications; we are able to download our other applications without any issues.
Furthermore, this only happens on one of our MacBooks; the game downloads fine on our other MacBook (macOS 15) and can run our application.
When running the console, I noticed this error being thrown when the TestFlight fails the download:
I have tried reinstalling TestFlight, clearing all instances of our application as what Finder can find, restarting the MacBook but nothing worked.
Is there anyone that faced this similar issue, or any Apple staff that could help with this?
OS version: macOS Tahoe (26 Beta) latest
TestFlight was able to download on this version previously, until one day it couldn't (and not sure why), tried downloading latest version but did not solve the issue.
Note: We noticed that we are unable to install our own application from the Appstore as well, on this MacBook that has the TestFlight issue.
Hey I’m working on a macOS app that wants to detect the MacBook lid / hinge angle (i.e. how far the screen is open) by directly reading the internal sensor via HID / IOKit (a private / undocumented API). I came across this project: LidAngleSensor —
GitHub: https://github.com/samhenrigold/LidAngleSensor?tab=readme-ov-file
Before investing too much effort, I’d like to ask the community:
Has anyone succeeded in getting such an app accepted on the Mac App Store when it includes sensor-level, private API access like this?
What were the reviewer feedback or rejection reasons (if any)?
Are there documented cases (positive or negative) where Apple approved or rejected apps for accessing non-public hardware sensors?
What’s the risk of getting banned or permanently rejected for integrating this kind of functionality?
If you have direct experience (whether it passed or failed), I’d love to hear your stories, strategies, or pointers. Thanks in advance!
Hi,
I have been using external NVMe disk since March 2025 with my Mac M1 1TB until recently couple of days agao I updated Mac OS to Tahoe from Sequpoia 15.6. Now Mac OS Tahoe is disconnecting my NVMe automatically saying please eject the disc before disconnecting and suddenly after an hour it reconnects.
Right now I have reinstall Mac OS Sequoia and My external NVMe disk is working again.
This post is for Mac OS developers to check for APFS drivers on Mac Tahoe as they are messing up with external NVMe SSD. I dont know about others brand of NVMe I am using Transcend inclosure with transcend NVMe 2TB SSD hard disk.
Kindly please check as its not NVMe issue its and OS issue. If it was NVMe issue my SSD should also not work with Sequoia but as it is working with Sequoia so it has to be something with Tahoe OS.
Kindly review your code about APFS drivers or thunderbold USB C drivers or may be something else linked to APFS file system.
I hope this post reaches you and you guys can consider it as help ful.
Kind regards
I am coming from C#, where Forms and Controls are placed similar to Swift Storyboards. I have been trying to learn Storyboards, but keep running across tutorials regarding SwiftUI, and Storyboard examples are few. So the question becomes, "how do I position controls on a Form using SwiftUI?" See the example below.
I have run across many videos that use either horizontal or vertical positioning of controls, but these examples are usually very simple, with items occupying only the center portion of the screen. I get stuck on examples that are more complicated.
The example below only shows the controls for the upper part of a Form, with some type of textbox (Viewform) below making up the rest of the Form.
How does one make more complicated placement of controls with SwiftUI?
When I tried turning on ENABLE_ENHANCED_SECURITY = YES in an Xcode 26.1 beta project, I got a bunch of "module file not found" errors like this:
While building module 'CoreServices':
In file included from <module-includes>:1:
/Applications/Xcode26.1-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:2: fatal error: module file '/Volumes/Work/Xcode-derived/PlainCalc3-gixjfymjqamwmufdwcseugzjehqa/Build/Intermediates.noindex/ExplicitPrecompiledModules/CoreFoundation-5POB3HW0BHFSPWLD7DOOKAULM.pcm' not found: module file not found
19 | #include <CoreFoundation/CoreFoundation.h>
| ^
I tried deleting the project's derived data.
Is this a known issue?
Hi! I am adding MacOS to a SwiftUI based multiplatform app in XCode, and have noticed an effect on the OTF font I am using. When started for a MacOSX target, the font looks a bit fuzzy, or too bold for the same display:
Above is the display running in an iPhone 13 mini simulator, below the macOS version running for the "My Mac" target.
The font is in both cases just fetched with
static let tkDisplayFont = Font.custom("Segment7Standard", size: 38)
Same applies in dark mode:
This makes the numbers and especially the decimal point a bit harder to read. The same happens with the system font, but it is not such a problem there:
I guess this is handled a bit differently between UIFont and NSFont underneath. Is there a way to tell the font to behave the same way as on iOS?
I have some working Objective-C code that displays a WKWebView and allows printing that content. However, it uses the method -[WKWebView printOperationWithPrintInfo:], which the documentation says is deprecated as of macOS 10.15. However, it doesn't say why this method is deprecated, or what the recommended replacement is. The declaration in WKWebView.h does not even indicate that the method is deprecated. But as an alternative, I tried using +[NSPrintOperation printOperationWithView:printInfo]. Doing it that way just prints a blank page. So, should I keep doing it the doubtful way?
Hi Team,
We are trying to understand deep sleep behaviour, can you please help us clarifying on the below questions:
When will we configure Hibernate 25, is it valid for M series MacBooks?
Is Hibernate 25 called deep sleep mode?
What are the settings I need to do on Mac, to make my Mac go in to deep sleep?
When awakening from deep sleep , what would be macOS system behaviour?
If we have custom SFAuthorization plug in at system.login.screensaver, what would be the behaviour with deep sleep?