Does Apple still use Creator Codes?
Core OS
RSS for tagExplore the core architecture of the operating system, including the kernel, memory management, and process scheduling.
Post
Replies
Boosts
Views
Activity
I am trying to run a program that queries a device connected to the USB-C connection on my iPad Air (IpadOS 17). Some IOKit calls work and some fail, with the error message
Sandbox: iOSNXLauncher(5338) deny(1) iokit-get-properties iokit-class:IOUSBHostDevice property:sessionID
or something similar. Which entitlement should I use to be able to execute the IOKit calls needed to see, for example, the Device ID and the Vendor ID? I would like to use the IOKit calls to communicate withUSB devices.
If IOKit doesn't allow USB device communication in iOS, does DriverKit have all of the capabilities to query USB attached devices and pass data back and forth? I am trying to port a program from MacOS to iOS. The MacOS software uses "libUSB" to interface to USB devices. I am trying to use a version compiled for iOS but Sandbox is stopping me (even when Xcode has the "Sandbox App" option set to NO.).
Am I missing entitlements or will this approach not work?
Gene
I found that the application can be launched in the background, but the launchOptions in application:didFinishLaunchingWithOptions: in AppDelegate is empty. I would like to know under what circumstances the application can be launched in the background, given that background fetch is not enabled.
Hello,
I am facing with misunderstanding how to read usb device properties correctly.
The notification 'kIOTerminatedNotification' is delivered after an IOService has been terminated. Can I use IORegistryEntryCreateCFProperties() to get properties of terminated device?
I am asking because I/O Registry is a dynamic database that captures the connections of all driver and nub objects currently active. Howerver, can we say that terminated device is still active?
If IORegistryEntryCreateCFProperties() can not be used, are there any other way? (e.g. using Device Interface)
Thank you in advance!
In the man page for the eslogger tool, there is a reference to the jq tool.
Postprocess the output in a shell pipeline with jq:
% sudo eslogger exec | jq -r 'select(.process.executable.path ==
"/bin/zsh")|"(.process.audit_token.pid): (.process.executable.path) -(.event.exec.target.executable.path)"'
The problem is that the jq tool is not installed by default with macOS.
[Q] Isn't the idea that the man page should only reference tools that are part of the standard macOS distribution (or can be downloaded and installed by the OS when you try to run them, like with some developer tools)?
Hello,
It seems like the Kernel Debug Kit for macOS 15.0.1 (24A348) is missing from the list of downloads at developer.apple.com. It would be great if you could add them to the list of available downloads.
When trying to rebuild the kernel it fails with the following error message:
Error Domain=KMErrorDomain Code=34 "Missing Developer Kit: As of macOS 13.0, you will need to install a KDK matching your build 24A348 to rebuild kernel collections." UserInfo={NSLocalizedDescription=Missing Developer Kit: As of macOS 13.0, you will need to install a KDK matching your build 24A348 to rebuild kernel collections.}
But my macOS version is 15.0.1. Is there a workaround for this?
Hello,
with macOS Sequoia I've observed a sudden, substantial surge in reports about the Mac App Store version of my app Yoink no longer accepting files dropped to it, with the following message being logged in Console.app:
08:16:05.516307+0200 Yoink ---Yoink Error--- Could not create NSURL bookmark for /Users/<redacted>/Downloads/<redacted>/<redacted>.txt
err: Error Domain=NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" UserInfo={NSDebugDescription=Failed to retrieve app-scope key}
The code line that causes this is the following:
NSData *bmData = [fileURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
includingResourceValuesForKeys:nil
relativeToURL:nil
error:&err];
Sometimes a relaunch of Yoink, or a restart of the Mac resolves the issue, but only temporarily. Other times, even a restart doesn't work, but running
tccutil reset All at.EternalStorms.Yoink
in Terminal and then restarting the Mac works (again, temporarily).
The trial version and Setapp versions of my app both work as expected, however.
I myself cannot reproduce this issue, so any pointers would be greatly appreciated.
(This might be considered a follow up to https://developer.apple.com/forums/thread/46583 , years back)
Thanks a ton,
– Matthias
Hello, experts!
During a VOIP call, the following happens:
device 1 makes a call to device 2
device 2 deliberately does not receive the call
some time passes, timeout is triggered and the call is terminated with CXCallEndedReason = remoteEnded, as evidenced by a line in the logs of the incoming call:
`[info] reportCallWasEnded callId=[***-***-***], reason=[CXCallEndedReason(rawValue: 2)].`
What is the reason why CXEndCallAction may be called from CXProviderDelegate even though the call was not manually terminated by clicking on the “End Call” button
In iOS 18 if a number is registered with CallKit to be blocked, then if that number is also in contacts, then the number isn't blocked.
If a user has added a number to their contacts, then in all probability they might not want the number blocked, so this might seem reasonable behaviour.
However the point is, this is new behaviour for CallKit in iOS 18, and its never been like this before going back several years to the very first release. Why suddenly change it now, after all these years, without notice nor documentation, and take away that option from the user, should for some reason, they want to block a number which is also in their contacts.
This is quite a disruptive change for apps using CallKit.
My team has an app that uses BTLE heavily, and has been doing so successfully, including no issues continuing to receive data in the background and updating things in the app (for recording workouts).
We have a BTLE write queue that only tries to write when the CBPeripheral.canSendWriteWithoutResponse property is true, or when we get the notification from the system in peripheralIsReady(toSendWriteWithoutResponse:). This is used as a means to rate limit data transfer, as we transfer files, as well as require that packets always arrive in the correct order due to blob encoding.
However, we had a new requirement come in to periodically write data out to a connected peripheral. I noticed that as soon as the app was in the background, despite other delegate callbacks coming in, like didRecieveUpdatedValue:, neither the property canSendWriteWithoutResponse nor the delegate callback were called any longer. This meant our write queue didn't think it had permission to write, and packets would just stack up. The failure to deliver these updates didn't occur immediately after backgrounding, but did within 2-5s of backgrounding.
If, when in the background, I ignore the changing of that property, and instead just write the data to the peripheral, it works!
Can anyone explain why, despite other CBPeripheral callbacks happening when in the background, this one does not?
Hi, we are trying to get or set the NFC UID when doing HCE CardSession emulation, but can't find any way to either get the chip UID used in a session, or set it beforehand.
Is that possible with a normal HCE CardSession eventStream received ADPU event?
Or is another framework/product needed for this?
We've done a Interoperability request (INTEROP-214), which lead us to using HCE.
Our usecase is specifically interacting with EV chargers, that only support using the chips UID for identification.
Can Apple Pay / Wallet be an alternative to do such low level handling?
So if one were to start the attempt of porting an existing kext VFS filesystem, to use the new FSKit (Since presumably kexts could go away), how would that look now?
Is it ready? Are there any samples out there that already works (Filesystem using FSKit) ?
How is the documentation? ChatGPT did not seem to know much at all.
What would be Apple's reception to that?
How flexible is FSKit ? Is it locked to the idea of a mount is connected to a physical device (or partition)? Or is it more virtual, in that I will have a pool of disks, and present 1, or many, mount points?
Previously, I used to have the below code to get workgroup / domain name of the active directory service provider.
SCDynamicStoreRef storeRef = SCDynamicStoreCreate(NULL, (CFStringRef)@"GetWorkgroup", NULL, NULL);
CFPropertyListRef global = SCDynamicStoreCopyValue (storeRef,CFSTR("State:/Network/Global/SMB"));
id workgroup = [(__bridge NSDictionary *)global valueForKey:@"Workgroup"];
On few Macs (probably starting from Sonoma), the workgroup property is not set. What is the alternative to get this information programatically?
After the macOS Sequoia update, my app seems to have an issue with Bluetooth communication between macOS and iOS that uses CoreBluetooth for Central-Peripheral communication.
Setup:
The iPhone (in my case: iPhone 14 Pro with iOS 18.0 (22A3354)) acts as the Central, and the Mac (in my case: 14" MacBook Pro 2023 with macOS 15.0 (24A335)) as the Peripheral.
I’ve implemented a mechanism where the Central (iPhone) sends a message to the Peripheral (Mac) every 15 seconds to keep the connection alive (Because it needs to wait for notify characteristic updates).
I never noticed this kind of issue before, but with macOS Sequoia I get it permanently.
Issue:
The connection drops unexpectedly after a period of time (sometimes 20 seconds, sometimes a few minutes) with CBErrorDomain - code 6: The connection has timed out unexpectedly.
Sample Code:
Peripheral (Mac):
ContentView (Peripheral).txt
ContentViewModel (Peripheral).txt
Central (iPhone):
ContentView (Central).txt
ContentViewModel (Central).txt
Reproduce:
I attached sample code including the Central-Sample (for iPhone) and Peripheral-Sample (for Mac).
Just run the Peripheral-Sample (after granting Bluetooth permissions).
Then run the Central-Sample and select the Mac device in the list
After selecting it should connect, discover the service & characteristic and should start writing messages to it.
After some time the func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: (any Error)?) {should get called with timed out unexpectedly error.
Could anyone please look into this issue and advise on whether there’s a known bug or any workaround? Any guidance would be greatly appreciated, as this impacts the stability of Bluetooth communication between the devices.
Thanks in advance.
Logs:
I also ran the console.app during this issue which got these errors (if this is helpful):
console_logs.txt
Documentation is sparse on this and it doesn't help that Apple's version differs from POSIX.
I know to specify ACL_TYPE_EXTENDED for acl_get_file() and know how to cycle through entries. From what I can tell, the tag is either ALLOW or DENY and you can check the permset for which actions the tag applies to.
I can't figure out how get the group or user the entry applies to. The only way I've been able to get this info is by using acl_to_text and scraping that output. Anyone know how to do this using the acl APIs?
Hi,
I'm building a Virtual Machine Manager on top of Hypervisor Framework and having a problem with hv_vcpu_run never return somehow. I tested the same code on Asahi Linux using KVM and everything are working correctly. I really have no idea what I'm doing wrong here.
How I setup a vCPU: https://github.com/obhq/obliteration/blob/main/gui/src/vmm/aarch64.rs
How I use the Hypervisor Framework: https://github.com/obhq/obliteration/blob/main/gui/src/vmm/hv/macos/cpu.rs#L402
Thanks in advance.
Hello,
Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior.
Issue Summary:
Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising.
The reverse setup or using non-iOS 18 devices works as expected.
Detailed Description:
I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup:
The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID.
Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background.
When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.)
In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly.
Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18.
I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18.
Thank you.
On the OS18 build in Xcode16 of my app, user is no longer asked for bluetooth permissions.
On the current market build, the user is asked for bluetooth permissions at startup along with Siri and notifications permissions. The siri and notification prompts still display, but not the Bluetooth.
I can't find any bluetooth permission related changes in hte release notes and nothing in the code or the info.plist has changed and "Privacy - Bluetooth Always Usage Description" is listed as expected.
I now get a "Allow "xxxz" to find devices on local networks?" But not the Bluetooth permission dialog.
Does anyone know why this is happening or how to fix it?
We recently started encountering a perplexing crash when we build our iOS application to device:
Termination Reason: DYLD 1 Library missing
Library not loaded: /usr/lib/libc++.1.dylib
Referenced from: <2A9D8B8D-E81E-3FEC-A4B7-1EA4841CFC4F> /Volumes/VOLUME/*/Walmart.app/Walmart
Reason: tried: '/usr/lib/libc++.1.dylib' (no such file), '/private/preboot/Cryptexes/OS/usr/lib/libc++.1.dylib' (no such file), '/usr/lib/libc++.1.dylib' (no such file, no dyld cache)
(terminated at launch; ignore backtrace)
Highlighted by Thread: 0
See attachment for full crash log.
We've been spinning our wheels trying to understand why this could be happening.
We've had the OTHER_LDFLAGS= -lc++ for some time now and we tried linking libc++.1.tbd to no avail.
Any help?
Walmart-2024-09-26-154332.ips
This code fails to decode when running on iOS 18.0 or 18.1 beta device. But succeeds below iOS 18, such as iOS 17.5.
Xcode Version 16.0 (16A242d)
let base64String = "1ZwoNohdE8Nteis/IXl1rg=="
if let decodedData = Data(base64Encoded: base64String, options: .ignoreUnknownCharacters) {
if let decodedString = String(data: decodedData, encoding: .ascii) {
print("Decoded string: \(decodedString)")
} else {
print("Failed to decode string using ascii encoding")
}
} else {
print("Failed to decode Base64 string")
}