I'm writing some code, intended to be run on macOS (not IOS). My code could greatly benefit from using IOReport, which is an undocumented IOKit API for obtaining various metrics like energy consumption on an Apple processor. I don't plan to submit my program to the App Store, but I do plan on making the Git repo containing my code public.
My understanding is that using undocumented IOKit APIs is strictly forbidden for IOS or macOS applications intended to be made available on the App Store.
But what about programs not intended to be submitted to the App Store, like in my case?
I'm wondering if anybody knows what Apple's policy is regarding using undocumented APIs in such a way on macOS.
Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Post
Replies
Boosts
Views
Activity
I've been seeing a high number of BGTaskScheduler related crashes, all of them coming from iOS 18.4. I've encountered this myself once on launch upon installing my app, but haven't been able to reproduce it since, even after doing multiple relaunches and reinstalls. Crash report attached at the bottom of this post.
I am not even able to symbolicate the reports despite having the archive on my MacBook:
Does anyone know if this is an iOS 18.4 bug or am I doing something wrong when scheduling the task? Below is my code for scheduling the background task on the view that appears when my app launches:
.onChange(of: scenePhase) { newPhase in
if newPhase == .active {
#if !os(macOS)
let request = BGAppRefreshTaskRequest(identifier: "notifications")
request.earliestBeginDate = Calendar.current.date(byAdding: .hour, value: 3, to: Date())
do {
try BGTaskScheduler.shared.submit(request)
Logger.notifications.log("Background task scheduled. Earliest begin date: \(request.earliestBeginDate?.description ?? "nil", privacy: .public)")
} catch let error {
// print("Scheduling Error \(error.localizedDescription)")
Logger.notifications.error("Error scheduling background task: \(error.localizedDescription, privacy: .public)")
}
#endif
...
}
2025-02-23_19-53-50.2294_+0000-876d2b8ec083447af883961da90398f00562f781.crash
I have been trying to investigate some of the kernel crashes I have noticed on my IOS crash logs. Some of these are in device driver software for the peripheral interfaces.
Given that the driver code executes with kernel privileges, these kind of crashes leave the device vulnerable to remote code injection, with no user interaction required in some cases.
Crash Report from IOS 18.2.1
If Apple can provide the symbol table for IOS 18.2.1 blue tooth driver and source code, I can gladly help investigate this further.
I got a notification that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. Does this affect the push service for Apple Wallet passes or just for apps? I have a push service for Apple Wallet passes but no service for apps. I don't use push notification service for anything other than for Apple Wallet Pass push notifications, not at all for apps. Is there anything I need to do or is this not relevant to my situation?
If it does, what do I need to change in order to make sure my service still works? Do I just replace the certificate? Is there a standard path where it would live on the server?
I'm sure this is a simple thing, but it's been over a decade since I wrote the push service so I'm pretty rusty.
How to access comments and their associated text in iWork documents via AppleScript/ScriptingBridge?
Hi all,
I’m developing a Mac OS application with XCode that interacts with iWork documents (Pages, Numbers, Keynote) using ScriptingBridge (and maybe AppleScript). Right now I started with Pages, assuming if it works for Pages, it will likely be similar for Numbers and Keynote.
While I can successfully access and modify the main body text (e.g. the “body text” property in a Pages document), I’m having major difficulties accessing the comments (or annotations) within these documents.
There are many aspects, but right now what I’m trying to achieve:
For a Pages document, I need to scan the document and extract, for each comment:
The content of the comment (i.e. the comment’s text).
The text that is being commented on.
For Numbers, similarly, I need to retrieve the commented cell’s content and the associated comment.
For Keynote, the same as Pages, except I manage to get the Presenter Notes.
Once done, I could replace the content accordingly.
What I’ve tried:
Using AppleScript commands such as:
every comment of document "Test"
Accessing properties like content or range of a comment.
Attempting various syntaxes (including using class specifiers) to force AppleScript to recognize comments.
Using ScriptingBridge in my Swift code, but I couldn’t find any mapping for a “comment” object in the Pages dictionary.
However, all these attempts result in errors such as “cannot convert …” or “this class is not key value coding-compliant for the key …” which leads me to believe that the iWork scripting dictionaries may not expose comments (or annotations) in a scriptable way.
Questions:
Is there a supported way to access the comments (and the associated commented text) in an iWork document via AppleScript or ScriptingBridge?
If so, what is the proper syntax or property name to use? (For example, should I be looking for a class named “comment”, “annotation”, or perhaps something else?)
If direct access via AppleScript/ScriptingBridge is not possible, what alternative approaches would you recommend for programmatically extracting comment data from iWork documents?
I apologize if my post isn't clear, it is translated from French. Any insights or examples would be greatly appreciated. Thank you!
My app monitors users heart beats and if critical reading is noticed, it auto -dials 911 for emergency and ambulance help.
I was under the impression that auto-dial may not be permitted or possible on the platform.
Can anyone confirm and provide any additional guidance on if it is possible in the newer SDK/API stack or using any 3rd party service ?
Thank you in advance!!
According to the Apple notification alert received in October 2024, the APNS server certificate update for production is scheduled for February 24, 2025.
Has this change been implemented, or is there a platform or method to verify whether this update has been applied in production?
If so, where can we check this?"
I am developing a VoIP service.
Usually, when receiving a VoIP Push, Callkit is exposed immediately after receiving the message and the app is designed to be used.
However, there is an extremely intermittent phenomenon (not well reproduced) where the app does not wake up even when receiving a VoIP Push. And after a long time, the app wakes up and Callkit is activated. (A long time after receiving the call…)
Has anyone experienced the above phenomenon? I wonder if there are any reported parts depending on the OS version. (I have identified that it does not occur in the 17.x version, but it is difficult to guarantee because it occurs extremely intermittently)
The app is not running in the background, but... Could this be happening if there are a lot of pending operations in the background?
I need help urgently
When running the test app with test flight before actually opening the app, the execution region is Korea and the country code is Korea, but the currency code on the payment screen is displayed as dollars or euros instead of won. In the payment settings, the currency code is set to won for Korea and dollars for the United States, and the European region is not set at all, but in some phones it is displayed as euros, and in some phones it is not like this, and in some cases it is displayed as won normally.
Hello! We're currently testing Live Caller ID implementation and noticed an issue with userIdentifier values in our database.
Initially, we expected to have approximately 100 records (one per user), but the database grew to about 10,000 evaluationKey entries. Upon investigation, we discovered that the userIdentifier (extracted from "User-Identifier" header) for the same device remains constant throughout a day but changes after a few days.
We store these evaluation keys using a composite key pattern "userIdentifier/configHash". All these entries have the same configHash but different userIdentifier values.
This behavior leads to unnecessary database growth as new entries are created for the same users with different userIdentifier values.
Could you please clarify:
Is this the expected behavior for userIdentifier to change over time?
If yes, is there a specific TTL (time-to-live) for userIdentifier?
If this is not intended, could this be a potential iOS bug?
This information would help us optimize our database storage and implement proper cleanup procedures.
Thank you for your assistance!
When integrating the Wallet Extension, after clicking my app icon from the "From Apps on Your iPhone" list, I encountered the message: "Cannot Add Card. '***' is not responding. Wait a few minutes and try again. If the problem continues, contact the card issuer's customer service" instead of the configured login page appearing as expected.
What could be causing this issue, and how should I resolve it?
I get the ApplicationSupportDirectory path like this:
let path = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true)[0] as String
however for FileProvider plugin it looks like:
/var/mobile/Containers/Data/PluginKitPlugin/.../Library/Application Support/rclone.conf
instead of what I get for an Application:
/var/mobile/Containers/Data/Application/.../Library/Application Support
I need a way to get the Application's Support Directory from the FileProvider plugin.
Is that possible? If not, what other shared location I could use to access shared file between these two?
Hi,
I need to write an application (possibly using C) to communicate with a USB High Speed Device CDC class I am developing, but unfortunately I have no development experience under Mac OS, so I am here to ask for a few help/advice. I hope I am in the right place.
Since I have a working code using libusb on Linux, I have first tried to use such lib on a Mac OS without success. The device is listed correctly using
ioreg -w0 -l -p
but it seems to be always busy:
MYUSBDEVICE@fa410000 <class IOUSBHostDevice, id 0x100001769, registered, matched, active, busy 0 (262 ms), retain 24>
in fact, attempting to use libusb always results in error:
LIBUSB_ERROR_NOT_FOUND
libusb_bulk_transfer: Entity not found
After searching a bit, I have read that it is impossible (?) to use libusb on MacOS.
Then I came across these following pages:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/USBBook/USBDeviceInterfaces/USBDevInterfaces.html
https://developer.apple.com/documentation/usbdriverkit
I would possible avoid to write a CDC kernel driver for my application, so link #2 seems more appropriate to what I need.
But isn't it available any API to develop USB CDC communications C application on MacOS ?
Any suggestion is appreciated.
Thanks in advance.
Regards,
Simon
I am implementing flutter_callkit_incoming for handling call notifications in my Flutter app. However, I am facing an issue where VoIP push notifications are not consistently received when the app is in the background or terminated.
According to Apple’s documentation:
"On iOS 13.0 and later, if you fail to report a call to CallKit, the system will terminate your app. Repeatedly failing to report calls may cause the system to stop delivering any more VoIP push notifications to your app."
I have followed the official installation guide: flutter_callkit_incoming installation and implemented all necessary configurations. However, VoIP notifications sometimes get lost and do not deliver reliably.
Here is the payload I am using:
{
"notification": { "title": "New Alert", "body": "@H is calling you..." },
"android": {
"notification": {
"channelId": "channel_id",
"sound": "sound_name.mp3"
}
},
"apns": { "payload": { "aps": {} } },
"data": {
"title": "New Call",
"body": "@H is calling you...",
"notificationType": "CALL",
"type": "NOTIFICATION",
"sound": "sound_name"
},
"token": "token"
}
I expect the call notification to appear even when the app is in the background or killed state. Has anyone encountered this issue and found a solution? Any insights would be greatly appreciated.
We developed a camera remote control app for Apple Watch, but during the development process, we found that Apple Watch is prone to sleep on its own without screen interaction (usually automatically sleeping between 5s and 15s when there is no interaction, but our Apple Watch app actually receives the camera preview video frame data we transmit all the time, and there is no data interaction), and then triggers the sessionReachableDidChange function, and the session.isRechable is false. We hope that the camera remote control app for our Apple Watch can remain on when in the foreground, making it convenient to control our camera app on our phone. We found that DJI's Apple Watch app does not automatically sleep and does not sleep for more than 2 minutes. We have tried many methods, such as heartbeat packets, and I have added WKSupportsAlwaysOnDsplay to the Apple Watch info.plist file, but have not found an effective solution. I hope you can provide assistance, thank you.
We have integrated the card provisioning in Apple wallet for quite sometime now through an external processor and we got the App Entitlement for the same.
Now we are building the card provisioning in Apple Wallet flow in our app. Though everything seems to work fine (including issuer certificates, nonce etc.) but when we are clicking on ADD button on card details screen, I am getting an error saying "Could Not Add Card".
When I inspect the error from didFinishAddingPaymentPass, it reads "The operation couldn’t be completed. (PKPassKitErrorDomain error 2.)". Though the Apple documentation suggests it as an unsupportedVersionError but it does not say anything beyond that. I want more detailed explanation because of which I am getting this error
I’m encountering an issue while reading/writing shared preferences using UserDefaults with an App Group in my iOS Message Extension. The following error appears in the console:
`Couldn't read values in CFPrefsPlistSource<0x3034e7f80> (Domain: [MyAppGroup], User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd.
I have correctly enabled the App Group in both my containing app and the Message Extension, and I am using UserDefaults(suiteName:) to access shared preferences. However, I keep getting this error when trying to read/write values.
Has anyone encountered this before? How can I properly configure my app group preferences to avoid this issue? Any help would be greatly appreciated!
I am a macOS software developer using Xcode and Objective-C. I have a wallpaper app on the App Store, and recently, a few users have asked if the app can be excluded from the ‘Screen Time’ statistics. Is there a way to allow users to choose whether or not the app should appear in the ‘Screen Time’ tracking? I have already set LSUIElement to YES in the info.plist, but the app is still being tracked in ‘Screen Time.
Does anyone have this error and my app can't be searched in the Apple Store
I'm looking at implementing an iOS app that has includes a Content Filter Provider to block access to certain domains when accessed on the device.
This uses NEFilterManager, NEFilterDataProvider and NEFilterControlProvider to handle configuration and manage the network flows and block as necessary.
My question is can you deploy this in an iOS 18+ app on the App Store to devices which are unmanaged, unsupervised and don't use Screen Time APIs?
Although not 100% clear, this technote seems to say it is not possible:
https://developer.apple.com/documentation/Technotes/tn3134-network-extension-provider-deployment
Testing this on a Developer device and build works successfully without any MDM profiles installed.
A similar approach using the same APIs also works on macOS once user permissions have been given.
If it can't work on unsupervised, unmanaged iOS devices, is possible for the user to first manually install a MDM profile which includes the required 'Content Filter' details and then have it work?
If not, how would you filter iOS network traffic on an unmanaged, unsupervised device?
Is it necessary to use a VPN or DNS approach instead (which may be a lot less privacy compliant)?