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

Post

Replies

Boosts

Views

Activity

LAContext not accepting programmatically changed user's password for authentication
I have used functionality of changing user's password programmatically using the OpenDirectory framework. Once the password is updated successfully, can be use this password for Login sessions and authentication wherever required. But the same password is failing authenticate with Local Authentication Framework that is with LAContext and prefers always older password. Even restarting machine won't work. Changing current user's password using below method - do { let node = try ODNode(session: ODSession.default(), type: ODNodeType(kODNodeTypeLocalNodes)) let user = try node.record(withRecordType: kODRecordTypeUsers, name: NSUserName(), attributes: nil) try user.changePassword(currentPassword, toPassword: newPassword) print("Password changed successfully") } catch var error { print(error) } Once password is updated, then trying to authenticate password with LAContext using, let context = LAContext() context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: "AuthenticationMessage".localized()) { success, error in DispatchQueue.main.async { completion(success, error) } print("authentication error = (String(describing: error?.localizedDescription))") } It won't accept the updated password. Any idea how to solve this problem?
2
0
254
May ’24
debug dlopen returning NULL
Hi, For the very same plugin dlopen() sometimes fails. The library is present but sometimes it returns NULL and sometimes a valid plugin handle. Here is the code: char *filename; void *plugin_so; filename = "/Applications/com.example.MyApp/Contents/Plugins/myplugin.dylib"; plugin_so = dlopen(filename, RTLD_NOW); I have debugged using lldb checked filename and it is present. The myplugin.dylib file supports 2 architectures, arm64 and x86_64. regards, Joël
1
0
349
May ’24
watchOS 10.5 Draining Battery
I updated Watch OS 10.5 (21T5571a) on May 1. However, the battery is draining quickly. My watch is an Ultra, and I fully charged it at 1 am. When I woke up at 8 am, the battery was at 79%. By 2:30 pm, the battery was only at 20%. I have not engaged in any activities today.
3
2
1.7k
May ’24
VisionOS Hand Skeleton Default Pose
Hi, Is there a known default pose for the hand skeleton for VisionOS? There's the HandSkeleton.neutralPose but the matrices are all identity. Is there a certain shape to it? ie in the WWDC Video https://developer.apple.com/videos/play/wwdc2023/10111/ They are using Astronaut gloves, but in what position were these modelled? Fingers forward with the thumb at 90 degrees etc?
1
0
211
Apr ’24
Watch OS 10.4 How to turn on developer mode
Watch model: A2985 Watch system: 10.4(21T216) Settings > Privacy can not find Developer Mode in Watch OS 10.4. xcode Recent device can not find this watch device.How do I turn on developer mode in Watch OS 10.4。Watch OS 9.5 can find and open it,but Watch OS 10.4 can not find。 I look forward to hearing from you soon.
2
0
315
May ’24
[iOS 17.4+]CoreNFC does not throw exception when no valid iso7816.select-identifiers found
From iOS 17.4, CoreNFC does not seem to be throwing any exception when there are no valid iso7816.select-identifiers found during polling for a NFCTagReaderSession. Instead, CoreNFC would continue with processing the tag with no initialSelectedAID. This is an intended behavior after updates to CoreNFC on iOS17.4? Or is this behavior a bug and not actually intended?
0
0
195
May ’24
How Immersive Video works ?
1.Does the Immersive Video still consist of a 2-way video? Is there depth information included? 2.Does Immersive Video uses MV-HEVC standard? 3.What is the difference between Immersive Video and Spatial Video? 4.Does Immersive Video currently support up to 180-degree 8K resolution? Will it expand to 360 degrees in the future? What's the resolution ceiling? 5.What are the requirements for third-party capture coding and packaging for Immersive Video? 6.Can you give me some video package materials for Immersive Video?
0
0
184
May ’24
Two functions of centralManager used
I am trying to code out a background refresh part of my app but there are two centralManager functions in the app. func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { if peripheral.identifier.uuidString == selected { selectedPeripheral = peripheral centralManager?.stopScan() centralManager?.connect(selectedPeripheral!, options: nil) } } func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) { print("Connected to peripheral: \(peripheral)") // Subscribe to disconnection events peripheral .publisher(for: \.state) .sink { [weak self] state in if state == .connected { self?.isConnected = true } else if state == .disconnected { // Peripheral is disconnected, send notification if self?.isConnected == true { self?.sendNotification() self?.isConnected = false } } } .store(in: &cancellables) } and this is the refresh part private func handleBluetoothMonitoring(task: BGAppRefreshTask, bluetoothMonitor: BluetoothMonitor) { let queue = DispatchQueue(label: "com.yourcompany.bluetoothmonitor") task.expirationHandler = { // Handle expiration of the task if needed } queue.async { // Perform Bluetooth monitoring tasks here if let centralManagerInstance = bluetoothMonitor.centralManager { DispatchQueue.main.async { bluetoothMonitor.centralManagerDidUpdateState(centralManagerInstance) } } else { print("Central manager is nil") } // End the task task.setTaskCompleted(success: true) } } Is there a way to solve this? Thanks!
1
0
222
May ’24
Issue with LaunchDaemon running bash showing up as unidentified developer
I have a couple of LaunchDaemon installed helper executables that are calling a bash script. As of MacOS 13, these are now showing up as unidentified developer in Login Items which I am trying to resolve. I have tried setting AssociateBundleIdentifiers in my plist file but the console tells me it is being ignored because bash does not have a Team Identifier. I believe the fully correct way to resolve this is to switch to the new Service Management API, but my understanding is that would only work on MacOS 13 and would therefore break my app on older versions of MacOS My questions are: is there any other way to make my helper as part of my app's login items that I have missed? is there an easy way to make an installer that will work for both newer and older versions of MacOS without having to package two separate versions? Sample plist file: <?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>AssociatedBundleIdentifiers</key> <array> <string>com.mycompany.ExampleApp</string> </array> <key>Label</key> <string>com.mycompany.ExampleApp.updater</string> <key>ProgramArguments</key> <array> <string>/bin/bash</string> <string>/var/root/Library/Group Containers/com.mycompany.ExampleApp/Library/Application Support/update.sh</string> </array> <key>StandardOutPath</key> <string>/var/root/Library/Group Containers/com.mycompany.ExampleApp/Library/update.log</string> <key>WorkingDirectory</key> <string>/var/root/Library/Group Containers/com.mycompany.ExampleApp/Library/Application Support/</string> <key>WatchPaths</key> <array> <string>/var/root/Library/Group Containers/com.mycompany.ExampleApp/Library/Application Support/latest.app.zip</string> </array> </dict> </plist>
1
0
240
May ’24
Cannot install VPN Logging profile
We are trying to diagnose an issue with our VPN network extension but have discovered that the VPN logging profile, available on the Apple Developer website is not valid: We have tried installing it on multiple phones, including the latest version of iOS 17 with no success so far. We would appreciate if the profile could be updated as soon as possible.
3
0
312
May ’24
Restarting my SSH ( forgot my pass )
Emiliss-MacBook-Air ~ % launchctl bootout Usage: launchctl bootout [service-path1, service-path2, ...] | emiliscy@Emiliss-MacBook-Air ~ % sudo launchctl unload /System/Libraly/LaunchDae mons/ssh.plist Unload failed: 5: Input/output error Try running launchctl bootout as root for richer errors. I don't understand what's happening please help me I can't connect github rep with visual studio.
0
0
200
May ’24
Apple Archive Progress
I've implemented Apple Archive in the app I'm working on and have implemented lzfse algorithm. The framework is extremely impressive in terms of the speed and compression ratios. I'm using the closure in ArchiveStream.writeDirectoryContents to indicate what the current file is being processed, but there doesn't seem to be a way to pull out progress % on each file. I've seen examples here [Accelerate].(https://developer.apple.com/documentation/accelerate/compressing_and_decompressing_files_with_stream_compression) but these aren't using the Apple Archive Framework... I'd really like to stick with the Apple Archive Framework if possible as it's simple and very fast.
3
0
258
May ’24
Getting metadata (identity) about an SMB volume's server
I like to find a way to identify network volumes, and whether they're run by certain servers, e.g. specifically whether they're on a Synology NAS. Reason is that Synology, while apparently supporting the Spotlight-over-SMB API, comes with a lot of bugs, requiring me to work around them when searching on those volumes with the macOS Spotlight API. I could, of course, ask the user to "configure" each mounted volume in my software, but I'd rather do this automagically, if possible, as it's less prone to user mistakes. So, my question is: Is there a way to learn a bit more about the server of a mounted network volume? E.g., if I could learn its IP address, I could try to connect to it via http protocol and then maybe get a useful response that identifies it as being from Synology. Or, alternatively, can I tell which SMB volumes are served by a Mac, so that I can at least assume that those handle Spotlight calls correctly, while I assume anything else is buggy (so far, AFAIK, Synology is the only other SMB server that supports Spotlight search). I've tried to find some data in the IORegistry, but that doesn't seem to store anything about network vols. The statfs function doesn't seem to give me anything for that either, nor do the various fcntl calls as far as I could tell. I also checked with the DA apis, e.g.: DASessionRef daSession = DASessionCreate (NULL); CFURLRef furl = CFURLCreateWithFileSystemPath(NULL, CFSTR("/Volumes/TheNAS"), kCFURLPOSIXPathStyle, true); DADiskRef daDisk = DADiskCreateFromVolumePath (NULL, daSession, furl); if (daDisk) { CFDictionaryRef daInfo = DADiskCopyDescription (daDisk); NSLog(@"%@", daInfo); } However, this only prints basic information: DAVolumeKind = smbfs; DAVolumeMountable = 1; DAVolumeName = TheNAS; DAVolumeNetwork = 1; DAVolumePath = "file:///Volumes/TheNAS/"; Where, then, does Finder's "Get Info" get the smb path from, for example?
8
0
936
Dec ’23
iPadOS not registering mouse position or move events to move pointer
For accessibility dev purposes, I am trying to move the iPadOS (17.4) pointer via virtual mouse and keyboard events generated via pynput. All keyboard keys, mouse click events, and scroll events are registered when relayed to the iPad and works as expected, except for mouse position and move events. Is this something iPadOS blocks specifically or is there a work around? Thanks in advance
0
0
321
May ’24
MacOS Finder Preview/Thumbnail Generation Limited to 20-21 Alpha Channels?
I am using the following shell script to return an image preview for use in FileMaker: qlmanage -t [sourcePath] -s 512 -o [outputPath] This usually works well, but it hangs if the RGB image (.tif, .psb, or .psd) has too many Alpha Channels ( >20 if on transparent background; >21 if flattened). This issue can be also be seen when looking at the image thumbnail or preview in the Finder. It appears MacOS won't create a thumbnail when the image has over 21 Alpha Channels... it just shows the default tif/psb/psd thumbnail, even if the image is very small. Environment MacOS Sonoma 14.4.1 Adobe Photoshop 2024 (25.6.0) Maximize PSD and PSB File Compatibility is enabled when saved from Photoshop Since I'm only able to upload a screenshot to this post, the original test files can be found in the Adobe Forum with the Title: "MacOS Finder Preview Limited to 20-21 Alpha Channels?"
1
0
250
May ’24
How to disable/disconnect ethernet adapter USB type using Network Framework API for Mac
I have tried networksetup -setnetworkserviceenabled "USB 10/100/1000 LAN" on networksetup -setnetworkserviceenabled "USB 10/100/1000 LAN" off and same with ifconfig cmd sudo ifconfig down sudo ifconfig up I am able to bounces the interfaces with these commands but the network connectivity is not restored properly for USB 10/100/1000 LAN interface May I know is there any other way we can achieve this programmatically using network framework API available for Mac
4
0
263
May ’24