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

Posts under Core OS subtopic

Post

Replies

Boosts

Views

Activity

Core OS Resources
General: DevForums subtopic: App & System Services > Core OS Core OS is a catch-all subtopic for low-level APIs that don’t fall into one of these more specific areas: Processes & Concurrency Resources Files and Storage Resources Networking Resources Network Extension Resources Security Resources Virtualization Resources Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
311
Aug ’25
How to install cocoapods and pod
Hi, I am developing IOS(Android App) with React Native. I am very confused about cocoapods and pod and how to correctly install it on my new Macbook Pro M4. I am not using bash but I am using zsh. Note, actuallywhich pod return nothing During the preparation of my environment, it say CocoaPods is one of the dependency management system available for iOS. CocoaPods is a Ruby gem. You can install CocoaPods using the version of Ruby that ships with the latest version of macOS. the web site show two commands gem install cocoapods sudo gem install cocoapods I saw another command as well brew install cocoapods During different processes, I experienced several time the following error (Command 'pod install failed) Command pod install failed. └─ Cause: pod install --repo-update --ansi exited with non-zero code: 1 Then I am confused about cocoapods and pod. Are both he same? With my previous MacBook pro, I spend time to install cocoapod on my profile because Ruby was not the latest version on the system. But apparently, on my new Macbook Pro M4, the command ruby -v return (as well) ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin25] The current stable version is 4.0.0. I bought a new macbook pro M4 and I reinstalled node and all package for Rect Native 0.81 a expo 54 excepted cocoapods. Now, I need to configure the push notification and it's time to install cocoapods as it's require here But on my new macbook pro, I would like to make sure I do it correctly and I kindly ask your help and recommandation to install Ruby and cocoapods/pod Q1: Should I install cocoapods with brew install cocoapods or gem install cocoapods? Q2: what's is the difference or the common point with cocoapods and pod? Cocoapod web site said If using the default Ruby included with macOS, installation will require you to use sudo when installing gems As ruby -v print 'ruby 2.6.10p210', I suppose, I should not install cocoapod with sudo You can use a Ruby Version manager such as RVM or rbenv to manage multiple Ruby versions, or you can use Homebrew to install a newer Ruby with brew install ruby. As far I understand, I should not install cocoapods with the Ruby version of the system, then I suppose the command Q3: Will 'brew install cocopads' install the latest version on my profile? Will it upgrade the system version Q4: What will do the command brew install rbenv ruby-build rbenv install 3.2.2 (or better: rbenv install 4.0.0) in comparison with brew install ruby My guess I suppose that the following will help, but it would nice if you could correct me and clarify # All should be done in my profile brew install rbenv ruby-build echo 'eval "$(rbenv init - bash)"' >> ~/.zprofile source ~/.zprofile rbenv install 4.0.0 # rbenv global 4.0.0 # What is it? ruby -v gem install cocoapods Q5: But then, what about pod and the error message Command pod install failed. As you can see, I am a bit confused and I would appreciate your clarification I thanks you for your help and clarification and I wish you a happy new years
1
0
26
3m
[Matter] Device cannot be commissioned to Google Home through iOS
Hi, We are facing the issue of commissioning our Matter device to google home through iOS device will be 100% failed. Here is our test summary regarding the issue: TestCase1 [OK]: Commissioning our Matter 1.4.0 device to Google Nest Hub 2 by Android device (see log DoorWindow_2.0.1_Google_Success.txt ) TestCase2 [NG]: Commissioning Matter 1.4.0 device to Google Nest Hub 2 by iPhone13 or iPhone16 (see log DoorWindow_2.0.1_Google_by_iOS_NG.txt ) TestCase3 [OK]: Commissioning our Matter 1.3.0 device to Google Nest Hub 2 by iPhone13 In TestCase2, we noticed that device was first commissioned to iOS(Apple keychain) then iOS opened a commissioning window again to commission it in Google’s ecosystem, and the device was failed at above step 2, so we also tried: Commissioning the device to Apple Home works as expected, next share the device to Google Home app on iOS, this also fails. Commissioning the device to Apple Home works as expected, next share the device to Google Home app on Android, this works as expected and device pops up in Google home of iOS as well. Could you help check what's the issue of TestCase2? Append the environment of our testing: NestHub 2 version Google Home APP version
0
0
48
1d
issue with iconv() on macOS using "WCHAR_T//TRANSLIT"
Hello, I am working on a cross‑platform application that uses libiconv to convert strings to/from Unicode. I need to modify the existing code for compatibility with macOS. However, the call to iconv() fails with an unclear errno value (92) when using "WCHAR_T": std::wstring ConvertToWchar(const std::string& iconvCodeSet, const std::string_view str) { iconv_t conv = iconv_open("WCHAR_T//TRANSLIT", iconvCodeSet.c_str()); if (conv == (iconv_t)-1) { std::cerr << "iconv_open() failed" << std::endl; return {}; } std::wstring out(str.size(), L'\0'); auto inPtr = (char*)str.data(); size_t inSize = str.size(); auto outPtr = (char*)out.data(); size_t outSize = out.size() * sizeof(wchar_t); if (iconv(conv, &inPtr, &inSize, &outPtr, &outSize) == (size_t)-1) { std::cerr << "iconv() failed. errno = " << errno << std::endl; return {}; } if (iconv(conv, nullptr, &inSize, &outPtr, &outSize) == (size_t)-1) { std::cerr << "iconv() failed. errno = " << errno << std::endl; return {}; } iconv_close(conv); return out; } int main() { std::string str1((const char*)u8"ΟΔΥΣΣΕΥΣ"); std::wstring str2 = ConvertToWchar("UTF-8", str1); if (str2.empty()) return 1; std::cout << "converted" << std::endl; return 0; } Using "UTF-32" works fine, but "WCHAR_T//TRANSLIT" fails. What is the recommended way to convert wchar_t strings using libiconv? Why does the conversion fail with "WCHAR_T//TRANSLIT"? Thank you in advance!
0
0
59
1d
CoreNFC ISO7816: provisioning profile doesn’t match entitlements for readersession.formats / iso7816.select-identifiers + NFCError 104 “Tag is not connected”
Hi all, I’m building an iOS app that uses CoreNFC to communicate with a YubiKey 5C NFC over ISO14443 / ISO7816 and send APDUs (e.g. select an applet by AID). Environment • Device: iPhone 13 Pro Max • iOS: 18.6.2 • Xcode: 26.1.1 (17B100) • API: NFCTagReaderSession(pollingOption: .iso14443) using NFCTag.iso7816 What I’m trying to do 1. Start NFCTagReaderSession(.iso14443) 2. Detect tag → connect 3. Send ISO7816 APDUs (SELECT AID, etc.) Issue A — Entitlements / signing If I add ISO7816-related NFC entitlements, Xcode fails signing with an error like: • “Provisioning profile … doesn’t match entitlements file value for com.apple.developer.nfc.readersession.formats” When I inspect the generated .mobileprovision, I only see something like: • com.apple.developer.nfc.readersession.formats = [NDEF, TAG, PACE] …and I do not see an ISO7816 / select-identifiers entitlement (and the Developer portal UI doesn’t appear to let me enable it). Questions: 1. Is ISO7816 access under com.apple.developer.nfc.readersession.formats restricted and requires Apple approval? If yes, what’s the correct request process? 2. Is com.apple.developer.nfc.readersession.iso7816.select-identifiers required for sending ISO7816 APDUs? If yes, how do developers obtain it / enable it for an App ID + provisioning profiles? 3. What is the Apple-supported way to configure entitlements/profiles for CoreNFC ISO7816 APDU communication with a token like a YubiKey? Issue B — Runtime NFC error Separately (even when I can run), I intermittently/consistently get: • NFCError Code=104 (“Tag is not connected”) This occurs after the tag is detected/connected when trying to establish a session or send APDUs. I’ve verified: • No phone case interference • Correct placement • Consistent detection “tick” from the phone for "Ready to Scan" prompt after tapping YubiKey 5C NFC device. If helpful, I can share: • A minimal sample project • The exact entitlements I tried • Console logs around the Code 104 failure Thanks!
0
0
41
1d
Post-iOS update crash on app launch with split/black screen (Flutter + WebView)
Hi all. Thanks in advance for any guidance you’re able to offer. We’ve had an issue reported by multiple customers where, following an iOS update, our app crashes on the next launch. When this happens, users briefly see a split screen: half of the view shows the app background, while the other half is completely black. After this point, the app is unusable. Here’s what we’ve uncovered so far during our investigation: We believe this occurs when a user is already signed into the app at the time they install the iOS update. For context, we intentionally do not force users to log out of the app, as it’s primarily used for customer support and assistance. This is a firm business decision and not something we plan to change. We suspect the issue is related to our Flutter WebView and how it restores or reloads session state following an iOS update. In the past, updating the Flutter version has resolved similar issues, but we are currently on the latest available version. Once the half-screen issue occurs, all app functionality is blocked. At present, the only workaround is for the user to delete and reinstall the app. The most frustrating part is that this does not affect all users. Some customers have updated to iOS 26.2 without any issues at all. We’ve been unable to reproduce the problem internally, despite extensive testing and attempts to force the conditions. That said, our IT Director did experience the issue firsthand on his own device. For our next release, we’re planning to try the following changes, though we won’t know for certain whether they resolve the issue until the update is in the wild. First, disabling iOS state restoration: func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool { return false } func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool { return false } This was recommended to us as it’s apparently a common approach to addressing post-update freezes or broken restore states. Second, detecting an iOS version change and resetting the WebView / Flutter state on first launch after an update: let lastOS = UserDefaults.standard.string(forKey: "lastOSVersion") let currentOS = UIDevice.current.systemVersion if lastOS != currentOS { // Clear WebView data WKWebsiteDataStore.default().removeData( ofTypes: WKWebsiteDataStore.allWebsiteDataTypes(), modifiedSince: Date.distantPast, completionHandler: {} ) // Force Flutter engine restart // OR route user through a native splash/login screen UserDefaults.standard.set(currentOS, forKey: "lastOSVersion") } The idea here is to ensure the WebView and Flutter engine start cleanly after an iOS update, rather than attempting to restore potentially incompatible state. We’d really welcome any ideas, suggestions, or feedback from others who may have encountered something similar. Apologies in advance if any details are vague — I’m not deeply technical, so this is based on the research and guidance we’ve gathered so far. Thanks again for your time and help, Chris Brodier
0
0
37
2d
ipad通过转接口连接上有线网络之后,部分设备无法获取到IP地址
private static func getEthernetIPAddress(from interfaces: [String: String]) -> String? { // 常见虚拟以太网接口名(根据适配器型号可能不同) let poeEthernetInterfaces = ["en2", "en3", "en4", "en5", "eth0", "eth1"] for interfaceName in poeEthernetInterfaces { if let ethernetIP = interfaces[interfaceName], !ethernetIP.isEmpty { return ethernetIP } } return nil }//我们通过该方法去抓取有线网的IP地址,但是有的设备无法抓取到,怎样才能更准确的抓取到有线网络的IP地址
0
0
89
2d
Phone Crashing
Ever since I did the update. My phone has been crashing apps are not opening. It shuts off by itself. It won’t send messages. I’ve never had such a problem before. I cannot get things to send, and my phone won’t answer calls and when IEvery since I did the update. My phone has been crashing apps are not opening. It shuts off by itself. It won’t send messages. I’ve never had such a problem before I cannot get things to send, and my phone won’t answer calls and when I try to answer them, it just won’t end so they go to voicemail.
1
0
38
3d
iOS 26.2 (23C55): DeviceActivity eventDidReachThreshold fires with 0 Screen Time minutes
On iOS 26.2 (23C55), DeviceActivityMonitor.eventDidReachThreshold fires intermittently for a daily schedule (00:00–23:59) even when iOS Screen Time shows 0 minutes for the selected apps that day. This causes premature shielding via ManagedSettings. Environment: iPhone 13 Pro Max, iOS 26.2 (23C55). Event selection: 2 apps. Threshold: 30 minutes. Multiple TestFlight users report the same behavior across various app selections and thresholds. Intermittent (~50% of days); sometimes multiple days in a row. Not observed in testing prior to iOS 26.2. Evidence: sysdiagnose + Screen Time screenshots (with 0 screen time on selected apps) + unified logs show UsageTrackingAgent notifying the extension that “unproductive from activity daily reached its threshold,” followed immediately by ManagedSettings shield being applied (extension reacting to the callback). Filed Feedback Assistant: FB21450954. Questions: Are others seeing this on 26.2? Does it correlate with restarting monitoring at interval boundaries or includesPastActivity settings?
0
1
133
3d
CoreBluetooth drops connection on WatchOS 8.0.1
Since WatchOS 8.0.1 CoreBluetooth drops an active connection if the App goes to background (or back to foreground). This can be reproduced easily with this sample code: Interacting with Bluetooth Peripherals During Background App Refresh If you run the app on the Apple Watch and turn your wrist, an active connection is terminated. In the output window you can read: 2021-10-20 20:22:41.210839+0200 BARBluetooth WatchKit Extension[382:94603] [BluetoothReceiver] disconnected from Sender. The same is the case with my other Watch Apps, that are connecting to BLE devices. As far as I remember, with WatchOS 8.0 everything was fine. Since this occurs even on WWDC21 sample code this must be a bug. Is there a way to fix it for myself, or do I have to wait until it gets fixed by Apple?
4
0
1.2k
4d
watchOS 10.2 Bluetooth in the background often disconnects
My watch APP needs to keep Bluetooth connected with peripherals whether it is in the foreground or background, but the results of my test show that the connection in the background is very unstable, sometimes you can keep the Bluetooth on for a day, but sometimes it will be disconnected 50 times a day, and every time it is disconnected, I will immediately initiate a reconnection, it is certain that there is no problem with the peripheral Bluetooth, because I have another iOS device that has been stably connected to the peripheral, I want to know what causes this instability, and if there is any solution, if someone can provide relevant advice, I will be very grateful
3
1
1k
4d
Can an app launch automatically after watchOS restarts?
Regarding App Update Synchronization During Workout Mode: My watchOS app has workout mode enabled. When I update the app from the App Store on my iPhone while a workout session is active on my Apple Watch, the update does not sync to the watch. Why does this happen, and when can I expect the watch app to be updated? Regarding Automatic App Launch After a Prolonged Shutdown: I would like my watchOS app to launch automatically on my Apple Watch after it has been powered off for an extended period and then turned back on. Is this functionality possible to implement? If not, please provide a definitive answer regarding this capability.
0
0
18
4d
New Virtualization features in macOS Tahoe
I'm pleased to share some significant updates that have recently been released for our Hypervisor and Virtualization frameworks. We've focused on enhancing efficiency, expanding capabilities, and addressing common developer needs. I believe these will be valuable for many of you. Here’s a look at what’s new: Hypervisor Updates We've introduced support for configuring the intermediate physical address (IPA) memory granularity of a VM. This allows for more granular memory mappings, enabling granularity sizes down to 4KB. This is particularly useful for certain specialized device drivers requiring finer memory control. Virtualization Framework Updates More Efficient VM Image Storage with ASIF: We've integrated support for the Apple Sparse Image Format (ASIF). This results in a smaller disk footprint and optimized transfer for VM disk images when using VZDiskImageStorageDeviceAttachment, improving storage efficiency. Custom Network Topologies with vmnet: We've added support for vmnet custom network topologies. This enables more flexible VM-to-VM communication based on logical networks with customized configurations, useful for complex testing or development environments. See VZVmnetNetworkDeviceAttachment to get started. Simplified VM Queue Discovery: It's now easier to discover a VM’s on-process thanks to a new property on VZVirtualMachine. This should aid in development and debugging when interacting directly with the VM's queue. These are some of the key highlights of the first beta, and I'm looking forward to seeing how these improvements will be utilized. I encourage you to explore the documentation for full details on these features.
1
3
413
5d
Bug Exists in the ES_EVENT_TYPE_AUTH_UNLINK Event of System Extensions
System Version: 26.1 Device: M1 Mac Mini Steps to Reproduce: Create a UNIX socket file at /tmp/a.sock Execute the command: ln /tmp/a.sock /tmp/b.sock Execute the command: rm /tmp/b.sock Bug Description: At this point, a bug occurs in the ES_EVENT_TYPE_AUTH_UNLINK event of the system extension. The value returned for message->event.unlink.target->path is /tmp/a.sock, while it is expected to be /tmp/b.sock Reproducibility: 100%
0
0
83
5d
iPadOS 26.x ignores supportedInterfaceOrientations on iPad when device orientation lock is OFF
Environment Device: iPad Air (5th generation, M1) OS Version: iPadOS 26.1 Device Orientation Lock: OFF Stage Manager / Multitasking: Disabled App Mode: Full screen (UIRequiresFullScreen = true) Supported Orientations: iPhone: Portrait + Landscape iPad: Landscape only Description On iPadOS 26.x, when device orientation lock is OFF, iPad apps that support only landscape orientation can be displayed in portrait orientation, even though portrait is explicitly not supported for iPad. This issue: Occurs not only at app launch Can also happen during runtime, such as: Returning to the app from background Unlocking the device Rotating the device while the app is running Switching focus (Control Center, Notification Center, multitasking gestures) When orientation lock is ON, the system consistently respects the app’s supported interface orientations and the issue does not occur. This behavior is a regression in iPadOS 26.x. Expected Behavior Regardless of device orientation lock state: The system should never display an app in an unsupported orientation supportedInterfaceOrientations must always be enforced Physical device orientation should only be applied within supported orientations Actual Behavior With orientation lock OFF: The system can force the app into portrait orientation This happens even though portrait is not listed in UISupportedInterfaceOrientations~ipad The app UI becomes incorrectly laid out or broken With orientation lock ON: Orientation behavior is correct and stable This suggests iPadOS 26.x is allowing device orientation to override supportedInterfaceOrientations during runtime. Info.plist Configuration UIRequiresFullScreen UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
0
0
76
6d
Zsh kills Python process with plenty of available VM
On a MacBook Pro, 16GB of RAM, 500 GB SSD, OS Sequoia 15.7.1, M3 chip, I am running some python3 code in a conda environment that requires lots of RAM and sure enough, once physical memory is almost exhausted, swapfiles of about 1GB each start being created, which I can see in /System/Volumes/VM. This folder has about 470 GB of available space at the start of the process (I can see this through get info) however, once about 40 or so swapfiles are created, for a total of about 40GB of virtual memory occupied (and thus still plenty of available space in VM), zsh kills the python process responsible for the RAM usage (notably, it does not kill another python process using only about 100 MB of RAM). The message received is "zsh: killed" in the tmux pane where the logging of the process is printed. All the documentation I was able to consult says that macOS is designed to use up to all available storage on the startup disk (which is the one I am using since I have only one disk and the available space aforementioned reflects this) for swapping, when physical RAM is not enough. Then why is the process killed long before the swapping area is exhausted? In contrast, the same process on a Linux machine (basic python venv here) just keeps swapping, and never gets killed until swap area is exhausted. One last note, I do not have administrator rights on this device, so I could not run dmesg to retrieve more precise information, I can only check with df -h how the swap area increases little by little. My employer's IT team confirmed that they do not mess with memory usage on managed profiles, so macOS is just doing its thing. Thanks for any insight you can share on this issue, is it a known bug (perhaps with conda/python environments) or is it expected behaviour? Is there a way to keep the process from being killed?
13
0
349
1w
Matter commissioning issue with Matter support extension
My team has developed an app with a Matter commissioner feature (for own ecosystem) using the Matter framework on the MatterSupport extension. Recently, we've noticed that commissioning Matter devices with the MatterSupport extension has become very unstable. Occasionally, the HomeUIService stops the flow after commissioning to the first fabric successfully, displaying the error: "Failed to perform Matter device setup: Error Domain=HMErrorDomain Code=2." (normally, it should send open commissioning window to the device and then add the device to the 2nd fabric). The issue is never seen before until recently few weeks and there is no code changes in the app. We are suspected that there is some data that fail to download from the icloud or apple account that cause this problem. For evaluation, we tried removing the HomeSupport extension and run the Matter framework directly in developer mode, this issue disappears, and commissioning works without any problems.
18
0
678
1w
Howti populate Finder comment from NSFileProviderItemProtocol extendedAttributes
I am trying to populate the Finder comment field from extendedAttributes with the code bellow but it doesn't work. Any idea why ? var extendedAttributes: [String : Data] { var attrs = [String: Data]() let comment = self.caption do { let xmlPlistData = try PropertyListSerialization.data(fromPropertyList: comment as Any, format: .xml, options: 0) attrs["com.apple.metadata:kMDItemFinderComment"] = xmlPlistData } catch { NSLog("Error during plist conversion: \(error)") } return attrs }
1
0
596
1w