Foundation

RSS for tag

Access essential data types, collections, and operating-system services to define the base layer of functionality for your app using Foundation.

Posts under Foundation tag

200 Posts

Post

Replies

Boosts

Views

Activity

Networking Resources
General: Forums subtopic: App & System Services > Networking TN3151 Choosing the right networking API Networking Overview document — Despite the fact that this is in the archive, this is still really useful. TLS for App Developers forums post Choosing a Network Debugging Tool documentation WWDC 2019 Session 712 Advances in Networking, Part 1 — This explains the concept of constrained networking, which is Apple’s preferred solution to questions like How do I check whether I’m on Wi-Fi? TN3135 Low-level networking on watchOS TN3179 Understanding local network privacy Adapt to changing network conditions tech talk TCP and UDP ports used by Apple software products support article Understanding Also-Ran Connections forums post Extra-ordinary Networking forums post Foundation networking: Forums tags: Foundation, CFNetwork URL Loading System documentation — NSURLSession, or URLSession in Swift, is the recommended API for HTTP[S] on Apple platforms. Moving to Fewer, Larger Transfers forums post Testing Background Session Code forums post Network framework: Forums tag: Network Network framework documentation — Network framework is the recommended API for TCP, UDP, and QUIC on Apple platforms. WWDC 2025 Session 250 Use structured concurrency with Network framework — This is a great introduction to the new Network framework API introduced in appleOS 2026. Building a custom peer-to-peer protocol sample code (aka TicTacToe) Implementing netcat with Network Framework sample code (aka nwcat) Configuring a Wi-Fi accessory to join a network sample code Moving from Multipeer Connectivity to Network Framework forums post NWEndpoint History and Advice forums post Wi-Fi (general): How to modernize your captive network developer news post Wi-Fi Fundamentals forums post Filing a Wi-Fi Bug Report forums post Working with a Wi-Fi Accessory forums post — This is part of the Extra-ordinary Networking series. Wi-Fi (iOS): TN3111 iOS Wi-Fi API overview technote Wi-Fi Aware framework documentation Building peer-to-peer apps sample code WirelessInsights framework documentation iOS Network Signal Strength forums post Network Extension Resources Wi-Fi on macOS: Forums tag: Core WLAN Core WLAN framework documentation Secure networking: Forums tags: Security Apple Platform Security support document Preventing Insecure Network Connections documentation — This is all about App Transport Security (ATS). WWDC 2017 Session 701 Your Apps and Evolving Network Security Standards [1] — This is generally interesting, but the section starting at 17:40 is, AFAIK, the best information from Apple about how certificate revocation works on modern systems. WWDC 2025 Session 314 Get ahead with quantum-secure cryptography Available trusted root certificates for Apple operating systems support article Requirements for trusted certificates in iOS 13 and macOS 10.15 support article About upcoming limits on trusted certificates support article Apple’s Certificate Transparency policy support article What’s new for enterprise in iOS 18 support article — This discusses new key usage requirements. Prepare your network environment for stricter security requirements support article — This is primarily of interest to folks developing management software, for example, an MDM server. Technote 2232 HTTPS Server Trust Evaluation Technote 2326 Creating Certificates for TLS Testing QA1948 HTTPS and Test Servers Miscellaneous: More network-related forums tags: 5G, QUIC, Bonjour On FTP forums post Using the Multicast Networking Additional Capability forums post Investigating Network Latency Problems forums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] This video is no longer available from Apple, but the URL should help you locate other sources of this info.
0
0
6.7k
Sep ’26
Is Data.withUnsafeMutableBytes(_:) safe to rely on long-term for C++ interop?
Hi, in our project we use Network.framework, with NWListener and NWConnection, to send and receive data over UDP. We use the receiveMessage(completion:) API, which delivers the data as a Data object. We assign this Data to a property of one of our classes, which we continue to work with after the completion handler returns. We pass that property's bytes to our C++ code (through Swift–C++ interop) using Data.withUnsafeMutableBytes(_:). The C++ code modifies the bytes in place, and we then continue working with the modified Data in Swift. Since nothing else refers to the Data we received, the bytes are modified in place and no copy is made. However, if another Data value shared the same buffer, just calling withUnsafeMutableBytes(_:) would create a copy, whether or not we actually modified the bytes. Our understanding is that this is because the method is declared mutating, so the call itself is treated as a write and copy-on-write makes the buffer unique before the pointer is handed out. We also understand that ResultType : ~Copyable (along with the typed throws(E)) only relaxes the requirements on the closure's return type and doesn't affect this behaviour. We understand this approach is unsafe and that the pointer "should not be stored and used outside of the lifetime of the call to the closure", so we will take care of that. Since the typed-pointer variants of APIs such as Data.withUnsafeBytes were deprecated in Swift 5, we would also like to confirm that withUnsafeMutableBytes(_:), the variant that takes an UnsafeMutableRawBufferPointer, is the intended long-term API and isn't expected to be deprecated in the same way.
5
1
192
6h
Intermittent URLSession timeouts on physical iPhone 15 Pro, but same API works on iPhone 11
Hello Apple Developer Community, I’m developing an iOS application and investigating an unusual, persistent HTTPS connectivity issue. I would appreciate guidance from developers experienced with URLSession, CFNetwork, and iOS networking. Environment Main app: React Native / Expo SDK 57. Independent diagnostic app: native Swift using URLSession with a long-lived ephemeral session. Backend: Node.js/Fastify behind Nginx on a Linux VPS. Affected device: physical iPhone 15 Pro running iOS 27.0.1. Comparison device: physical iPhone 11 running iOS 18.7.8. HTTPS API using a publicly trusted TLS certificate. Observed behavior The iPhone 11 generally communicates reliably with the API when its VPN is disabled. The iPhone 15 Pro experiences intermittent connectivity failures over both Wi-Fi and cellular LTE. Successful requests often complete within 100–300 ms. Failed requests receive no HTTP response and terminate with a timeout after approximately 15 seconds. The issue affects authentication, conversation retrieval, and message sending. It is not limited to chat functionality. What we have tested Replaced Expo Fetch with React Native Fetch. The issue persisted. Built a completely independent native Swift diagnostic app using URLSession. The same issue reproduced. Added X-Request-ID tracing to both Nginx and Fastify. During one native diagnostic run of 20 sequential GET requests, the first seven returned HTTP 401 in approximately 149–200 ms (likely due to an expired access token). The following 13 ended with URLSession error -1001, without any HTTP response. The request IDs for these 13 timed-out requests were absent from the checked Nginx and Fastify logs. A separate manual POST /auth/login also timed out with URLSession error -1001 after 15.6 seconds. NWPathMonitor continued to report satisfied over the cellular interface. URLSessionTaskMetrics for failed requests showed a transaction but lacked DNS, TCP, TLS, and response timing data. The server remained running and successfully handled other requests. We have not yet captured TCP packets during an actual failed request. Therefore, we cannot determine whether the failure occurs during DNS resolution, TCP connection establishment, TLS negotiation, or another stage. Questions What could cause URLSession to intermittently time out on one physical iPhone while another device can reach the same HTTPS endpoint? How should we interpret URLSessionTaskMetrics containing a transaction but no DNS/TCP/TLS timing information? Which additional iOS diagnostics would best identify the stage where the request stalls? Are there known differences in CFNetwork connection handling, DNS resolution, IPv6, or network configuration that would be worth investigating? I’m specifically looking for a systematic way to isolate the root cause rather than rewriting the application. Thank you for your help.
2
0
81
1d
Direct Quick Start migration while excluding app records from iCloud Backup
I am implementing same-platform phone migration for a consumer health-journal app built with Flutter and native Swift integration. Written journal records and profile settings are stored locally in the app’s Documents directory. The app does not use HealthKit, CloudKit or an app-managed iCloud database. The required outcome is: Records transfer during normal direct iPhone-to-iPhone Quick Start. The app keeps those records excluded from iCloud Backup. This does not depend on users manually changing their iCloud Backup settings. We use the public file resource setting: var values = URLResourceValues() values.isExcludedFromBackup = true var directoryURL = journalDirectoryURL try directoryURL.setResourceValues(values)Apple’s Quick Start instructions distinguish direct device-to-device transfer from an iCloud restore. The backup-exclusion documentation describes isExcludedFromBackup as system guidance, but does not clearly state its effect on direct Quick Start migration. Could an Apple engineer please clarify: Does direct Quick Start migrate files inside a directory marked isExcludedFromBackup = true? Is this supported behaviour developers can rely on, and are there relevant iOS-version limitations or requirements to reapply the exclusion after migration? If excluded files do not reliably migrate, is there a public API, entitlement or supported configuration that includes local records in direct Quick Start migration while retaining their exclusion from iCloud Backup? If there is no supported way to achieve this separation within normal Quick Start, could you confirm that limitation so we can provide a separate secure transfer within the app? The health-data context explains the backup restriction; this question concerns supported migration behaviour rather than a request for App Review pre-approval. We have not established a reproducible migration defect. References: https://support.apple.com/en-us/102659 https://developer.apple.com/documentation/foundation/optimizing-your-app-s-data-for-icloud-backup Thank you.
0
0
87
2d
From Bytes to Gigabytes in a readable format
Hi, I’ve been wondering how Apple calculates Gigabytes in Finder, as I haven’t been able to find any function that yields the result shown. I would like to convert 1,303,412,493 Bytes. It says 1.3 GB in the top right corner, which matches my own conversion. let byteCountFormatStyle = ByteCountFormatStyle(style: .file, allowedUnits: .all, spellsOutZero: false, includesActualByteCount: false, locale: Locale.current) let sizeFormatStyle = byteCountFormatStyle.format(Int64(1_303_412_493)) let byteMeasurement = Measurement(value: Double(1_303_412_493), unit: UnitInformationStorage.bytes) let sizeMeasurement = byteMeasurement.formatted(.byteCount(style: .file)) print("sizeFormatStyle: \(sizeFormatStyle), sizeMeasurement: \(sizeMeasurement)")Both are the same: sizeFormatStyle: 1.3 GB, sizeMeasurement: 1.3 GB But how do I arrive at the 1.51 GB figure that appears next to the Byte count? Christian
2
0
318
6d
Has the iOS system adapted to the time zone policy of British Columbia, Canada?
Has the iOS system adapted to the time zone policy of British Columbia, Canada? If the iPhone's system time zone is set to America/Edmonton, what result should the code below return after adapting? [[NSTimeZone systemTimeZone] isDaylightSavingTime] [[NSTimeZone systemTimeZone] secondsFromGMT] [[NSTimeZone systemTimeZone] daylightSavingTimeOffset]
1
0
169
2w
iOS System Language does not change to Albanian or Macedonian
Hello, I’m trying to determine whether Albanian (sq) and Macedonian (mk) are supported as full system display languages on iOS. When I go to: Settings → General → Language & Region → iPhone Language Albanian and Macedonian are not available as system languages. However, both languages appear to have support in other parts of iOS. For example, Apple currently lists Albanian and Macedonian among the supported QuickType keyboard languages. 
https://www.apple.com/in/ios/feature-availability/?utm_source=chatgpt.com I have tested this behavior on: - iOS 16.7 - iOS 17.5 - iOS 26.6.1 - iOS 27.0.1 In all tested versions, I cannot change the iPhone system/display language to Albanian or Macedonian. I would like to clarify: 1. Are Albanian (sq) and Macedonian (mk) officially supported as iOS system/display languages? 2. If they are not supported, is there an official Apple documentation page listing the supported iOS system languages? 3. Is there any API or mechanism available to an app to determine whether a language is supported as a system UI language, as opposed to being supported only for keyboards or other language features? 4. Are there plans to add Albanian and Macedonian as full iOS system languages? I understand that app localization is separate from the iOS system language. Apple documentation explains that an app's localization is determined from the user's preferred languages and the localizations provided by the app. 
https://developer.apple.com/library/archive/qa/qa1828/_index.html?utm_source=chatgpt.com https://developer.apple.com/documentation/foundation/locale/preferredlanguages?changes=_11&utm_source=chatgpt.com I’m specifically asking about Apple's own iOS system UI, not localization of a third-party application. Expected: Selecting Albanian or Macedonian as the iPhone language should make the iOS system UI appear in that language, if the language is supported. Actual: Albanian and Macedonian cannot be selected as the iPhone's system/display language. Could someone from Apple confirm whether this is expected behavior and whether these languages are currently unsupported as full iOS system languages? Thank you.
3
0
246
2w
Title: Security-scoped folder bookmarks after rename or Trash: APFS vs exFAT/FAT32
I’m developing a sandboxed macOS app that needs persistent, read-only access to a user-selected folder. We are observing different behaviour between APFS and FAT32/exFAT after renaming the folder or moving it to Trash. The main problem is that the app can still track the folder while running, but cannot reliably restore the connection or identify its location after relaunch. Environment macOS 27.0.1 (26A434) Xcode 27.1 (27A9269) App Sandbox and user-selected file access enabled Folder selection through SwiftUI fileImporter Bookmark creation: .withSecurityScope and .securityScopeAllowOnlyReadAccess Bookmark resolution: .withSecurityScope The selected items are ordinary folders, not volume roots. Filesystem comparison APFS: the tested workflows appear to work as expected, including restoration after relaunch. exFAT: we have reproduced both bookmark renewal failure after a rename and loss of the “in Trash” classification after relaunch. FAT32: we have observed automatic bookmark renewal failures after a rename. The detailed debugger trace and Trash reproduction below were collected specifically on exFAT. Rename reproduction Select a folder through the system picker. Create and persist a read-only security-scoped bookmark. Resolve the bookmark and start accessing the resolved URL. Retain that URL and keep its security scope active throughout monitoring. Rename the folder in Finder while the app remains running. Attempt to create an updated bookmark for the same folder. The monitor retains an O_EVTONLY directory descriptor. After the rename, F_GETPATH returns the correct new pathname, and runtime identity checks still match the monitored folder. However, creating a bookmark using a URL reconstructed from that new pathname fails. Calling startAccessingSecurityScopedResource() on the reconstructed URL returns false, while the original resolved URL’s scope remains active. The bookmark creation call uses: url.bookmarkData(options: [.withSecurityScope, .securityScopeAllowOnlyReadAccess], includingResourceValuesForKeys: nil, relativeTo: nil) Exact failure measured on exFAT LLDB shows that Foundation’s internal open(): Receives the correct new pathname. Uses flags 0, meaning O_RDONLY. Immediately returns -1. Sets errno to 1, EPERM, read immediately on the same thread. The correlated Foundation error reports: NSCocoaErrorDomain Code 256 Could not open() the item: [1: Operation not permitted] This is a failed read-only open during bookmark creation. We have not established which policy causes the EPERM. A log stream filtered for com.apple.sandbox.reporting / violation produced no report during reproduction. We understand that this does not exclude sandbox involvement. We also tested a native CFURL file reference retained from before the rename. It continued to follow the folder and match its identity, but security-scoped bookmark creation from that reference also failed. Reselection works, but requires user intervention Selecting the same renamed folder again through fileImporter allows creation of a new bookmark. That bookmark resolves, is not stale, and restores access after relaunch. Without reselection before quitting, the previously saved bookmark does not restore access to the renamed folder on the next launch. The app reports it as unavailable. Separate Trash reproduction on exFAT Move the monitored folder to Trash using Finder while the app is running. The app correctly identifies the folder as being in Trash. Quit the app, leaving the folder in Trash. Relaunch: the app reports the folder as unavailable. The folder remains in Trash on the same exFAT volume. It has not been restored or permanently deleted. We also encountered failures when inspecting the Trash relationship using FileManager.getRelationship(_:of:in:toItemAt:) with .trashDirectory. We have not established whether these observations share the cause of the rename failure. Questions What is the supported public-API approach to preserve security-scoped folder access across an external rename on exFAT/FAT32, including after relaunch? What should bookmark resolution return for a folder moved to Trash, and how should a sandboxed app distinguish that condition from an unavailable resource after relaunch? Are these expected filesystem limitations, problems in our API usage, or behaviours that should be reported as macOS bugs? What additional diagnostics would help distinguish them? Ideally, the solution would preserve the original folder authorization without requiring repeated reselection or access to the parent directory or entire volume. I have read Accessing files from the macOS App Sandbox. I also found this discussion of bookmark failures involving exFAT, but it concerns volume roots and an earlier macOS release, so I’m not assuming it explains our case.
4
0
320
3w
APFS worse than HFS for SSD file enumeration
A user of my app reported that it is slower when enumerating a large number of files on APFS compared to HFS+. Online I can only find information that this is expected for rotational hard disks, but apparently APFS should be optimized for SSDs and hence the observed performance doesn't make sense. I used the code below to enumerate a folder hierarchy with about 100'000 files. I ran it several times on both APFS and HFS+ to minimize differences due to caching. On APFS the last runs took about 4.5 seconds, while on HFS+ the last runs took about 1.3 seconds. How can this big difference be explained? Is APFS really slower than HFS+ when enumerating files on SSDs? let openPanel = NSOpenPanel() openPanel.canChooseDirectories = true openPanel.canChooseFiles = false if openPanel.runModal() == .cancel { return } let resourceKeys: [URLResourceKey] = [.isDirectoryKey, .fileSizeKey, .creationDateKey, .contentModificationDateKey, .fileIdentifierKey, .isSymbolicLinkKey, .isHiddenKey, .isUserImmutableKey, .attributeModificationDateKey] let enumerator = FileManager.default.enumerator(at: openPanel.urls[0], includingPropertiesForKeys: resourceKeys) { url, error in print(error) return true }! let date = Date() var i = 0 for case let url as URL in enumerator { let _ = try? url.resourceValues(forKeys: Set(resourceKeys)) i += 1 if i % 10000 == 0 { print(i) } } print(-date.timeIntervalSinceNow)
0
0
209
3w
Inconsistent caseInsensitiveCompare behavior
(lldb) p [@"ΗΙzzz" caseInsensitiveCompare:@"ᾚabc"] (long long) -1 (lldb) p [@"ᾚabc" caseInsensitiveCompare:@"ΗΙzzz"] (long long) -1 Note the unicode char in the second string. The results can't be both -1, afaik, if one is -1 the other one should be +1. This causes inconsistent indexing in a sorted array resulting in obscure crashes of my app. Am I doing something wrong? Tested on iOS 27 and macOS 26.6.
6
0
283
3w
NSURL appends '..' path component on returned url from URLByDeletingLastPathComponent which seems to contradict the documentation
The documentation for URLByDeletingLastPathComponent states the following: If the receiver’s URL represents the root path, this property contains a copy of the original URL. Otherwise, if the original URL has only one path component, this property contains the empty string. So maybe this is new in Foundation with the Golden Gate or maybe I just noticed this but the documentation above doesn't seem to be true. This will create an infinite loop: NSURL *fileURL = [NSURL fileURLWithPath:@"/Users/MyUsername/Desktop/AFolder" isDirectory:YES]; NSLog(@"%@",fileURL); NSURL *ancestorURL = fileURL.URLByDeletingLastPathComponent; while (ancestorURL != nil) { NSURL *nextAncestor = ancestorURL.URLByDeletingLastPathComponent; NSLog(@"Next: %@",nextAncestor); if ([nextAncestor isEqual:ancestorURL]) { NSLog(@"Hit the root - got a copy of the same url"); break; } else if ([nextAncestor.absoluteString isEqualToString:@""] || [nextAncestor.path isEqualToString:@""]) { NSLog(@"Empty string means we had only 1 path component."); break; } else if (nextAncestor == nil) { NSLog(@"Got nil"); break; } ancestorURL = nextAncestor; } The infinite loop can be avoided by adding the following condition: else if (nextAncestor.pathComponents.count == 1) { // One path component. NSURL *sneakPeak = nextAncestor.URLByDeletingLastPathComponent; NSLog(@"%lu",sneakPeak.pathComponents.count); // Logs 2. break; } When you get to one path component URLByDeletingLastPathComponent appends a .. path component rather than deleting a path component or returning a copy of the receiver or a url with an empty string.. If this sounds like a bug let me know. When I call URLByDeletingLastPathComponent on a url with only one path component I'd like to get nil. I think that would be a cleaner design.
5
0
670
Sep ’26
Does identifierForVendor (IDFV) change after transferring an app to another Apple Developer account?
Title: Does identifierForVendor (IDFV) change after transferring an app to another Apple Developer account? We are planning to transfer an existing App Store app from one Apple Developer account/team to another using App Transfer. The app currently uses: UIDevice.current.identifierForVendor as one of the identifiers sent to our backend. We would like to confirm the exact behavior of identifierForVendor after the app is transferred to the recipient developer account. Our scenario is: The app is currently published under Developer Team A. Existing users already have the app installed on their devices. We transfer the app to Developer Team B through App Store Connect. Developer Team B creates new certificates/provisioning profiles and publishes a new version of the same app. Existing users update the app normally from the App Store, without uninstalling it. Questions: After an existing user updates from the last version published by Team A to the first version published by Team B, will UIDevice.current.identifierForVendor remain the same, or will it be regenerated? Is the vendor used to calculate IDFV associated with: the App Store app record, the Bundle ID, the Team ID, the App ID Prefix, the developer organization/vendor, or some other value? Does App Transfer itself cause IDFV to change, or does the value only change under specific conditions such as changing the organization name or uninstalling all apps from the same vendor? If IDFV changes after App Transfer, does Apple provide any official migration or mapping mechanism that allows the backend to associate the old IDFV with the new IDFV? For example, Sign in with Apple provides a user migration mechanism when transferring an app between developer teams. Is there any equivalent mechanism for identifierForVendor? Is there any difference between: users who update the app directly after the transfer, and users who uninstall the old version and reinstall the app after the transfer? We have reviewed the documentation for identifierForVendor and App Transfer, but we could not find an explicit statement describing the IDFV behavior specifically for an App Transfer between two different developer teams. Our main concern is maintaining backend device associations for existing users after the transfer. We would appreciate an official clarification on whether IDFV continuity is guaranteed across App Transfer, and if not, what migration strategy Apple recommends.
1
0
434
Sep ’26
How does font caching / resources for each app work?
I'm a font developer. In the development process, I will revise a font and overwrite the OTF file that is currently enabled (registered) with macOS. If I then launch an app, it will immediately use the revised version of the font; while apps that are already loaded will continue to use the old version. This suggests that each app is loading new and separate font data, rather than getting it from some existing cache in memory. Yet macOS does have a "font cache" of some sort. Some apps, like TextEdit, seem to only load the fonts that they need to use. However, other apps, like Pages, load every enabled (registered) font on the OS!! (According to the Open Files list in Activity Monitor.) Given that /System/Library/Fonts/ is 625 Mb, and we can't disable any of it, isn't that a lot of data to be repeating? How many fonts is too many fonts? I can't find much documentation about the process.
7
0
2.1k
Sep ’26
Xcode Version 27 Localised strings not recognised
Hello When compiling a project containing localised file strings for dictionaries with the new release Xcode version 27, I receive an error as the compiler expect a plist instead of the string! validation failed: Couldn't parse property list because the input data was in an invalid format The Xcode version 26… did work fine I did file a Feedback Assistant FB24806196 Using a MacBook Air Apple silicon
1
0
210
Sep ’26
NSMetaDataQuery and MD-Spotlight Backed APIs Suddenly Stop Working
I'm testing code that uses NSMetadataQuery and I noticed some odd behavior. I run a query where the search scope is set to my Desktop directory. The predicate is set to search for a file name that contains 'we' (display name to be precise: kMDItemDisplayName). And I get no results. So I stop the app from Xcode then I create a new folder on the Desktop and name it we exactly. Then I rerun my app and start the query again - still no results. Unfortunately none of the Spotlight based APIs I'm using report errors. There is no delegate method -queryDidFailWithError: or anything like that. So in another place my app uses the lower level MD prefixed APIs in Core Services to read file metadata and I notice that those APIs are failing as well. Specifically I try to load metadata for a PNG image. I create an MDItemRef via MDItemCreateWithURL (and I do get an MDItemRef). Then I call MDItemCopyAttributes with the MDItemRef and an array of metadata attribute names: CFDictionaryRef fetchedData = MDItemCopyAttributes(mdItem, attributeNames); I step through it in the debugger and fetchedData is NULL. Since there is no error handling APIs available for any of this my app just silently fails. I have Console.app open when I step through MDItemCopyAttributes call in the debugger and this logs out every time: com.apple.spotlightserver Bad checksum on fetch attributes reply from store, 0x123ea456.... FWIW I do not have Spotlight indexing turned off on my system. Also jumping to Finder I'm experiencing the same failures (metadata isn't populating and the Desktop search for we produces no results). Actually on further inspection it looks like all searches are producing no results. Spotlight appears to be in a broken state system wide. I'm pretty sure a system restart will 'fix' it - until it starts occurring again. But for obvious reasons I'd like to avoid releasing a feature in my app that results in this kind of experience. Is there anything I can do on my end to workaround or avoid this issue? And tips or advice would be greatly appreciated.
2
0
544
Sep ’26
Loading User Installed VST3 Plugins While Remaining Sandboxed on MacOS
Hi, I’m developing a native macOS music app intended for the Mac App Store. We already support Audio Units and are investigating VST3 instrument and effect hosting on Apple Silicon. Users would install plugins themselves, typically in: /Library/Audio/Plug-Ins/VST3 ~/Library/Audio/Plug-Ins/VST3 The app would load these third-party plugin bundles using public APIs, such as CFBundleLoadExecutableAndReturnError. Plugins may be signed by developers with different Team IDs. Our app would not download or install them. Is there a supported way to load and execute these bundles while the hosting process remains sandboxed throughout? If so, which APIs and entitlements should we use? Specifically, I’m trying to distinguish permission to read a plugin bundle from permission to load its executable code. Would user selected folder access and security scoped bookmarks cover the sandbox access requirements, or is another mechanism needed? I understand that com.apple.security.cs.disable-library-validation addresses loading code signed by other developers, but does not itself grant sandbox file access. We cannot rely on an Audio Unit compatibility exception that disables the host’s sandbox. App Review Guideline 3.1.1 (https://developer.apple.com/app-store/review/guidelines/#in-app-purchase) explicitly allows Mac App Store apps to host plugins enabled outside the App Store. I’m looking for the supported technical approach under App Sandbox, rather than preapproval for our app. We’re checking this before implementation, so we don’t yet have a failing reproducer. Any relevant documentation, sample code or existing discussion would be appreciated. Thanks, Ben
1
0
585
Sep ’26
Is there an API for detecting if NSMetadataQuery is unavailable for a given URL (as a search scope)?
If the user prohibits Spotlight in System Settings for a given directory and I set that URL as one of the search scopes on an NSMetadataQuery- I believe the query will return no results. Is there an API for detecting Spotlight unavailability? Ideally I would like to display something in the UI for this kind of situation to explain why a feature built on top of this API is not working.
0
0
342
Sep ’26
iOS 26 AX: _UITabButtonAccessibility accessibilityValue → safeSwiftValueForKey → swift_abortRetainUnowned on cold launch (app frames: main only)
We are seeing a hard main-thread abort on iOS 26 during cold launch when VoiceOver (or another accessibility client) is active. about 1–7 seconds after process start. The crashing thread essentially shows only main from the app; the fatal path is entirely in system frameworks. What happens is that UIAccessibility asks for an accessibility value, UIKit.axbundle handles it (on iOS 26.5 we exact-match-symbolicate this to -[_UITabButtonAccessibility accessibilityValue] + 120), then AXCoreUtilities safeSwiftValueForKey reflects a Swift object via Mirror / AttributeGraph. While copying an unowned field, the referent is already gone, so libswiftCore calls swift_abortRetainUnowned and the process dies. Not finding unowned in app source does not contradict this: the reflected object can live in system or SDK Swift state. OS versions in the corpus: iOS 26.5 (23F77), 26.6 (23G71), and 26.6.1 (23G83). All reports load UIKit.axbundle. Launch-to-crash gaps range from roughly 1.4s to 7.3s. Most 26.6 samples share UIKit.axbundle binary UUID 387c6473…; we did not have matching Device Support for that build locally. One iOS 26.5 sample has UIKit.axbundle binary UUID dca69975… and AXCoreUtilities 78a7c163…, both exactly matching local Device Support, so atos on that sample is trustworthy. On that iOS 26.5 sample (filename redacted), the symbolicated path is: VoiceOver / AX → UIAccessibility (_iosAccessibilityAttributeValue → _accessibilityAXAttributedValue → _accessibilityPotentiallyAttributedValueForNonAttributedSelector) → UIKit.axbundle -[_UITabButtonAccessibility accessibilityValue] + 120 → AXCoreUtilities (_AXSafeSwiftValueForKeyTm → safeSwiftValueForKey → _visitValueWithReflection) → AttributeGraph (AGTypeApplyFields2::Visitor::visit_field) → libswiftCore (swift_reflectionMirror_subscript → copyUnownedFieldContents → swift_unknownObjectUnownedLoadStrong → swift_abortRetainUnowned) → App: main only Frame 32 math: runtime 0x2be49b130, slide base 0x2be3cf000, offset 0xCC130 → _UITabButtonAccessibility accessibilityValue + 120. Questions for anyone hitting the same stack: 1.Is there already an Apple Feedback / radar for safeSwiftValueForKey + swift_abortRetainUnowned on iOS 26? crash_ios265_redacted.txt
0
0
719
Aug ’26
Networking Resources
General: Forums subtopic: App & System Services > Networking TN3151 Choosing the right networking API Networking Overview document — Despite the fact that this is in the archive, this is still really useful. TLS for App Developers forums post Choosing a Network Debugging Tool documentation WWDC 2019 Session 712 Advances in Networking, Part 1 — This explains the concept of constrained networking, which is Apple’s preferred solution to questions like How do I check whether I’m on Wi-Fi? TN3135 Low-level networking on watchOS TN3179 Understanding local network privacy Adapt to changing network conditions tech talk TCP and UDP ports used by Apple software products support article Understanding Also-Ran Connections forums post Extra-ordinary Networking forums post Foundation networking: Forums tags: Foundation, CFNetwork URL Loading System documentation — NSURLSession, or URLSession in Swift, is the recommended API for HTTP[S] on Apple platforms. Moving to Fewer, Larger Transfers forums post Testing Background Session Code forums post Network framework: Forums tag: Network Network framework documentation — Network framework is the recommended API for TCP, UDP, and QUIC on Apple platforms. WWDC 2025 Session 250 Use structured concurrency with Network framework — This is a great introduction to the new Network framework API introduced in appleOS 2026. Building a custom peer-to-peer protocol sample code (aka TicTacToe) Implementing netcat with Network Framework sample code (aka nwcat) Configuring a Wi-Fi accessory to join a network sample code Moving from Multipeer Connectivity to Network Framework forums post NWEndpoint History and Advice forums post Wi-Fi (general): How to modernize your captive network developer news post Wi-Fi Fundamentals forums post Filing a Wi-Fi Bug Report forums post Working with a Wi-Fi Accessory forums post — This is part of the Extra-ordinary Networking series. Wi-Fi (iOS): TN3111 iOS Wi-Fi API overview technote Wi-Fi Aware framework documentation Building peer-to-peer apps sample code WirelessInsights framework documentation iOS Network Signal Strength forums post Network Extension Resources Wi-Fi on macOS: Forums tag: Core WLAN Core WLAN framework documentation Secure networking: Forums tags: Security Apple Platform Security support document Preventing Insecure Network Connections documentation — This is all about App Transport Security (ATS). WWDC 2017 Session 701 Your Apps and Evolving Network Security Standards [1] — This is generally interesting, but the section starting at 17:40 is, AFAIK, the best information from Apple about how certificate revocation works on modern systems. WWDC 2025 Session 314 Get ahead with quantum-secure cryptography Available trusted root certificates for Apple operating systems support article Requirements for trusted certificates in iOS 13 and macOS 10.15 support article About upcoming limits on trusted certificates support article Apple’s Certificate Transparency policy support article What’s new for enterprise in iOS 18 support article — This discusses new key usage requirements. Prepare your network environment for stricter security requirements support article — This is primarily of interest to folks developing management software, for example, an MDM server. Technote 2232 HTTPS Server Trust Evaluation Technote 2326 Creating Certificates for TLS Testing QA1948 HTTPS and Test Servers Miscellaneous: More network-related forums tags: 5G, QUIC, Bonjour On FTP forums post Using the Multicast Networking Additional Capability forums post Investigating Network Latency Problems forums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] This video is no longer available from Apple, but the URL should help you locate other sources of this info.
Replies
0
Boosts
0
Views
6.7k
Activity
Sep ’26
Is Data.withUnsafeMutableBytes(_:) safe to rely on long-term for C++ interop?
Hi, in our project we use Network.framework, with NWListener and NWConnection, to send and receive data over UDP. We use the receiveMessage(completion:) API, which delivers the data as a Data object. We assign this Data to a property of one of our classes, which we continue to work with after the completion handler returns. We pass that property's bytes to our C++ code (through Swift–C++ interop) using Data.withUnsafeMutableBytes(_:). The C++ code modifies the bytes in place, and we then continue working with the modified Data in Swift. Since nothing else refers to the Data we received, the bytes are modified in place and no copy is made. However, if another Data value shared the same buffer, just calling withUnsafeMutableBytes(_:) would create a copy, whether or not we actually modified the bytes. Our understanding is that this is because the method is declared mutating, so the call itself is treated as a write and copy-on-write makes the buffer unique before the pointer is handed out. We also understand that ResultType : ~Copyable (along with the typed throws(E)) only relaxes the requirements on the closure's return type and doesn't affect this behaviour. We understand this approach is unsafe and that the pointer "should not be stored and used outside of the lifetime of the call to the closure", so we will take care of that. Since the typed-pointer variants of APIs such as Data.withUnsafeBytes were deprecated in Swift 5, we would also like to confirm that withUnsafeMutableBytes(_:), the variant that takes an UnsafeMutableRawBufferPointer, is the intended long-term API and isn't expected to be deprecated in the same way.
Replies
5
Boosts
1
Views
192
Activity
6h
Intermittent URLSession timeouts on physical iPhone 15 Pro, but same API works on iPhone 11
Hello Apple Developer Community, I’m developing an iOS application and investigating an unusual, persistent HTTPS connectivity issue. I would appreciate guidance from developers experienced with URLSession, CFNetwork, and iOS networking. Environment Main app: React Native / Expo SDK 57. Independent diagnostic app: native Swift using URLSession with a long-lived ephemeral session. Backend: Node.js/Fastify behind Nginx on a Linux VPS. Affected device: physical iPhone 15 Pro running iOS 27.0.1. Comparison device: physical iPhone 11 running iOS 18.7.8. HTTPS API using a publicly trusted TLS certificate. Observed behavior The iPhone 11 generally communicates reliably with the API when its VPN is disabled. The iPhone 15 Pro experiences intermittent connectivity failures over both Wi-Fi and cellular LTE. Successful requests often complete within 100–300 ms. Failed requests receive no HTTP response and terminate with a timeout after approximately 15 seconds. The issue affects authentication, conversation retrieval, and message sending. It is not limited to chat functionality. What we have tested Replaced Expo Fetch with React Native Fetch. The issue persisted. Built a completely independent native Swift diagnostic app using URLSession. The same issue reproduced. Added X-Request-ID tracing to both Nginx and Fastify. During one native diagnostic run of 20 sequential GET requests, the first seven returned HTTP 401 in approximately 149–200 ms (likely due to an expired access token). The following 13 ended with URLSession error -1001, without any HTTP response. The request IDs for these 13 timed-out requests were absent from the checked Nginx and Fastify logs. A separate manual POST /auth/login also timed out with URLSession error -1001 after 15.6 seconds. NWPathMonitor continued to report satisfied over the cellular interface. URLSessionTaskMetrics for failed requests showed a transaction but lacked DNS, TCP, TLS, and response timing data. The server remained running and successfully handled other requests. We have not yet captured TCP packets during an actual failed request. Therefore, we cannot determine whether the failure occurs during DNS resolution, TCP connection establishment, TLS negotiation, or another stage. Questions What could cause URLSession to intermittently time out on one physical iPhone while another device can reach the same HTTPS endpoint? How should we interpret URLSessionTaskMetrics containing a transaction but no DNS/TCP/TLS timing information? Which additional iOS diagnostics would best identify the stage where the request stalls? Are there known differences in CFNetwork connection handling, DNS resolution, IPv6, or network configuration that would be worth investigating? I’m specifically looking for a systematic way to isolate the root cause rather than rewriting the application. Thank you for your help.
Replies
2
Boosts
0
Views
81
Activity
1d
Direct Quick Start migration while excluding app records from iCloud Backup
I am implementing same-platform phone migration for a consumer health-journal app built with Flutter and native Swift integration. Written journal records and profile settings are stored locally in the app’s Documents directory. The app does not use HealthKit, CloudKit or an app-managed iCloud database. The required outcome is: Records transfer during normal direct iPhone-to-iPhone Quick Start. The app keeps those records excluded from iCloud Backup. This does not depend on users manually changing their iCloud Backup settings. We use the public file resource setting: var values = URLResourceValues() values.isExcludedFromBackup = true var directoryURL = journalDirectoryURL try directoryURL.setResourceValues(values)Apple’s Quick Start instructions distinguish direct device-to-device transfer from an iCloud restore. The backup-exclusion documentation describes isExcludedFromBackup as system guidance, but does not clearly state its effect on direct Quick Start migration. Could an Apple engineer please clarify: Does direct Quick Start migrate files inside a directory marked isExcludedFromBackup = true? Is this supported behaviour developers can rely on, and are there relevant iOS-version limitations or requirements to reapply the exclusion after migration? If excluded files do not reliably migrate, is there a public API, entitlement or supported configuration that includes local records in direct Quick Start migration while retaining their exclusion from iCloud Backup? If there is no supported way to achieve this separation within normal Quick Start, could you confirm that limitation so we can provide a separate secure transfer within the app? The health-data context explains the backup restriction; this question concerns supported migration behaviour rather than a request for App Review pre-approval. We have not established a reproducible migration defect. References: https://support.apple.com/en-us/102659 https://developer.apple.com/documentation/foundation/optimizing-your-app-s-data-for-icloud-backup Thank you.
Replies
0
Boosts
0
Views
87
Activity
2d
From Bytes to Gigabytes in a readable format
Hi, I’ve been wondering how Apple calculates Gigabytes in Finder, as I haven’t been able to find any function that yields the result shown. I would like to convert 1,303,412,493 Bytes. It says 1.3 GB in the top right corner, which matches my own conversion. let byteCountFormatStyle = ByteCountFormatStyle(style: .file, allowedUnits: .all, spellsOutZero: false, includesActualByteCount: false, locale: Locale.current) let sizeFormatStyle = byteCountFormatStyle.format(Int64(1_303_412_493)) let byteMeasurement = Measurement(value: Double(1_303_412_493), unit: UnitInformationStorage.bytes) let sizeMeasurement = byteMeasurement.formatted(.byteCount(style: .file)) print("sizeFormatStyle: \(sizeFormatStyle), sizeMeasurement: \(sizeMeasurement)")Both are the same: sizeFormatStyle: 1.3 GB, sizeMeasurement: 1.3 GB But how do I arrive at the 1.51 GB figure that appears next to the Byte count? Christian
Replies
2
Boosts
0
Views
318
Activity
6d
Has the iOS system adapted to the time zone policy of British Columbia, Canada?
Has the iOS system adapted to the time zone policy of British Columbia, Canada? If the iPhone's system time zone is set to America/Edmonton, what result should the code below return after adapting? [[NSTimeZone systemTimeZone] isDaylightSavingTime] [[NSTimeZone systemTimeZone] secondsFromGMT] [[NSTimeZone systemTimeZone] daylightSavingTimeOffset]
Replies
1
Boosts
0
Views
169
Activity
2w
iOS System Language does not change to Albanian or Macedonian
Hello, I’m trying to determine whether Albanian (sq) and Macedonian (mk) are supported as full system display languages on iOS. When I go to: Settings → General → Language & Region → iPhone Language Albanian and Macedonian are not available as system languages. However, both languages appear to have support in other parts of iOS. For example, Apple currently lists Albanian and Macedonian among the supported QuickType keyboard languages. 
https://www.apple.com/in/ios/feature-availability/?utm_source=chatgpt.com I have tested this behavior on: - iOS 16.7 - iOS 17.5 - iOS 26.6.1 - iOS 27.0.1 In all tested versions, I cannot change the iPhone system/display language to Albanian or Macedonian. I would like to clarify: 1. Are Albanian (sq) and Macedonian (mk) officially supported as iOS system/display languages? 2. If they are not supported, is there an official Apple documentation page listing the supported iOS system languages? 3. Is there any API or mechanism available to an app to determine whether a language is supported as a system UI language, as opposed to being supported only for keyboards or other language features? 4. Are there plans to add Albanian and Macedonian as full iOS system languages? I understand that app localization is separate from the iOS system language. Apple documentation explains that an app's localization is determined from the user's preferred languages and the localizations provided by the app. 
https://developer.apple.com/library/archive/qa/qa1828/_index.html?utm_source=chatgpt.com https://developer.apple.com/documentation/foundation/locale/preferredlanguages?changes=_11&utm_source=chatgpt.com I’m specifically asking about Apple's own iOS system UI, not localization of a third-party application. Expected: Selecting Albanian or Macedonian as the iPhone language should make the iOS system UI appear in that language, if the language is supported. Actual: Albanian and Macedonian cannot be selected as the iPhone's system/display language. Could someone from Apple confirm whether this is expected behavior and whether these languages are currently unsupported as full iOS system languages? Thank you.
Replies
3
Boosts
0
Views
246
Activity
2w
Title: Security-scoped folder bookmarks after rename or Trash: APFS vs exFAT/FAT32
I’m developing a sandboxed macOS app that needs persistent, read-only access to a user-selected folder. We are observing different behaviour between APFS and FAT32/exFAT after renaming the folder or moving it to Trash. The main problem is that the app can still track the folder while running, but cannot reliably restore the connection or identify its location after relaunch. Environment macOS 27.0.1 (26A434) Xcode 27.1 (27A9269) App Sandbox and user-selected file access enabled Folder selection through SwiftUI fileImporter Bookmark creation: .withSecurityScope and .securityScopeAllowOnlyReadAccess Bookmark resolution: .withSecurityScope The selected items are ordinary folders, not volume roots. Filesystem comparison APFS: the tested workflows appear to work as expected, including restoration after relaunch. exFAT: we have reproduced both bookmark renewal failure after a rename and loss of the “in Trash” classification after relaunch. FAT32: we have observed automatic bookmark renewal failures after a rename. The detailed debugger trace and Trash reproduction below were collected specifically on exFAT. Rename reproduction Select a folder through the system picker. Create and persist a read-only security-scoped bookmark. Resolve the bookmark and start accessing the resolved URL. Retain that URL and keep its security scope active throughout monitoring. Rename the folder in Finder while the app remains running. Attempt to create an updated bookmark for the same folder. The monitor retains an O_EVTONLY directory descriptor. After the rename, F_GETPATH returns the correct new pathname, and runtime identity checks still match the monitored folder. However, creating a bookmark using a URL reconstructed from that new pathname fails. Calling startAccessingSecurityScopedResource() on the reconstructed URL returns false, while the original resolved URL’s scope remains active. The bookmark creation call uses: url.bookmarkData(options: [.withSecurityScope, .securityScopeAllowOnlyReadAccess], includingResourceValuesForKeys: nil, relativeTo: nil) Exact failure measured on exFAT LLDB shows that Foundation’s internal open(): Receives the correct new pathname. Uses flags 0, meaning O_RDONLY. Immediately returns -1. Sets errno to 1, EPERM, read immediately on the same thread. The correlated Foundation error reports: NSCocoaErrorDomain Code 256 Could not open() the item: [1: Operation not permitted] This is a failed read-only open during bookmark creation. We have not established which policy causes the EPERM. A log stream filtered for com.apple.sandbox.reporting / violation produced no report during reproduction. We understand that this does not exclude sandbox involvement. We also tested a native CFURL file reference retained from before the rename. It continued to follow the folder and match its identity, but security-scoped bookmark creation from that reference also failed. Reselection works, but requires user intervention Selecting the same renamed folder again through fileImporter allows creation of a new bookmark. That bookmark resolves, is not stale, and restores access after relaunch. Without reselection before quitting, the previously saved bookmark does not restore access to the renamed folder on the next launch. The app reports it as unavailable. Separate Trash reproduction on exFAT Move the monitored folder to Trash using Finder while the app is running. The app correctly identifies the folder as being in Trash. Quit the app, leaving the folder in Trash. Relaunch: the app reports the folder as unavailable. The folder remains in Trash on the same exFAT volume. It has not been restored or permanently deleted. We also encountered failures when inspecting the Trash relationship using FileManager.getRelationship(_:of:in:toItemAt:) with .trashDirectory. We have not established whether these observations share the cause of the rename failure. Questions What is the supported public-API approach to preserve security-scoped folder access across an external rename on exFAT/FAT32, including after relaunch? What should bookmark resolution return for a folder moved to Trash, and how should a sandboxed app distinguish that condition from an unavailable resource after relaunch? Are these expected filesystem limitations, problems in our API usage, or behaviours that should be reported as macOS bugs? What additional diagnostics would help distinguish them? Ideally, the solution would preserve the original folder authorization without requiring repeated reselection or access to the parent directory or entire volume. I have read Accessing files from the macOS App Sandbox. I also found this discussion of bookmark failures involving exFAT, but it concerns volume roots and an earlier macOS release, so I’m not assuming it explains our case.
Replies
4
Boosts
0
Views
320
Activity
3w
APFS worse than HFS for SSD file enumeration
A user of my app reported that it is slower when enumerating a large number of files on APFS compared to HFS+. Online I can only find information that this is expected for rotational hard disks, but apparently APFS should be optimized for SSDs and hence the observed performance doesn't make sense. I used the code below to enumerate a folder hierarchy with about 100'000 files. I ran it several times on both APFS and HFS+ to minimize differences due to caching. On APFS the last runs took about 4.5 seconds, while on HFS+ the last runs took about 1.3 seconds. How can this big difference be explained? Is APFS really slower than HFS+ when enumerating files on SSDs? let openPanel = NSOpenPanel() openPanel.canChooseDirectories = true openPanel.canChooseFiles = false if openPanel.runModal() == .cancel { return } let resourceKeys: [URLResourceKey] = [.isDirectoryKey, .fileSizeKey, .creationDateKey, .contentModificationDateKey, .fileIdentifierKey, .isSymbolicLinkKey, .isHiddenKey, .isUserImmutableKey, .attributeModificationDateKey] let enumerator = FileManager.default.enumerator(at: openPanel.urls[0], includingPropertiesForKeys: resourceKeys) { url, error in print(error) return true }! let date = Date() var i = 0 for case let url as URL in enumerator { let _ = try? url.resourceValues(forKeys: Set(resourceKeys)) i += 1 if i % 10000 == 0 { print(i) } } print(-date.timeIntervalSinceNow)
Replies
0
Boosts
0
Views
209
Activity
3w
Inconsistent caseInsensitiveCompare behavior
(lldb) p [@"ΗΙzzz" caseInsensitiveCompare:@"ᾚabc"] (long long) -1 (lldb) p [@"ᾚabc" caseInsensitiveCompare:@"ΗΙzzz"] (long long) -1 Note the unicode char in the second string. The results can't be both -1, afaik, if one is -1 the other one should be +1. This causes inconsistent indexing in a sorted array resulting in obscure crashes of my app. Am I doing something wrong? Tested on iOS 27 and macOS 26.6.
Replies
6
Boosts
0
Views
283
Activity
3w
NSURL appends '..' path component on returned url from URLByDeletingLastPathComponent which seems to contradict the documentation
The documentation for URLByDeletingLastPathComponent states the following: If the receiver’s URL represents the root path, this property contains a copy of the original URL. Otherwise, if the original URL has only one path component, this property contains the empty string. So maybe this is new in Foundation with the Golden Gate or maybe I just noticed this but the documentation above doesn't seem to be true. This will create an infinite loop: NSURL *fileURL = [NSURL fileURLWithPath:@"/Users/MyUsername/Desktop/AFolder" isDirectory:YES]; NSLog(@"%@",fileURL); NSURL *ancestorURL = fileURL.URLByDeletingLastPathComponent; while (ancestorURL != nil) { NSURL *nextAncestor = ancestorURL.URLByDeletingLastPathComponent; NSLog(@"Next: %@",nextAncestor); if ([nextAncestor isEqual:ancestorURL]) { NSLog(@"Hit the root - got a copy of the same url"); break; } else if ([nextAncestor.absoluteString isEqualToString:@""] || [nextAncestor.path isEqualToString:@""]) { NSLog(@"Empty string means we had only 1 path component."); break; } else if (nextAncestor == nil) { NSLog(@"Got nil"); break; } ancestorURL = nextAncestor; } The infinite loop can be avoided by adding the following condition: else if (nextAncestor.pathComponents.count == 1) { // One path component. NSURL *sneakPeak = nextAncestor.URLByDeletingLastPathComponent; NSLog(@"%lu",sneakPeak.pathComponents.count); // Logs 2. break; } When you get to one path component URLByDeletingLastPathComponent appends a .. path component rather than deleting a path component or returning a copy of the receiver or a url with an empty string.. If this sounds like a bug let me know. When I call URLByDeletingLastPathComponent on a url with only one path component I'd like to get nil. I think that would be a cleaner design.
Replies
5
Boosts
0
Views
670
Activity
Sep ’26
Does identifierForVendor (IDFV) change after transferring an app to another Apple Developer account?
Title: Does identifierForVendor (IDFV) change after transferring an app to another Apple Developer account? We are planning to transfer an existing App Store app from one Apple Developer account/team to another using App Transfer. The app currently uses: UIDevice.current.identifierForVendor as one of the identifiers sent to our backend. We would like to confirm the exact behavior of identifierForVendor after the app is transferred to the recipient developer account. Our scenario is: The app is currently published under Developer Team A. Existing users already have the app installed on their devices. We transfer the app to Developer Team B through App Store Connect. Developer Team B creates new certificates/provisioning profiles and publishes a new version of the same app. Existing users update the app normally from the App Store, without uninstalling it. Questions: After an existing user updates from the last version published by Team A to the first version published by Team B, will UIDevice.current.identifierForVendor remain the same, or will it be regenerated? Is the vendor used to calculate IDFV associated with: the App Store app record, the Bundle ID, the Team ID, the App ID Prefix, the developer organization/vendor, or some other value? Does App Transfer itself cause IDFV to change, or does the value only change under specific conditions such as changing the organization name or uninstalling all apps from the same vendor? If IDFV changes after App Transfer, does Apple provide any official migration or mapping mechanism that allows the backend to associate the old IDFV with the new IDFV? For example, Sign in with Apple provides a user migration mechanism when transferring an app between developer teams. Is there any equivalent mechanism for identifierForVendor? Is there any difference between: users who update the app directly after the transfer, and users who uninstall the old version and reinstall the app after the transfer? We have reviewed the documentation for identifierForVendor and App Transfer, but we could not find an explicit statement describing the IDFV behavior specifically for an App Transfer between two different developer teams. Our main concern is maintaining backend device associations for existing users after the transfer. We would appreciate an official clarification on whether IDFV continuity is guaranteed across App Transfer, and if not, what migration strategy Apple recommends.
Replies
1
Boosts
0
Views
434
Activity
Sep ’26
How does font caching / resources for each app work?
I'm a font developer. In the development process, I will revise a font and overwrite the OTF file that is currently enabled (registered) with macOS. If I then launch an app, it will immediately use the revised version of the font; while apps that are already loaded will continue to use the old version. This suggests that each app is loading new and separate font data, rather than getting it from some existing cache in memory. Yet macOS does have a "font cache" of some sort. Some apps, like TextEdit, seem to only load the fonts that they need to use. However, other apps, like Pages, load every enabled (registered) font on the OS!! (According to the Open Files list in Activity Monitor.) Given that /System/Library/Fonts/ is 625 Mb, and we can't disable any of it, isn't that a lot of data to be repeating? How many fonts is too many fonts? I can't find much documentation about the process.
Replies
7
Boosts
0
Views
2.1k
Activity
Sep ’26
Xcode Version 27 Localised strings not recognised
Hello When compiling a project containing localised file strings for dictionaries with the new release Xcode version 27, I receive an error as the compiler expect a plist instead of the string! validation failed: Couldn't parse property list because the input data was in an invalid format The Xcode version 26… did work fine I did file a Feedback Assistant FB24806196 Using a MacBook Air Apple silicon
Replies
1
Boosts
0
Views
210
Activity
Sep ’26
NSMetaDataQuery and MD-Spotlight Backed APIs Suddenly Stop Working
I'm testing code that uses NSMetadataQuery and I noticed some odd behavior. I run a query where the search scope is set to my Desktop directory. The predicate is set to search for a file name that contains 'we' (display name to be precise: kMDItemDisplayName). And I get no results. So I stop the app from Xcode then I create a new folder on the Desktop and name it we exactly. Then I rerun my app and start the query again - still no results. Unfortunately none of the Spotlight based APIs I'm using report errors. There is no delegate method -queryDidFailWithError: or anything like that. So in another place my app uses the lower level MD prefixed APIs in Core Services to read file metadata and I notice that those APIs are failing as well. Specifically I try to load metadata for a PNG image. I create an MDItemRef via MDItemCreateWithURL (and I do get an MDItemRef). Then I call MDItemCopyAttributes with the MDItemRef and an array of metadata attribute names: CFDictionaryRef fetchedData = MDItemCopyAttributes(mdItem, attributeNames); I step through it in the debugger and fetchedData is NULL. Since there is no error handling APIs available for any of this my app just silently fails. I have Console.app open when I step through MDItemCopyAttributes call in the debugger and this logs out every time: com.apple.spotlightserver Bad checksum on fetch attributes reply from store, 0x123ea456.... FWIW I do not have Spotlight indexing turned off on my system. Also jumping to Finder I'm experiencing the same failures (metadata isn't populating and the Desktop search for we produces no results). Actually on further inspection it looks like all searches are producing no results. Spotlight appears to be in a broken state system wide. I'm pretty sure a system restart will 'fix' it - until it starts occurring again. But for obvious reasons I'd like to avoid releasing a feature in my app that results in this kind of experience. Is there anything I can do on my end to workaround or avoid this issue? And tips or advice would be greatly appreciated.
Replies
2
Boosts
0
Views
544
Activity
Sep ’26
Loading User Installed VST3 Plugins While Remaining Sandboxed on MacOS
Hi, I’m developing a native macOS music app intended for the Mac App Store. We already support Audio Units and are investigating VST3 instrument and effect hosting on Apple Silicon. Users would install plugins themselves, typically in: /Library/Audio/Plug-Ins/VST3 ~/Library/Audio/Plug-Ins/VST3 The app would load these third-party plugin bundles using public APIs, such as CFBundleLoadExecutableAndReturnError. Plugins may be signed by developers with different Team IDs. Our app would not download or install them. Is there a supported way to load and execute these bundles while the hosting process remains sandboxed throughout? If so, which APIs and entitlements should we use? Specifically, I’m trying to distinguish permission to read a plugin bundle from permission to load its executable code. Would user selected folder access and security scoped bookmarks cover the sandbox access requirements, or is another mechanism needed? I understand that com.apple.security.cs.disable-library-validation addresses loading code signed by other developers, but does not itself grant sandbox file access. We cannot rely on an Audio Unit compatibility exception that disables the host’s sandbox. App Review Guideline 3.1.1 (https://developer.apple.com/app-store/review/guidelines/#in-app-purchase) explicitly allows Mac App Store apps to host plugins enabled outside the App Store. I’m looking for the supported technical approach under App Sandbox, rather than preapproval for our app. We’re checking this before implementation, so we don’t yet have a failing reproducer. Any relevant documentation, sample code or existing discussion would be appreciated. Thanks, Ben
Replies
1
Boosts
0
Views
585
Activity
Sep ’26
Is there an API for detecting if NSMetadataQuery is unavailable for a given URL (as a search scope)?
If the user prohibits Spotlight in System Settings for a given directory and I set that URL as one of the search scopes on an NSMetadataQuery- I believe the query will return no results. Is there an API for detecting Spotlight unavailability? Ideally I would like to display something in the UI for this kind of situation to explain why a feature built on top of this API is not working.
Replies
0
Boosts
0
Views
342
Activity
Sep ’26
iOS 26 AX: _UITabButtonAccessibility accessibilityValue → safeSwiftValueForKey → swift_abortRetainUnowned on cold launch (app frames: main only)
We are seeing a hard main-thread abort on iOS 26 during cold launch when VoiceOver (or another accessibility client) is active. about 1–7 seconds after process start. The crashing thread essentially shows only main from the app; the fatal path is entirely in system frameworks. What happens is that UIAccessibility asks for an accessibility value, UIKit.axbundle handles it (on iOS 26.5 we exact-match-symbolicate this to -[_UITabButtonAccessibility accessibilityValue] + 120), then AXCoreUtilities safeSwiftValueForKey reflects a Swift object via Mirror / AttributeGraph. While copying an unowned field, the referent is already gone, so libswiftCore calls swift_abortRetainUnowned and the process dies. Not finding unowned in app source does not contradict this: the reflected object can live in system or SDK Swift state. OS versions in the corpus: iOS 26.5 (23F77), 26.6 (23G71), and 26.6.1 (23G83). All reports load UIKit.axbundle. Launch-to-crash gaps range from roughly 1.4s to 7.3s. Most 26.6 samples share UIKit.axbundle binary UUID 387c6473…; we did not have matching Device Support for that build locally. One iOS 26.5 sample has UIKit.axbundle binary UUID dca69975… and AXCoreUtilities 78a7c163…, both exactly matching local Device Support, so atos on that sample is trustworthy. On that iOS 26.5 sample (filename redacted), the symbolicated path is: VoiceOver / AX → UIAccessibility (_iosAccessibilityAttributeValue → _accessibilityAXAttributedValue → _accessibilityPotentiallyAttributedValueForNonAttributedSelector) → UIKit.axbundle -[_UITabButtonAccessibility accessibilityValue] + 120 → AXCoreUtilities (_AXSafeSwiftValueForKeyTm → safeSwiftValueForKey → _visitValueWithReflection) → AttributeGraph (AGTypeApplyFields2::Visitor::visit_field) → libswiftCore (swift_reflectionMirror_subscript → copyUnownedFieldContents → swift_unknownObjectUnownedLoadStrong → swift_abortRetainUnowned) → App: main only Frame 32 math: runtime 0x2be49b130, slide base 0x2be3cf000, offset 0xCC130 → _UITabButtonAccessibility accessibilityValue + 120. Questions for anyone hitting the same stack: 1.Is there already an Apple Feedback / radar for safeSwiftValueForKey + swift_abortRetainUnowned on iOS 26? crash_ios265_redacted.txt
Replies
0
Boosts
0
Views
719
Activity
Aug ’26