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

Post

Replies

Boosts

Views

Activity

How to show VoIP calls on Apple Watch (WatchOS9) with CallKit?
Now my main app is already invoked voip callkit, I would want to invoke voip on iWatch app, but I have some issue: 1、How to deal audio data and network connect of iWatch voip ? can we depends on iPhone app? 2、How to use voip callkit on iWatch that only via bluetooth connect ? 3、If main app is already support voip callkit, how to support callkit for iwatch? Do we need to repeat and independently implement callkit, network, and audio on iWatch? 4、how to add support dial number on iWatch use by the thirdpart app? the case is the same with on the iPhone use, user can send dial by system call record . Any help is appreciated, thanks in advance.
0
0
24
1h
Feedback app Broken!
Yesterday night, I opened the feedback app, but it kicked me out. When I reopened it, I had to sign back in, but it got stuck on a continuous loading screen. I tried swiping it from the background and reopening it multiple times, but it kept loading indefinitely. I waited for 1 minute, then 3 minutes, but it never stopped. This morning, I checked again to see if my reports had been opened, but the app was still loading.
1
0
48
12h
IOS18 Beta - Public (is it just me?)
From downloading Beta 18 (public) I have the following sever issues: Cellar Network dips and has weakened (wife & kids on same network with no issues.) Wi-Fi stability has become horrendous AirDrop is a nightmare zooming in on emails or other document documents cuts the page off and it becomes unmovable battery drains significantly quicker than ever before please tell me I’m not alone! @Apple - would be great if uninstalling beta was easier with out the risk and time the current process is annotated!
0
1
72
13h
How to get all ManagedSettingStore objects
Using the Screen Time API, I can create multiple ManagedSettingStore objects with different names. Is there a way to retrieve these later by name? For example, if I create them dynamically from a configuration managed by the user of my app, and the app crashes or its data gets corrupted, how can I get rid of "stale" ManagedSettingStore objects that I no longer know? Or, if I somehow lose the name of a ManagedSettingStore I created, how long does the store stay active? Forever? How can I get rid of the "stale" store?
0
1
33
2d
can a sysext with earlyboot propertykey enabled run it's host app before other app run?
hi! I know endpoint security sysext with earlyboot property key enabled will run before all other applications run while system booting. presume all these are done before earlyboot time out: sysext run it's host app, host app notify sysext to subscribe some events through xpc, then other apps start runing. though this whole process seems to violate "sysext runs before all other applications run"... I still wonder is this possible?
1
0
66
2d
How to populate the Finder comments field from NSFileProviderItemProtocol
In NSFileProviderItemProtocol I am able to use the extendedAttributes property call to add my custom extended attributes to my NSFileProviderReplicatedExtension extension files. Given that the Finder uses com.apple.metadata:kMDItemFinderComment extended attribute for file comments I thought it would be possible to populate my files with useful comments provided by the third part API. Unfortunately I seems to be unable to do so as if com.apple.metadata.... fields were inaccessible from the FP extension. Is there any way to achieve this ?
0
0
69
2d
Usage of IsSIMInserted in iOS 18
I am developing an iOS application where I need to detect if a SIM card is inserted in the device(either physical / eSim). I am targeting iOS 12 and later. I have tried using CTTelephonyNetworkInfo and CTSubscriber, but I am encountering issues with permissions and API availability in iOS 18 beta 3. if #available(iOS 16.0, *) { let subscriber = CTSubscriber() if #available(iOS 18.0, *) { do { if subscriber.isSIMInserted { return "SIM card is inserted." } else { return "No SIM card detected." } } catch { return "Error determining if SIM is inserted: \(error.localizedDescription)" } } else { return "isSIMInserted is only available on iOS 18.0 or newer." } } else { return "isSIMInserted is only available on iOS 16.0 or newer." } if let carriers = networkInfo.serviceSubscriberCellularProviders, let carrier = carriers.first?.value, let _ = carrier.mobileNetworkCode { return "SIM card is available.\nCarrier Name: \(carrier.carrierName ?? "None")" } else { return "No SIM card installed" } } in iOS 18 it always returning No SIM card detected. XCode Version 16.0 beta 3 (16A5202i) iPhone OS: iOS 18.0 (22A5307i) is there anything did I miss? or any documentation for the implementation would be helpful. Thanks
1
0
41
3d
Universal links & redirect not working on certain devices
We are currently doing our beta testing for our application and we are having some issues with universal links. The issues can be seen below: we are using auth0 for authentication. In this process, after users verify their email addresses they should be redirected back to the application. For some users, they are directed back to a page that shows error 404. For other users where it works, they are directed back to the application. What could be my issue? Our app-site- association file is hosted in the link below for reference. https://yourmomentshub.com/.well-known/apple-app-site-association
1
0
96
3d
EndPointSecurity system extension crashing due to deadline
Hi , Greetings of the day! I would like to get help to avoid the Endpoint Security System Extension crash due to below reason: Termination Reason: Namespace ENDPOINTSECURITY, Code 2 EndpointSecurity client terminated because it failed to respond to a message before its deadline Couple of events we have subscribed and for AUTH related events we are receiving deadline of 14 seconds in Sonoma and to avoid above issue we have implemented a queue to provide verdict within the deadline to avoid the OS killing of our extension however sometime we observe that we are getting crash with below message: Termination Reason: Namespace ENDPOINTSECURITY, Code 2 EndpointSecurity client terminated because it failed to respond to a message before its deadline **Dispatch Thread Soft Limit Reached: 64** (too many dispatch threads blocked in synchronous operations) There is no GCD API to check whether queue is reached to soft limit so we need help here to know or check whether queue is reached to soft limit 64. if we can check above then we should avoid adding the new tasks in it until its free to accept the tasks. And for NOTIFY_CLOSE, we are getting big value in seconds as deadline however we are adding all the processing of NOTIFY_CLOSE with dispatch_async however still receiving the crash. Here is code for AUTH_OPEN : dispatch_queue_t gNotifyCloseQueue = dispatch_queue_create( "com.example.notify_close_queue", dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL, QOS_CLASS_UTILITY, 0)); dispatch_queue_t gAuthOpenQueue = dispatch_queue_create("com.example.auth_open_queue",dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL,QOS_CLASS_USER_INTERACTIVE, 0)); BOOL AuthOpenEventHandler(es_message_t *pesMsg) { //Some Processing we are doing here like Calculate the deadline in seconds etc. and we are receiving 14 seconds in Sonoma // deadline - 14 seconds if ( deadlineInSeconds < 10 ) { dispatch_time_t triggerTime = dispatch_time(pesMsg->deadline, (int64_t)(-1 * NSEC_PER_SEC)); __block es_message_t *pesTempMsg; pesTempMsg = es_copy_message(pesMsg); dispatch_after(triggerTime, gAuthOpenQueue, ^{ if (pesTempMsg != NULL) { esRespondRes = es_respond_flags_result(pesClt,pesMsg,pesMsg->event.open.fflag,false); if(ES_RESPOND_RESULT_SUCCESS != esRespondRes) { es_free_message(pesTempMsg); return; } if (pesTempMsg != NULL) { es_free_message(pesTempMsg); } } return; }); } // Some Processing we are doing here to provide verdict and we are making sure that within 11 seconds we are setting the verdict // we are setting iRetFlag here based on verdict if (NULL != pesMsg) { esRespondRes = es_respond_flags_result(pesClt,pesMsg,iRetFlag,false); if(ES_RESPOND_RESULT_SUCCESS != esRespondRes) { es_free_message(pesMsg); return FALSE; } } return TRUE; } Here is the code for NOTIFY_CLOSE: BOOL NotifyEventHandler(es_message_t *pesMessage) { if (pesMessage->event_type == ES_EVENT_TYPE_NOTIFY_CLOSE && YES == pesMessage->event.close.modified) { __block es_message_t *pesTempMsg; pesTempMsg = es_copy_message(pesMessage); dispatch_async(gNotifyCloseQueue, ^{ // Performing Some processing on es_message_t if (pesTempMsg != NULL) { es_free_message(pesTempMsg); } }); if (pesMessage != NULL) { es_free_message(pesMessage); } } else { es_free_message(pesMessage); } return TRUE; } It would be helpful if someone help us to identify what could be wrong we are doing in above code and how to address/solve those problems (code snippet would be helpful) to avoid all possible crashes. ... Thanks & Regards, Mohamed Vasim
1
0
96
3d
Issues with LaunchAgent and LaunchDaemon
I have this application that is divided in 3 parts. A server that handles all the networking code A agent that handles all System related code A manager (NSApplication) to interact with the other two processes. Goals All three process should be kept alive if they crash All three processes must not restart if the user quits them though the NSApplication They need to run during the login window. My current set up using LaunchD is as follows. My Server process plist (relevant part) saved in System/LaunchDaemons key>MachServices</key> <dict> <key>com.myCompany.Agent.xpc</key> <true/> <key>com.myCompany.Manager.xpc</key> <true/> </dict> <key>ProgramArguments</key> <array> <string>PathToExecutable</string> <string>-service</string> </array> <key>RunAtLoad</key> <false/> My agent plist (saved in System/LaunchAgent) <key>QueueDirectories</key> <array> <string>PathToDirectory</string> </array> <key>RunAtLoad</key> <false/> <key>ProgramArguments</key> <array> <string>PathToExecutable</string> <string>service</string> </array> my Manager app plist (saved in System/LaunchAgent) <key>LimitLoadToSessionType</key> <string>Aqua</string> <key>RunAtLoad</key> <false/> <key>ProgramArguments</key> <array> <string>PathToExecutable</string> </array> <key>MachServices</key> <dict> <key>com.myCompany.Agent.manager.xpc</key> <true/> </dict> Currently I have another app that saves a file to the path of the QueueDirectories which triggers the launch of my Agent which then triggers the Server and Manager by starting a XPC Connection. QueueDirectories keeps the Agent alive (and hence all other processes) til file is removed and processes are quited through the manager. XPC Connections Server listens for a connection from agent and manager Manager listens for a connection from agent and starts a connection with server Agent starts a connection with Manager and Server Agent and Manager are owned by the user and server by root The problems When I start Agent by saving a file in the QueueDirectories path and connect to the Server over xpc I end up with two Agents, one owned by the user (the one I expect) and one owned by root. But if I manually start the Agent I do not have that problem. As I mentioned before, the server listens for a connection from the Agent. How do I stop getting two instances? or what is a better way to approach this?
1
0
92
4d
No local user-override for Live Caller Id Lookup?
If an app has a Live Caller ID Lookup extension and the lookup server indicates that a caller is identified and not blocked, then if the user wished to locally block that number they can do so either via the iPhone call block button, or via the app's Call Extension block list. However there's apparently no way for the user to do the inverse. i.e. if Live Caller Id Lookup indicated that a number should be blocked, then how could a user indicate they don't want that number blocked for them? If they added it to the Call Extension as an identified number, but live lookup is saying the number should be blocked, then what does the OS do? Give priority to the blocking instruction from the live lookup server, or give priority to the fact its in the Call Extension's Identified list?
0
0
75
4d
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.domainname.co.nz” which could put your confidential information at risk.
Hello All, We are facing weird issue rarely but it continues for few hours or a day. Observations: Issue get resolved automatically when we change iOS device network. We are using sub domain for all network request on iOS/Android App, only iOS Device is logging below mentioned issue. Both domain has different certificate, where we are using wildcard certificate on subdomain, (*.domain.co.nz ) Main domain don't have subdomain name in subject list (SAN or CN) we have verified both certificate are valid and supporting TLSv1.3 Also, We have verified instruction given by apple which is also looks good: https://support.apple.com/en-us/103769 you may observer *.wordpress.com is logged in certificate chain validation But We are not calling any of the network request on *.wordpress.com Our backend server is using only NodeJs and Express.js and as mentioned by out backend team, we don't have any use of main domain/server. Here is Xcode Error Log Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.maindomain.co.nz” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x11603ae00) s: *.wordpress.com i: Sectigo ECC Domain Validation Secure Server CA>", "<cert(0x11603b600) s: Sectigo ECC Domain Validation Secure Server CA i: USERTrust ECC Certification Authority>", "<cert(0x116043400) s: USERTrust ECC Certification Authority i: AAA Certificate Services>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://subdomain.maindomain.co.nz/vider/api/v1/users/login, NSErrorFailingURLStringKey=https://subdomain.maindomain.co.nz/vider/api/v1/users/login, NSUnderlyingError=0x301ec2cd0 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x3021b1360>, kCFNetworkCFStreamSSLErrorOriginalValue=-9843, kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9843, kCFStreamPropertySSLPeerCertificates=( "<cert(0x11603ae00) s: *.wordpress.com i: Sectigo ECC Domain Validation Secure Server CA>", "<cert(0x11603b600) s: Sectigo ECC Domain Validation Secure Server CA i: USERTrust ECC Certification Authority>", "<cert(0x116043400) s: USERTrust ECC Certification Authority i: AAA Certificate Services>" )}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask .<1>" ), kCFStreamErrorCodeKey=-9843, NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x3021b1360>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.maindomain.co.nz” which could put your confidential information at risk.})) URLSessionTask failed with error: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.maindomain.co.nz” which could put your confidential information at risk. "Show: Something went wrong! please try again after sometime!" "Networking error message: Optional("URLSessionTask failed with error: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.maindomain.co.nz” which could put your confidential information at risk.") End of error Log, Kindly help us. Thanks in advance.
2
1
93
4d
Sonoma resets timestamps when renaming files on MSDOS/FAT filesystems
If you rename a file on a MSDOS/FAT filesystem on Sonoma, a few seconds later the OS updates the timestamp of the file to the current time. $ hdiutil create -size 64m -type SPARSE -fs "MS-DOS FAT32" -volname test1 -attach /tmp/test1.img /dev/disk3 FDisk_partition_scheme /dev/disk3s1 DOS_FAT_32 /Volumes/TEST1 created: /tmp/test1.img.sparseimage $ touch -t 01010000 /Volumes/TEST1/x $ sleep 5 $ ls -l /Volumes/TEST1/x -rwx------ 1 fred staff 0 Jan 1 2024 /Volumes/TEST1/x* $ mv /Volumes/TEST1/x /Volumes/TEST1/y $ ls -l /Volumes/TEST1/y -rwx------ 1 fred staff 0 Jan 1 2024 /Volumes/TEST1/y* $ sleep 5 $ ls -l /Volumes/TEST1/y -rwx------ 1 fred staff 0 Jul 17 05:57 /Volumes/TEST1/y* $ date Wed Jul 17 05:57:09 BST 2024 $ uname -a Darwin localhost 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64 Among the downstream effects of this is if you rsync -t files to a FAT filesystem, if you run the same command again a few seconds after, rsync will copy all the files again because the destination timestamps have not been preserved. This has been reported here: https://forums.developer.apple.com/forums/thread/741490 I was close to downgrading until I found I could use rsync -t --inplace to workaround this but I've not had this problem on Monterey or any prior MacOS release. This definitely seems like a regression in the core OS. Rename should preserve timestamps.
1
0
43
4d
Example Virtualization fails with Error Domain=VZErrorDomain Code=1
Hey im trying this example: https://developer.apple.com/documentation/virtualization/running_linux_in_a_virtual_machine And downloaded the vmlinuz and initrd.img from here https://download.fedoraproject.org/pub/fedora/linux/releases/40/Everything/aarch64/os/images/pxeboot but when trying to run i get this error: The output of: file vmlinuz is PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows I tried to uncompress with gunzip but this did not work if found this but this did not help eitehr https://developer.apple.com/forums/thread/709539
2
0
114
5d
ContentsOfDirectory for FileProvider URLs
I'm developing an iOS app. Through a .fileImporter I get access to a directory URL which might be provided by an external service like Dropbox (using a FileProvider). As the user picked the URL I have full access to it. I want to get the contents of the directory: FileManager.default.contentsOfDirectory( at: url, includingPropertiesForKeys: keys, options: [.skipsHiddenFiles] ) Unfortunately I only get whatever files the system is currently aware of, which in case of external providers is often not much. If the user opens the Apple Files app and navigates to the folder then the system gets the content from the external provider and back in my app contentsOfDirectory would show everything. What can I do to get a list of the URLs? Can I somehow trigger the system to update from the external provider? Or is there another way of handling this situation?
2
0
94
5d
the question of NFC
use NFC api has some error: 2024-07-15 15:42:59.633782+0800 TestNFC[16022:1038141] tagReaderSessionDidBecomeActive 2024-07-15 15:43:03.608427+0800 TestNFC[16022:1038141] [xpc.exceptions] <NSXPCConnection: 0x282ba90e0> connection to service with pid 58 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message. Exception: Exception while decoding argument 0 (#2 of invocation): Exception: decodeObjectForKey: class "NFFieldNotification" not loaded or does not exist how can I fix it ? thanks
0
0
62
6d
mount(2) always returning errno 63 (File name too long) when mounting NFS share
I've been trying use the mount(2) function to programmatically mount an NFS share on my application, although I seem to be having issues with the function signature and the parameters that I'm supposed to be passing. According to the man pages this is the function's signature: int mount(const char *type, const char *dir, int flags, void *data); As the documentation is vague on the value of type, I've assumed that it was the network location, in the form of server.name:/some/location. So I've written the following test code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;errno.h&gt; #include &lt;sys/param.h&gt; #include &lt;sys/mount.h&gt; int main(int argc, char **argv) { const char *type = "nfsserver.lan:/some/path"; const char *mntp = "/Users/localuser/tmpmount"; int ret = mount(type, mntp, 0, NULL); printf("ret = %d\n", ret); printf("errno = %d (%s)\n", errno, strerror(errno)); return 0; } Upon running this program on my Mac Pro running macOS 12.7.4 I got the following output: ret = -1 errno = 63 (File name too long) The NFS share location string I'm actually using is exactly 46 characters long and I am able to mount the share using the mount(8) command. I'm also able to use the unmount(2) function for testing after I've used the mount(8) command. What am I missing and how can I fix this issue? I think I'm probably passing the parameters in the wrong way, but sadly the documentation is quite vague.
2
0
170
1w