Explore the core architecture of the operating system, including the kernel, memory management, and process scheduling.

Post

Replies

Boosts

Views

Activity

How to distribute a DriverKit extension to third parties developing on iOS
Hello, We're developing a framework that needs to talk to a camera on iOS. We've written a Driverkit Extension to enable this but we're having trouble working out how to distribute this to third parties. We have to specify the application's bundle id in the driverkit's bundle ID. But as far as I can tell that means if there are multiple consumers, they each need their own specially built driverkit extension. For MacOS, we can see an entitlement that allow any 'user client' to connect to our driverkit extension. But from what I can tell, that doesn't seem to be the same for iOS. Am I missing something? Or is it expected that we should have to build a new driverkit extension with a different bundle ID for every app that every third party wants to develop? Let me know if I'm missing too much context, thanks in advance!
2
0
346
May ’24
Hide global mouse cursor on macOS dock
I'm working on a macOS background app which hide mouse cursor for all apps. I use eventTap to listen keystroke, then call CGDisplayHideCursor and SetsCursorInBackground trick to hide cursor when specific key is down. It works on most case, except one - when mouse hover on dock. I'm not sure why mouse cursor can't be hidden when over dock, maybe some kind of elevated privilege? Is there a way to hide it? Thanks.
1
0
232
May ’24
Network Extension: broken behavior on iOS 16.4+ when setting NEVPNProtocol's `includeAllNetworks` flag.
I am seeing an interesting behavior on iOS 16.4+ when I set NEVPNProtocol includeAllNetworks flag to TRUE as part of my tunnels's saved preferences. After my packet tunnel provider starts up and goes through the usual setup of adding routes, where let's say we just just add NEIPv4Route.default() to route everything and eventually setting via: setTunnelNetworkSettings. Any subsequent calls to cancelTunnelWithError will cause the phone to get into a state where the tunnel provider goes away but it appears that my routes did not properly clean up, essentially causing a device to get into a state where all network traffic is now dead. The only way to recover is to go into OS Settings -> VPN and change selected profile to some other one, or just remove ours and go through installation again. It appears to only be happening on iOS 16.4+ devices, any previous versions clean up just fine. Curious if anyone has seen such behavior? Thanks in advance.
4
0
478
May ’23
tvOS 17 does not show the content of my text (.html) file
In my app I have the option to enable a help screen. This is a new view that simply shows a .html file. It works fine until tvOS 16.1 In tvOS 17.0 the screen is blank. Any ideas? This is how it looks in tvOS 16.1 This is tvOS 17.0 textView.backgroundColor = SKColor.white textView.isScrollEnabled = true textView.clipsToBounds = true textView.layer.cornerRadius = 20.0 textView.textColor = SKColor.black textView.isUserInteractionEnabled = true; textView.isScrollEnabled = true; textView.showsVerticalScrollIndicator = true; textView.bounces = true; textView.panGestureRecognizer.allowedTouchTypes = [NSNumber(value: UITouch.TouchType.indirect.rawValue)] if let htmlPath = Bundle.main.url(forResource: NSLocalizedString("manual", tableName: nil, comment: ""), withExtension: "html") { do { let attributedStringWithHtml:NSAttributedString = try NSAttributedString( url: htmlPath, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil ) self.textView.attributedText = attributedStringWithHtml } catch { print("Error loading text") } }
1
0
412
Sep ’23
Detecting sleep/wake event in IOS
In IOS, when the device is kept idle for some time, the screen turns off and the device enters sleep mode. It also enters sleep mode when we press the power button to turn the screen off. In my application, I wanted to detect If the device has entered/exited the sleep mode. I have followed the below links but some of these ways like observing 'Darwin notifications' is no longer allowed by apple. Other ways consider the device being locked as sleep mode, which is not precisely correct. Is there a way to correctly determine this? Please share the apple documentation links if this is possible. https://stackoverflow.com/questions/14191980/detect-screen-on-off-from-ios-service/14208787#14208787 https://nemecek.be/blog/104/checking-if-device-is-locked-or-sleeping-in-ios
2
1
484
Jan ’24
View count of open SecurityScoped Resources?
Hello, I'm trying to determine if my application is not releasing all security scoped resources and I'm curious if there's a way to view the count of all currently accessed URLs. I am balancing all startAccessingSecurityScopedResource calls that return true with a stopAccessingSecurityScopedResource, but sometimes my application is unresponsive when my mac wakes from sleep. Console logs indicate some Sandboxing issues. Unresponsiveness is resolved by a force-quit and restart of the application. I'd like to try and observe what's going on with the number of Security Scoped resources to get to the bottom of this. Is it possible?
2
0
277
May ’24
After upgrading to macOS 14.5, the FileProvider extension is constantly restarted by the system.
When upgrading to macOS 14.5, the FileProvider extension is consistently restarted by the system. This issue was not encountered with macOS 14.0, where the FileProvider extension typically remained uninterrupted. Additionally, I observed that when adding multiple domains using the same process, only one FileProvider extension would operate in 14.0, whereas in 14.5, a separate extension runs for each domain. I haven't found any release notes mentioning this change. Is this behavior intended? I also have filled a feedback FB13810567.
1
0
283
May ’24
Skip FileProvider folders without metadata
I want to traverse my local Google Drive folder to calculate the size of all the files on my drive. I'm not interested in files or directories that are not present locally. I use getattrlistbulk for traversing and it takes way too much time. I think it is because FileProvider tries to download metadata for the directories that are not yet materialised. Is there a way to skip non-materialised directories?
2
0
314
May ’24
Dualboot monterey/ventura, monterey part has wrong SystemVersion after Ventura update
My MBP 2019 with i9T2Chip was working with a DualBoot Monterey (on MacintoshHD) and Ventura (on other partition) and after installing the latest Ventura Update on that partition, the main Monterey Partition won't start up, and as a dive in shows, figures now with Sonoma 14.5 SystemVersion.plist I can't figure out what happened, 4 days ago I updated Monterey to 12.7.5, today I booted, read some news during breakfast and then switched partition to update the Ventura OS to it's latest update. After trying to switch back to monterey the monterey partition is in an endless boot-loop. It forwards a little then the screen flickers, the mouse appears, the boot bar jumps to the end and then black screen and later showing recovery asking for internet conection to verify the disk. Fortunately the Ventura Partition allows still to boot, so I started up, Diskutilities did not help, NVRAM reset, SMC reset, startup in diagnose mode, all with no result. I tried to reinstall Monterey over internet: preflight error 21, made a usb installer, chose monterey partition with error "Cannot downgrade"... That made me wonder: why downgrade? it's the same system version, but the startup disk menu indicated 14.5 for the monterey partition... So I deep dived into /System/Library/CoreServices/SystemVersion.plist and there it was the monterey SystemVersion became somehow Sonoma, even if sonoma is not installed, and was not installed nor installing... It was a clean reboot from Monterey into Sonoma. My only guess is that the Ventura update messed up something, but how and why???? no clue. Can anyone help me on how I could reset the systemVersion to Monterey so that I can make a clean install? I have a one month old TimeMachine Backup, and off course I could upgrade to sonoma, but I'd prefere to have Monterey or Ventura on that Partition, as the other one is for DAW compatibility tests... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>BuildID</key> <string>4805124E-0C37-11EF-BC27-82EAA8E0F66E</string> <key>ProductBuildVersion</key> <string>23F79</string> <key>ProductCopyright</key> <string>1983-2024 Apple Inc.</string> <key>ProductName</key> <string>macOS</string> <key>ProductUserVisibleVersion</key> <string>14.5</string> <key>ProductVersion</key> <string>14.5</string> <key>iOSSupportVersion</key> <string>17.5</string> </dict> </plist>
0
0
174
May ’24
Why macOS Sonoma doesn't delete /tmp files in app containers?
It looks like macOS Sonoma doesn't delete /tmp files in containers periodically or on reboot, like it does for system /tmp or $TMPDIR. Is it a bug or is it in on purpose? Our app didn't delete its temp files and some users have quite a few of them. We will make the fix so that we clear after ourselves in the future but should we delete temp files manually on start for existing users?
2
0
235
May ’24
Are suggested Play Media Intents no longer shown on lock screen?
Play media intents suggested via INUpcomingMediaManager.setSuggestedMediaIntents(_:) have been shown on the iOS lock screen in past iOS versions. In iOS 16/17 play media intents seem to be only shown within the Siri suggestions in the spotlight overlay and in the Siri suggestion widget. When the intents were shown on the lock screen, it was possible to open a preview via long press. Similar to notification previews. Preview support could be implemented with an Intents UI extension. Is there still any place in current iOS versions where play media intents are surfaced and a preview can be opened? In the spotlight overlay a long press has no effect.
0
0
242
May ’24
How to use CFMessagePort in a Sandbox App when App Group naming convention is not possible?
I am working on an App and I am in the process of adding Syphon support. Syphon uses CFMessagePort for IPC and passing of FrameBuffer data (MTLTexture) between apps - and is widely used in the professional video app and video production space. What I have noticed is that when the App is built as a Sandbox app, during the Syphon initialization, I see the following error message in the log: *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8703, name = 'info.v002.Syphon.D2499DBD-93AE-4CEA-B21F-FF356DCC069D' See /usr/include/servers/bootstrap_defs.h for the error codes. Syphon uses the "info.v002.Syphon.UUID" naming convention to identify IPC Syphon servers, so I don't think I can use the App Groups naming convention for Sandbox support. I have a very simple example app on github that publishes SpriteKit frames as a Syphon Server. To see the issue, simply enable App Sandbox for the build, and run the app. You should see the error message in the log and no data appears in any Syphon Client (I use Syphon Recorder for testing - available at syphon.github . io I am looking for other options to enable CFMessagePorts on a Sandbox App.
6
0
446
May ’24
Crontab commands are not permitted when sandbox enabled.
For scheduling purpose our Mac application using crontab terminal commands, which are working fine when sandbox is not enabled. For submitting the application to Appstore, we enabled the sandbox option and after that Crontab commands are not working. Getting the error messages as, /bin/sh: /usr/bin/crontab: Operation not permitted. Could you please guide us how to use the crontab commands when sandbox option enabled.
2
0
255
May ’24
1110 Error
So after multiple attempts over the course of a couple days. I was able to restore my girl friends iPhone. Like others the iPhone was stuck in a boot loop due to not having enough storage on the phone, which was false but anyway, Some tips I gathered after failed attempts is to make sure your laptop is updated to the most recent OS and has available storage of atleast 8.11 gb to use. next step once you get to finder only click restore. do not click update or it will not work. Once you click restore, it will prompt for the update and restore process to occur. After that you wait for everything to process and the phone should be restored/updated and you will be able to do an iCloud back up.
0
0
304
May ’24
Autofill verification codes from Mail
We're testing this new functionality with our app. One issue I've discovered is that because Gmail intentionally doesn't support push via the Mail app, sending codes to a Gmail email means users will likely never see this autofill. It does appear if you enter the Mail app, pull new messages, and then quickly switch back to the code entry in your app and present the keyboard. I'm basically looking for a behaviour correction here from Apple. Perhaps iOS should intercept notifications for the Gmail app (and other notable apps), or provide a way for devs to publish codes to a system API. As it stands, a large portion of our customers who use Gmail presumably will not be able to use this autofill feature.
0
0
214
May ’24
Nearby Interaction (UWB) Background problem
Hi, We try to geolocate with UWB signal an app in background with NXP UWB Kit. We use Nearby Interaction method in background Apple documentation indicate to use this class: NINearbyAccessoryConfiguration but we have this error when we try to create the session: NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_FAILURE_REASON any body can help us to use successfully this functionnality ?
0
0
237
May ’24
Performing a rotation transform on an already transformed entity in a RealityView
I'm trying to understand better how to 'navigate' around a large USD scene inside a RealityView in SwiftUI (itself in a volume on VisionOS). With a little trial and error I have been able to understand scale and translate transforms, and I can have the USD zoom to 'presets' of different scale and translation transforms. Separately I can also rotate an unscaled and untranslated USD, and have it rotate in place 90 degrees at a time to return to a rotation of 0 degrees. But if I try to combine the two activities, the rotation occurs around the center of the USD, not my zoomed location. Is there a session or sample code available that combines these activities? I think I would understand relatively quickly if I saw it in action. Thanks for any pointers available!
1
0
278
May ’24