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

Post

Replies

Boosts

Views

Activity

Unable to get widgetConfigurationIntent from NSUserActivity
I have a simple lock screen widget that when tapped, should open a certain flow in my app. This works fine when the main app is already running, but when tapped while the app is not running, the app launches, but it doesn't open the flow I want it to. When I debug it (see flow below), it seems that the problem come from the widgetConfigurationIntent(of:) function on NSUserActivity. When the app is cold launched, I get the expected NSUserActitivity, but the function above returns nil. That same piece of code returns a valid WidgetConfigurationIntent if the app is already running. Any ideas what might go wrong? There's nothing in the documentation hinting about why this might happen, so I feel a bit lost. BTW, this is how a debug opening from scratch with a lock screen widget: Select "Wait for the executable to be launched" in the scheme editor in Xcode. Make sure the app is not running on device or simulator Start debugging session in Xcode (app is built but not opened) Lock device, tap already installed lock screen widget. App launches and my breakpoint is hit.
0
0
169
Aug ’24
calling posix_spawn from a network System Extension
I'm attempting to create an application that uses a System Extension / Network Extension to implement a PacketTunnelProvider. After creating and configuring the packet device, I want to spawn a child process to do the actual reading and writing of network packets. I want to do this because the child is written in Go (it uses wireguard-go and my company's Go-SDK). When I call posix_spawn from within the System Extension, I get "Operation not permitted" as the error, and sandboxd drops a log with Violation: deny(1) process-exec* /private/var/root/Library/Containers/<my system extension>/Data/Documents/<my-child-binary> Is it possible to execute other processes from within the System Extension sandbox? Do the binaries have to be stored in a particular place, and if so, where? I attempted to build with the App Sandbox removed from the System Extension capabilities, and this seemed to fail before even executing my Network Extension code, so I'm guessing System Extensions are required to be sandboxed, but it would be nice to have that confirmed.
5
0
313
Aug ’24
macOS 15.1 beta 2 not downloading
I’ve let the System Settings‘ Sofware Updates run overnight twice - and all I get is the cylon blue shifting left to right… I’ve restarted my M1 MBAir several times. I’ve attempted to download it directly from developer.apple.com - but it just stops (Zero KB of 15.87 GB) - with no further clarification. Any ideas?
3
0
473
Aug ’24
iOS 18.1 NFC/SE APIs - access to applet deployed onto SE
Apple is opening up NFC and SE APIs to developers on iOS18.1 in certain territories. The documentation mentions that NFC & SE Platform partners can submit an applet for installing into the Secure Element. When a request is made by an iOS app to provision a card, the signed applet corresponding to the card scheme will be downloaded into the iPhone and personalised by the platform partner servers. Would it be possible to access the applet through SE APIs? If yes, would the access be open to any iOS app that has the granted HCE entitlement to the card scheme (e.g AIDs). Or is access limited to only the iOS app that create/published the applet? From the document (excerpt below), it looks like any iOS app with the HCE entitlement to the card scheme would be able to use the applet. However it also mentions lifecycle management where an iOS app can delete the applet (or credential). Would be interested in getting insight into this.
0
1
458
Aug ’24
Ever-increasing mbuf usage
Using our transparent proxy provider, I noticed that the mbuf usage was... weird: 15839/750028 mbufs in use: 15810 mbufs allocated to data 29 mbufs allocated to packet headers 734189 mbufs allocated to caches The amount allocated to caches does go down a bit, but nothing significantly. I started looking into this because I've had a couple of panics from remoted not checking in enough, and it was (as I recall, I can't find the crash logs now) mbuf-related. I've looked through an older version of the xnu source, and nothing jumped out, but that doesn't have the code for the network extension support. I hate mbufs and always have.
2
0
203
Aug ’24
Can reproduce in SpeakerBox that CallKit doesn't activate audiosession when call finished by remote caller
I can reproduce the bug that CallKit doesn't active audiosession after the outgoing call put on hold because of an incoming call. VoIP calling with CallKit Steps to reproduce: Download SpeakerBox example app from the link above and start it with XCode Start a new outgoing call Call your phone from other phone Hold and Accept the call After a few secs finish the call from the other phone The outgoing call will be still on hold Click on the call and click Toggle Hold The call won't be active again because the audiosession is activated. Logs: Received provider(_:didDeactivate:) Received provider(_:didDeactivate:) Received provider(_:didDeactivate:) Received provider(_:didDeactivate:) Received provider(_:didDeactivate:) Requested transaction successfully Starting audio Type: stdio AURemoteIO.cpp:1162 failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Float32> inf< 1 ch, 44100 Hz, Float32>) Type: Error | Timestamp: 2024-08-15 12:20:29.949437+02:00 | Process: Speakerbox | Library: libEmbeddedSystemAUs.dylib | Subsystem: com.apple.coreaudio | Category: aurioc | TID: 0x19540d AVAEInternal.h:109 [AVAudioEngineGraph.mm:1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize, NULL, 0)): error 561017449 Type: Error | Timestamp: 2024-08-15 12:20:29.949619+02:00 | Process: Speakerbox | Library: AVFAudio | Subsystem: com.apple.avfaudio | Category: avae | TID: 0x19540d Couldn't start Apple Voice Processing IO: Error Domain=com.apple.coreaudio.avfaudio Code=561017449 "(null)" UserInfo={failed call=err = PerformCommand(*outputNode, kAUInitialize, NULL, 0)} Type: Notice | Timestamp: 2024-08-15 12:20:29.949730+02:00 | Process: Speakerbox | Library: Speakerbox | TID: 0x19540d Route change: Type: Notice | Timestamp: 2024-08-15 12:20:30.167498+02:00 | Process: Speakerbox | Library: Speakerbox | TID: 0x19540d ReasonUnknown Type: Notice | Timestamp: 2024-08-15 12:20:30.167549+02:00 | Process: Speakerbox | Library: Speakerbox | TID: 0x19540d Previous route: Type: Notice | Timestamp: 2024-08-15 12:20:30.167568+02:00 | Process: Speakerbox | Library: Speakerbox | TID: 0x19540d <AVAudioSessionRouteDescription: 0x302c00bc0, inputs = ( "<AVAudioSessionPortDescription: 0x302c01330, type = MicrophoneBuiltIn; name = iPhone Mikrofon; UID = Built-In Microphone; selectedDataSource = (null)>" ); outputs = ( "<AVAudioSessionPortDescription: 0x302c004d0, type = Receiver; name = Vev\U0151; UID = Built-In Receiver; selectedDataSource = (null)>" )> Type: Notice | Timestamp: 2024-08-15 12:20:30.167626+02:00 | Process: Speakerbox | Library: Speakerbox | TID: 0x19540d
4
0
233
Aug ’24
kext for x86_64 + arm64e change into only x86_64 after codesign.
I have a kext in app, and I can run it well on Xcode, but I cannot successfully run kextload command after archive. According to the error message, I then use "lipo -archs" to check kext archs, I found some strange things. Checkout the result of app in Xcode product directory: The result of app in Archive directory: Is there a way to resolve this issue? Where might the mistake be? Or Can I just copy app and code sign, notarize the app, then provide it for others to use?
1
0
283
Aug ’24
Unable to see Beta Updates for an active Developer account
Hey everyone, I’m inquiring on how to possibly resolve this issue I’m having. My Apple Account/ID is not showing any device Developer Beta (iOS, iPadOS, macOS, tvOS, visionOS, and watchOS). I’m only seeing Public Beta and AppleSeed Beta. I know some will say just use AppleSeed or Public Beta but the reason this is important for me is due to visionOS as it is only available for Developer Beta This is an image of what I see on my iPhone for example. Apple Vision Pro won’t show any at all as AppleSeed and Public Betas are not available for visionOS.
0
0
192
Aug ’24
Custom icons for folder aliases not showing
Problem: custom icons for folder aliases not showing System drive and external drive custom alias folder icons don't showup on desktop or external drive (OS14.6 Sonoma 2023); they only show-up as plain folders or with an odd document icon. Alias doesn't connect to image; however it's there, easily accessible via spacebar. Finder doesn't save the custom icon to the alias. See below for workaround. Summary: I have custom alias icons on my desktop linking to their source files on the system drive and external drive.. however they do not display the custom icon. After upgrading from OS10.14 Mojave to OS14.6 Sonoma 2023, system drive & external drive custom alias icons no longer display the icon on either drive (there is a work-around for Mojave; see history section). Personal impact: hampered file navigation and workflow; I'm lost, can't tell where anything is; not having my icons makes it especially difficult to navigate my files and hampers my workflow significantly. Desired outcome: all custom icons for folder aliases linking to source files (on system & external drives) appear on the desktop, and in all directories on system & external drives (including encrypted external drives). Status.. August 2024: called apple support, they said there is no solution, and there are no plans to fix it, and no plans for a fix in OS 15 Sequoia (in public beta now) Action: ❯ leave feedback at https://www.apple.com/feedback/macos/ ❯ join this campaign to fix this once and for all! -- After 20 years of dealing with this issue.. we need to fix this. History: ▪ OS 10.14 Mojave 2018: external drive alias icons don't work; because upon startup, the icon images for these files disappear; because when system starts it loads the system drive icons but not the external drive icons because it's password protected, hence icon information does not get loaded; alias icons can't connect with unmounted external drive @ boot; however it's there, easily accessible via spacebar the FIX: alias the icons on the desktop each time after boot, however the names are altered ▪ OS X 10.11 El Cap 2015: drag the icons to a folder then back to desktop.. sometimes this works I stayed on OS9 as long as possible because of the OS10 icon problem ▪ OS 9: all custom alias folder icons worked fine Givens: space bar has fast access to icon -highlight alias and press space bar -- seems that it would be a simple solution, since the image is there -- get info for alias also has the image in preview How to make a custom icon: open a pic (typically from a screenshot; .png), select image with cursor with shift key down (for a perfect square), copy ⌘C, click target folder, get info ⌘I, click on folder icon on top left corner, paste ⌘V Fix -- How? --make a solution approach for a macOS dev? some bash process to link to icon; how to access icon Swift? process to renew the alias icon process goes through all desktop icons.. fixes them; new icon, correct name routine where all icons on desktop link to their files easily making a new alias.. as easy as making a regular alias; cammand L, etc make alias search for the image app that makes alias create custom desktop.. a GUI w links -- INTERIM FIX / WORKAROUND create a new folder on your desktop, name it, place it's alias inside the folder, fix the icon, when you open the desktop folder, you will then have to click on the alias --this is very time-consuming and tedious note: there may be easier options for OSs prior to Sonoma; review History section workflow: symbol note: ⇧ shift, ⌃ control, ⌥ option, ⌘ cammand create new folder on desktop ⌘⇧N , name it.. if the name is already taken by the alias, change the alias's name; for example.. alias it ⌘^A click on this new folder then ⌘I (get info) click on the alias, open source location ⌘R (or ⌘⌥^A on older OSs), click on source file (if not highlighted) then ⌘I (get info) , click on folder icon on top left corner, copy ⌘C click on the get-info window you opened for the new folder, click on folder icon on top left corner, paste ⌘V (if not working see ¹ below), close each of these windows with ⌘W place the associated aliased folder into the new folder you can also do this in groups of folders (3-6 seems is optimal).. for example.. move 3 alias icons to clear area on desktop, create 3 new folders and place them below the aliases, select all aliases and ⌘C, open a text document and ⌘V, fix names & name new folders, select new folders, ⌘I, select target aliases, ⌘R, ⌘I for each, move the alias windows below the new folder windows, copy/paste icons from source to new file, close these windows, place alias folders into new folders ¹ if paste function not working.. move on to the next folder and come back.. it can be moody, if it's not working at all.. restart the computer note2: some icons now have a yellow streak at the bottom let us know if you have any solutions or workarounds, or can code this (provide a script or app)
4
0
307
Aug ’24
vnop_advlock not being called for my filesystem
When running AJA System Test for my custom filesystem, the write and read tests get stuck intermittently. I didn't observe any error codes being returned by my vnop_read/write or sock_receive/send functions. Dtrace(1)'ing the vnops being called by AJA System Test for smbfs revealed that amongst other things vnop_advlock is being called: 0 -> smbfs_vnop_advlock ajasystemtest -> smbfs_vnop_advlock(ajatest.dat, op: 0x2, fl->l_start: 0, fl->l_len: 0, fl->l_pid: 0, fl->l_type: 2, fl->l_whence: 0, flags: 0x40, timeout: 0) 0 <- smbfs_vnop_advlock ajasystemtest -> smbfs_vnop_advlock(ajatest.dat) -> -1934627947504 op: 0x2 #define F_SETFD 2 /* set file descriptor flags */ fl->l_len: 0 ;len = 0 means until end of file fl->l_type: 2 ;#define F_UNLCK 2 /* unlock */ fl->l_whence: 0 ;#define SEEK_SET 0 /* set file offset to offset */ flags: 0x40 ;#define F_POSIX 0x040 /* Use POSIX semantics for lock */ As my filesystem didn't implement vnop_advlock, I thought I'd explore that avenue. My vnop_advlock simply returns KERN_SUCCESS. Both f_capabilities.valid and f_capabilities.capabilities of struct vfs_attr have VOL_CAP_INT_ADVLOCK and VOL_CAP_INT_FLOCK set. Yet, vnop_advlock doesn't get called for my filesystem when running AJA System Test. Any tips on what could be amiss there would be much appreciated.
4
0
354
Aug ’24
Kext run well on Xcode but kextload failed after archive to others
I was developing kext for use on Apple Silicon Mac, the kext ran well when I put into the app project. However, after I archived the app and installed it on other computers, I got some error messages while doing kextload command. I have no idea what to do, the error messages are as following: "Error domain=KMErrorDomain Code=71 Incompatible architecture: Cannot find arm64e in fat binary. Unsupported Error: one or more extensions are unsupported to load." I run Xcode projects on M2 Pro MAX and I'm sure the other Mac have been closed SIP. If I use the other Mac to run xcode project, the kext works fine too.
1
0
236
Aug ’24
App not releasing memory immediately
Hi Team, We have been working on one image processing app developed using react. In this app we are making the XMLHttpRequests to the server and storing the response in the cache which has around 200MB - 250MB of size. We are tracking the memory footprint using the Xcode instrument tool. While downloading and rendering the data in app the Xcode instrument shows the memory footprint around 800MB - 1000MB. We are assuming that garbage collection is not working as expected or some resources are not released after use and because of this we get this high memory footprint for 200MB - 250MB data. If the data is changed then we are removing the existing data from cache and storing the new data. But here, when we delete the data from cache, it does not release the memory immediately and takes some time of 3 seconds or more. In between this, the memory gets allocated to new data too and that increases the overall memory footprint of the app and in some cases the app is crashing. The maximum memory we have seen is average 1.5GB which varies with the device configuration. When we try the same activity on a safari browser where memory gets released immediately. If an app releases the initial acquired memory while loading new data we see very less app crashes. We need help to understand if there is a way to release the memory immediately to avoid the app crash. To reproduce this scenario, we have created a simple app which creates an array with size of 100MB and checks the memory footprint using the Xcode instrument tool. When we create an array of 100MB size, sometimes it shows the memory footprint peak of around 700MB-800MB and when we clear the array by assigning it with an empty array it releases the memory after 2-3 seconds. Created an array and then removed it and after removal of the array, created a new array of the same size immediately and again removed it. Because the memory is not released in time, if you repeat these steps a few times the app memory footprint will increase and that crashes the app. cache-memory.txt
2
0
181
Aug ’24
Bluetooth peripheral failed to connect with status=702
Hello, I'm troubleshooting why my custom Bluetooth peripheral won't connect to my iPad. My Bluetooth peripheral is named "0471". I installed the Bluetooth profile and exported the system diagnostic logs from the iPad to troubleshoot the connection. Here are the relevant system logs from my iPad. 0471 connecting: default 2024-08-05 13:28:53.664196 -0500 bluetoothd Device connecting - {cbuuid: 0BB0FBE0-F708-23DD-B310-E487518668BE, devicename: Reader 0471, result: 0, adv-addr: 4C:5B:B3:85:CD:D6-Public, resolved-addr: } 0471 failure to connect: default 2024-08-05 13:28:53.987319 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 default 2024-08-05 13:28:59.673271 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 default 2024-08-05 13:29:08.684653 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 Another connecetion attempt to 0471 default 2024-08-05 13:29:18.985399 -0500 bluetoothd Device connecting - {cbuuid: 0BB0FBE0-F708-23DD-B310-E487518668BE, devicename: Reader 0471, result: 0, adv-addr: 4C:5B:B3:85:CD:D6-Public, resolved-addr: } 0471 failed to connect again default 2024-08-05 13:29:24.993122 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 default 2024-08-05 13:29:27.449115 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 default 2024-08-05 13:29:33.992337 -0500 bluetoothd handleConnectionCompleteCallback address=Public 4C:5B:B3:85:CD:D6 handle=0x0 status=702 connectionIsActive=0, wakeupEvent=0 State dump of 0471 default 2024-08-05 13:30:52.056771 -0500 bluetoothd statedump: 0BB0FBE0-F708-23DD-B310-E487518668BE → Public 4C:5B:B3:85:CD:D6, Adv.Name: "Reader 0471", LastSeen: 71.12s ago, CoexPriority: 2, DIS:Unavailable, EstablishedFastLeConnection:N, linkReadyDuration:0ms (added to WL 0.000 ago) disableDisconnect:0 useCase:23 scanDutyCycle screenON:0 screenOFF:3 pendingDelete:0 type:Other FindMy: default 2024-08-05 13:30:52.073019 -0500 bluetoothd statedump: 0BB0FBE0-F708-23DD-B310-E487518668BE → Public 4C:5B:B3:85:CD:D6, Adv.Name: "", LastSeen: 22881591 What does handleConnectionCompleteCallback's status 702 mean? Any leads on why the connection failed?
4
0
358
Aug ’24
Eye tracking data access for researchers
Hi, Is there a way for researchers to get or request access to eye tracking data from the Apple Vision Pro within the boundaries of the app to be developed? I'm currently involved in research where access to eye tracking data would be beneficial (I'm aware of many existing discussions about this, but I was still wondering if there might be an option, particularly for research labs.) Thank you for your answer.
1
0
265
Aug ’24
Can a Live Caller ID server supply live data or must it be static?
With the Live Caller ID example server, the caller lookup dataset is defined in an input.txtpd and processed by running a ConstructDatabase command which creates a block.binpb and an identity.binpb file. In other words, a static input file is being processed into static block and identity files. However, in the real world, the data content for identified and blocked numbers is something which is in a constant state of flux and evolution, as new numbers becoming available, old ones become stale, numbers which were initially considered safe change into being considered malicious etc. etc. Is the example server just that, merely an example using fixed datasets, and an actual production server is able to use live every changing data to formulate its response back to the iPhone OS query? Here's a concrete use case - suppose it's a requirement to permit US nanp numbers but to block anything else. The total number of non US nanp numbers is so large and ever changing that it would be unfeasible to attempt to capture them in an input.txtpd file and then process that, and then to re-capture and re-process it endlessly. Instead what would be required is the ability for the Live Caller ID server to evaluate at query time, using a regular expressions for example, if a number is nanp or not. Is this possible?
1
1
280
Aug ’24