Post

Replies

Boosts

Views

Activity

SCScreenshotManager puts artifacts in window title bar
Hello, Our macOS app (https://www.rewind.ai) takes periodic screenshots when it runs, and does so in the background without user intervention. Back on macOS 13 and earlier, we were using CGImage(windowListFromArrayScreenBounds:...) to do this. Now that there's a nice new way to do this in macOS 14 with ScreenCaptureKit's SCScreenshotManager, we tried moving to SCKit. Unfortunately, SCScreenshotManager displays purple icons in the title bars of all windows that it captures. For our purposes, this results in constant flickering icons in all window title bars while our app is running. I couldn't find a way to control this behavior. Am I missing something? Is it possible to use SCKit to take screenshots without showing these icons in window title bars? Thanks!
1
0
692
Jun ’23
Do iOS Safari ServiceWorkers get shut down due to thermal state?
Hi! I'm working on an iOS Safari extension that has a ServiceWorker. Lately we've noticed that this ServiceWorker seems to get killed seemingly at random, and there are no logs or crash reports to tell us what happened. I'm hypothesizing that iOS might be shutting down Safari ServiceWorkers when the ProcessInfo.thermalState approaches .serious. I have circumstantial evidence that our ServiceWorker tends to get killed more often at higher levels of thermalState but can't yet say conclusively that this is the case. I can't find any direct evidence of this on internet searches either. Is anyone able to shed light onto this topic? The specific symptoms are: ServiceWorker stops, and the menu entry for its console window no longer appears on macOS Safari. No crash logs via Xcode or Sentry, and no Console messages as far as we could tell (caveat: MobileSafari generates a LOT of messages! We might have missed it.) If attached via debugger, the native part of our extension just disappears and the debugger loses connection with no error message. ServiceWorker no longer works for the lifetime of the Safari process. Sometimes, when we kill Safari and restart, we can get the ServiceWorker back. This usually requires toggling our extension's "enabled" state in system settings. In some cases, even killing/relaunching Safari and toggling the system setting doesn't bring our ServiceWorker back. I'm hypothesizing right now that this happens when the thermal state is high. I've tried simulating a serious/critical thermal state in the Xcode Devices window, but couldn't repro the ServiceWorker problem. I don't know if that setting affects the whole system, though, or just our own apps. Help appreciated! Yuna
7
1
3.4k
Aug ’23