I am trying to use ScreenCaptureKit to select this window automatically rather than having the user do it.
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've been working on implementing alternate app icons for my iOS app, and everything works perfectly in debug builds on both the simulator and a physical device. However, when testing on TestFlight, I encounter the following error:
The requested operation couldn’t be completed because the feature is not supported.
Has anyone faced this issue before? Is there a specific TestFlight configuration or setup I might be missing to enable alternate app icon functionality?
our app has a helper to perform privileged operations.
previously that helper was installed via SMJobBless() into the /Library/LaunchDaemons/ and /Library/PrivilegedHelperTools/
we also had a script that would install the helper from the command-line, which was essential for enterprise users that could not manually install the helper on all their employee's Macs. the script would copy the files to their install location and would use launchctl bootstrap system as the CLI alternative to SMJobBless(). the full script is here: https://pastebin.com/FkzuAWwV
due to various issues with the old SMJobBless() approach we have ported to helper to the new SMAppService API where the helpers do not need to be installed but remain within the app bundle ( [[SMAppService daemonServiceWithPlistName:HELPER_PLIST_NAME] registerAndReturnError:&err] )
however, we are having trouble writing a (remote-capable) CLI script to bootstrap the new helper for those users that need to install the helper on many Macs at once. running the trivial
sudo launchctl bootstrap system /Applications/MacUpdater.app/Contents/Library/LaunchDaemons/com.corecode.MacUpdaterPrivilegedInstallHelperTool2.plist
would just result in a non-informative:
Bootstrap failed: 5: Input/output error
various other tries with launchctl bootstrap/kickstart/enable yielded nothing promising.
so, whats the command-line way to install a SMAppService based helper daemon? obviously 'installing' means both 'registering' (which we do with registerAndReturnError in the GUI app) and 'approving' (which a GUI user needs to manually do by clicking on the notification or by going into System Settings).
thanks in advance!
p.s. we wanted to submit this as a DTS TSI, but those are no longer available without spending another day on a reduced sample projects. words fail me.
p.p.s. bonus points for a CLI way to give FDA permissions to the app!
I have NTFS which is mounted on '/Volumes/usb_vol'
#mount
Filesystem Mounted on
/dev/disk5s1 /Volumes/usb_vol
The following simple code reports different values of device Id for device-file and mount point directory
struct stat buf;
for (int i = 1; i < argc; i++)
{
std::cout << argv[i] << std::endl;
if (stat(argv[i], &buf) < 0)
{
continue;
}
if (S_ISBLK(buf.st_mode))
{
std::cout << "st_rdev (" << major(buf.st_rdev) << "/" << minor(buf.st_rdev) << ") hex: " << std::hex << buf.st_rdev << std::endl;
}
else
{
std::cout << "st_dev (" << major(buf.st_dev) << "/" << minor(buf.st_dev) << ") hex: " << std::hex << buf.st_dev << std::endl;
}
}
Output:
/dev/disk5s1
st_rdev (1/22) hex: 1000016
/Volumes/usb_vol
st_dev (48/119) hex: 30000077
I believe this is expected but I have not found any explanation of this behaviour.
Are there any explanation of difference these values?
I can assume the stat() will report (48/119) for all objects which are located on this file system. Is it correct?
Thank you for the help!
Hi,
I'm not too good with terminal stuff, but when I looked at activity monitor, my corespotlightd was using too much of my cpu. I decided to look up solutions on google and stumbled upon this: https://forums.developer.apple.com/forums/thread/675482. I tried some of the commands, and I closed the terminal while sudo was still running because I was getting impatient. Somehow, before I even realized it, I was logged out of my Apple ID and my desktop and downloads files were completely gone. For some reason, my applications are still the same, which makes me wonder if some of the files or folders I had before can still be recoverable. I checked time machine, and I wasn't able to recover anything. How cooked am I? I've lost all of my university work and some other pictures and stuff that I thought would never be damaged if I had it locally. Would appreciate any type of help. Thanks.
Hello,
I am encountering an issue with user-generated files stored in the Documents directory on an iPhone 11 running iOS 18.2.
The problem occurs as follows:
1.The app generates and saves files in the Documents directory using FileManager.
2.These files are successfully saved and remain accessible while the app is running.
3.After restarting the app, the files appear to have been deleted from the Documents directory.
I have confirmed that:
1.The files are being saved to the correct location (Documents directory) and can be accessed during the current app session.
2.The app is not explicitly deleting these files during shutdown or restart.
3.This behavior is consistent across multiple app restarts.
Hello,
I am encountering an issue with user-generated files stored in the Documents directory on an iPhone 11 running iOS 18.2.
The problem occurs as follows:
1.The app generates and saves files in the Documents directory using FileManager.
2.These files are successfully saved and remain accessible while the app is running.
3.After restarting the app, the files appear to have been deleted from the Documents directory.
I have confirmed that:
1.The files are being saved to the correct location (Documents directory) and can be accessed during the current app session and from iExplorer.
2.The app is not explicitly deleting these files during shutdown or restart.
3.This behavior is consistent across multiple app restarts.
I recently started saving a file, where I hold some app state, to an AppGroup in order to share it with my widget extension.
Of the some 16k daily active users of my app, 55 are initially unable to read the file (it might not yet be created). And they are unable to write a file to the AppGroup as well. I only know this due to logging the error to Crashlytics.
Error Reading: "The file “BFTPreferences” couldn’t be opened because you don’t have permission to view it.
Error Code:257"
My App sees this error and informs the user to restart their device. I have not been contacted by any of these users for support, so I assume the restart fixes things.
Has anyone seen this before? Is restarting the device the only fix? Am I doing something wrong?
The only solution I can think of currently is to save the file to the app's Documents directory and save a copy to the AppGroup for use in my extensions. At least then the main app won't have an issue and it will just be the widget unable to display data until a restart.
Reading the file:
do {
// archive data
let data = try PropertyListSerialization.data(fromPropertyList: preferences, format: .xml, options: 0)
// write data
do {
if let groupURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupIdentifier) {
let fullPath = groupURL.appendingPathComponent(preferencesFileName)
try data.write(to: fullPath)
}
else {
fatalError("Unable to find app group \(appGroupIdentifier)")
}
}
catch {
logthis("Failed to write dictionary data to disk. \(error.localizedDescription)")
}
}
catch {
logthis("Failed to archive dictionary. \(error.localizedDescription)")
}
Writing the file:
do {
if let groupURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupIdentifier) {
let fullPath = groupURL.appendingPathComponent(preferencesFileName)
let data = try Data(contentsOf: fullPath)
if let dictionary = try PropertyListSerialization.propertyList(from: data, format: nil) as? NSMutableDictionary {
preferences = dictionary
}
}
else {
fatalError("Unable to find app group \(appGroupIdentifier)")
}
} catch {
if (error as NSError).code == NSFileReadNoSuchFileError {
// file doesn't exist so create it
}
else {
logthis("Couldn't read BFTPreferences:\(error.localizedDescription)\nError Code:\((error as NSError).code)") <--error code 257 is caught here
}
}
0 CoreFoundation __exceptionPreprocess + 164
1 libobjc.A.dylib objc_exception_throw + 88
2 CoreFoundation -[__NSArrayI objectAtIndex:] + 0
3 UIKitCore -[UIInputSwitcherView selectedInputMode] + 116
4 UIKitCore -[UIInputSwitcherView didSelectItemAtIndex:] + 148
5 UIKitCore -[UIKeyboardMenuView selectItemAtPoint:] + 92
6 UIKitCore -[UIInputSwitcherView buttonPressed:withEvent:location:isLocationInsideViewHitArea:isForDictation:tapAction:] + 1040
7 UIKitCore -[UISystemKeyboardDockController dictationItemButtonWasPressed:withEvent:isRunningButton:] + 660
8 UIKitCore -[UISystemKeyboardDockController keyboardDockView:didPressDockItem:withEvent:] + 448
9 UIKitCore -[UIKeyboardDockView _dockItemButtonWasTapped:withEvent:] + 120
I would like to share my specific use case and seek your guidance on implementing it effectively within iOS:
We are developing an iOS application that may run simultaneously on multiple devices near each other. The core functionality involves continuous Bluetooth Low Energy (BLE) scanning to detect peripherals (beacons) in the range of a central device. The scanning needs to function seamlessly across the following states:
• Foreground
• Background
• Locked mode (when the device is locked)
Here are the detailed requirements:
1. Scanning Behavior:
• The central device should continuously scan for nearby BLE peripherals (beacons).
• If a new peripheral comes into range, the application should capture its data, including:
• Device Name
• MAC Address
• Payload Data
• RSSI (Signal Strength)
2. Peripheral Out-of-Range Handling:
• If a detected peripheral (beacon) moves out of range, it should automatically be removed from the populated list displayed on the app.
3. Peripheral Reappearance:
• If a peripheral (beacon) that moved out of range comes back into range, the application should detect it again and repopulate the list with updated data seamlessly.
4. Application State:
• This behavior (scanning, detection, and updating) should work regardless of the app’s state:
• Foreground
• Background
• Device Locked
FYI, we are using Custom Ruuvi beacons
Given the above requirements, I would greatly appreciate any guidance, suggestions, or best practices to implement this use case efficiently while adhering to iOS background execution and Bluetooth limitations.
Hello,
My application monitors ES_EVENT_TYPE_NOTIFY_CLOSE. If a file is dragged to another location in Finder, the Endpoint Security reports the event ES_EVENT_TYPE_NOTIFY_CLOSE was performed by '/usr/libexec/xpcproxy'. So, xpcproxy is the process that performed ES_EVENT_TYPE_NOTIFY_CLOSE.
Looks like the dragged file is copied by some XPC service.
I have found the audit user id is equal to user who dragged a file.
Can audit user id be used to identify a user who triggers copy file action in this case? If no, are there any way to define such info?
Thank you in advance!
when app enter background,sometimes crash at
BSXPCCnx:com.apple.backboard.hid-services.xpc (BSCnx:client:BKHIDEventDeliveryManager)
this is crash stack:
0 libsystem_pthread.dylib 0x3b30 pthread_mutex_lock + 12
1 ilink_live 0xbd884 (缺少 UUID 973fe6c5058c35bda98679b0c8aa0129)
2 ilink_live 0xb75fc (缺少 UUID 973fe6c5058c35bda98679b0c8aa0129)
3 libsystem_c.dylib 0x23d68 __cxa_finalize_ranges + 492
4 libsystem_c.dylib 0x23b64 exit + 32
5 BackBoardServices 0x579ec -[BKSHIDEventDeliveryManager _initForTestingWithService:] + 98
6 BoardServices 0xbae8 __31-[BSServiceConnection activate]_block_invoke.182 + 128
7 BoardServices 0x17620 __61-[BSXPCServiceConnectionEventHandler _connectionInvalidated:]_block_invoke + 196
8 BoardServices 0x8f64 BSXPCServiceConnectionExecuteCallOut + 240
9 BoardServices 0x18e5c -[BSXPCServiceConnectionEventHandler _connectionInvalidated:] + 180
10 libdispatch.dylib 0x2370 _dispatch_call_block_and_release + 32
11 libdispatch.dylib 0x40d0 _dispatch_client_callout + 20
12 libdispatch.dylib 0xb6d8 _dispatch_lane_serial_drain + 744
13 libdispatch.dylib 0xc214 _dispatch_lane_invoke + 432
14 libdispatch.dylib 0x17258 _dispatch_root_queue_drain_deferred_wlh + 288
15 libdispatch.dylib 0x16aa4 _dispatch_workloop_worker_thread + 540
16 libsystem_pthread.dylib 0x4c7c _pthread_wqthread + 288
17 libsystem_pthread.dylib 0x1488 start_wqthread + 8
when crash happened ,most of time app recieved CBManagerStateResetting and CBManagerStateUnsupported event
My company manufactures an Accessory which has been a certified product for a number of years. We are switching manufacturers, and thereby need to re-certify under a new product plan with the new manufacturer.
We release over the air updates to our accessory. The question is what do we do about the device's iAP2 IdentificationInformation Message, specifically the ProductPlanUID parameter.
Should devices manufactured at our old manufacturer continue to declare our original Product Plan's UID in their identification information, or should they declare the new one?
hi!
recently, I reinstalled my computer to get gptk2. I found such an error when loading rosetta. when I typed "softwareupdate --install-rosetta" on the terminal, the terminal feedback was "Installing Rosetta 2 on this system is not support Ed."
besides, when I use homebrew install gptk, it will return "Error: openssl @1.1 has been disabled because it is not supported upstream! It was disabled on 2024-10-24."
Is there any way to solve these problems?
I've got a few questions about device check, and would be grateful if anybody knows the answers:
why is DC not reset when the device transfers between users?
The canonical example of why an app might use DC is if it offers a promotion and to stop user's from getting that promotion multiple times.
However, using the same example scenario yes you've stopped the first user from getting multiple promotions but then if that device is transferred to another user you've stopped them from getting any promotions at all?
how can you test things when the bits can't be reset? If once you've set the bits on a device then you can no longer ever use that device again to test the apps behavior in the situation when the bits are unset.
does the app have complete freedom to set the timestamp to whatever it wants? For example, could the app set a bit with a timestamp of epoch?
if the bits are shared between all apps from the same developer, then supposing that developer have more apps in the App Store then there are bits? If they have 5 apps offering a promotion and a device has previously had 4 apps installed, then the user wants to install a 5th app, but with all 4 bits now then the user will be able to abuse the promotion on the 5th app because the app has no way of recording if the promo has been used or not as the collective bits have been used up?
Exploring AppIntents and Shortcuts. No matter what I try Siri won't understand parameters in an initial spoken phrase.
For example, if I ask: "Start my planning for School in TestApp", Siri responds: "What's plan?", I say: "School" and Siri responds "Ok, starting Shool plan"
What am I missing so it won't pick up parameters right away?
Logs inside func entities(matching string: String) are only called after "What's plan?" question and me answering "School". No logs after the initial phrase
Tried to use Apple's Trails example as a reference but with no luck
I’m trying to run a Shortcut from my iPhone’s Action button and immediately dictate input by voice, without tapping or switching modes.
Currently, it always defaults to a text field. Voice dictation works seamlessly if I trigger the shortcut via a voice command, but not when I use the Action button.
Is there a way, API, or future plan from Apple to allow voice dictation after the Action button triggers a Shortcut? Any guidance or ideas would be really helpful!
Periodically when testing I am running into a situation where the app hangs and beach balls forever when using AVAudioEngine.
This seems to log out when this affect happens:
Now when this happens if I pause the debugger it's hanging at a call to:
[engine connect:playerNode
to:engine.mainMixerNode
format:buffer.format];
#0 0x000000019391ca9c in __psynch_mutexwait ()
#1 0x0000000104d49100 in _pthread_mutex_firstfit_lock_wait ()
#2 0x0000000104d49014 in _pthread_mutex_firstfit_lock_slow ()
#3 0x00000001938928ec in std::__1::recursive_mutex::lock ()
#4 0x00000001ef80e988 in CADeprecated::RealtimeMessenger::_PerformPendingMessages ()
#5 0x00000001ef818868 in AVAudioNodeTap::Uninitialize ()
#6 0x00000001ef7fdc68 in AUGraphNodeBase::Uninitialize ()
#7 0x00000001ef884f38 in AVAudioEngineGraph::PerformCommand ()
#8 0x00000001ef88e780 in AVAudioEngineGraph::_Connect ()
#9 0x00000001ef8b7e70 in AVAudioEngineImpl::Connect ()
#10 0x00000001ef8bc05c in -[AVAudioEngine connect:to:format:] ()
Current all my audio engine related calls are on the main queue (though I am curious about this https://forums.developer.apple.com/forums/thread/123540?answerId=816827022#816827022).
In any case, anyone know where I'm going wrong here?
Hello,
Our device firmware has a companion iOS app that allows a user to rename it. We are connected to the iPhone via BT Classic. The new name is reflected on the app, however, the iPhone BT device list still shows the old name. It doesn't seem to get updated to the new name unless we unpair/re-pair the device to the phone.
Is there a way to get the iPhone to update to the new name in the Settings BT device list without unpairing the device? Is this possible in BT Classic?
Thanks.