Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

"Error handling payment sheet request" with Backyard Bird sample application
After downloading Backyard Birds and following the steps in the section Configure the sample code project (i.e. enabling local StoreKit testing in the scheme). When I run the macOS app from within XCode, the following error occurs. Whenever I try to purchase any item from within the app, I am presented with the following error dialogue: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. This happens after I click the purchase button (i.e. the button that displays the price). The Xcode logs show the following errors: Error handling payment sheet request: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service created from an endpoint was invalidated from this process. UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated from this process.} Type: Error | Timestamp: 2025-09-26 18:05:36.214491+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.app
1
0
63
Sep ’25
Reply to Nearby Interactions, wih camera assistance
so the BluetoothManager.scan... was a hardware problem. now I see {msg:#Warning Error reading file, file://private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist, error:Error Domain=NSCocoaErrorDomain Code=257 The file “com.apple.CoreMotion.plist” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=//private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist, NSURL=file:////private/var/Managed%20Preferences/mobile/com.apple.CoreMotion.plist, NSUnderlyingError=0x14cc64ea0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}} I have the motion privacy tag in the plist for the code doing request camera assistance in the connect handler for the nearby operation.. in setup accessory dump of capabilities direction = false device does not support direction measurement device DOES support camera assistance here is the code logger.info(dump of capabilities direction = (NISession.deviceCapabilities.supportsDirectionMeasurement)); if(!(NISession.d
Sep ’25
Reply to PaperKit: Adding Images is not functional
Should be noted that this doesnt work for both Adding images from Assets or from the PhotoPicker, here are my logs when i try to add from the photopicker: Error acquiring assertion: 59638328 Plugin query method called (501) Invalidation handler invoked, clearing connection (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process.} LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={_LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler, _LSFile=LSDReadService.mm, NSDebugDescription=process may not map database} Attempt to map database failed: permission was denied. This attempt will not be retried. Failed to initi
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
PHPicker fails to load RAW images
We observed that the PHPicker is unable to load RAW images captured on an iPhone in some scenarios. And it is also somehow related to iCloud. Here is the setup: The PHPickerViewController is configured with preferredAssetRepresentationMode = .current to avoid transcoding. The image is loaded from the item provider like this: if itemProvider.hasItemConformingToTypeIdentifier(kUTTypeImage) { itemProvider.loadFileRepresentation(forTypeIdentifier: kUTTypeImage) { url, error in // work } } This usually works, also for RAW images. However, when trying to load a RAW image that has just been captured with the iPhone, the loading fails with the following errors on the console: [claims] 43A5D3B2-84CD-488D-B9E4-19F9ED5F39EB grantAccessClaim reply is an error: Error Domain=NSCocoaErrorDomain Code=4097 Couldn’t communicate with a helper application. UserInfo={NSUnderlyingError=0x2804a8e70 {Error Domain=NSCocoaErrorDomain Code=4097 connection from pid 19420 on anonymousListener or serviceListener UserInfo
7
0
2.9k
Sep ’25
CloudKit Sync with TestFlight
I'm working on a new app with SwiftData and now adding CloudKit Sync. Everything is working fine in the simulator against the development CloudKit Schema. I successfully deployed the schema to production. However, the TestFlight builds fail against production. This is what I see in the logs, but I haven't been able to find info on how to fix it. Help appreciated. CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:](2205): - Never successfully initialized and cannot execute request '' due to error: Error Domain=CKErrorDomain Code=2 CKInternalErrorDomain: 1011 UserInfo={ContainerID=, NSDebugDescription=CKInternalErrorDomain: 1011, CKPartialErrors=, RequestUUID=, NSLocalizedDescription=, CKErrorDescription=, NSUnderlyingError=0x1078e9fe0 {Error Domain=CKInternalErrorDomain Code=1011 UserInfo={CKErrorDescription=, NSLocalizedDescription=, CKPartialErrors=}}} CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1153): : Successfully set up CloudKit integ
1
0
118
Sep ’25
UIDocumentPickerViewController -initForOpeningContentTypes: gives URL to app without permission to read it in Release mode only
I'm using UIDocumentPickerViewController to open a url. Works fine in debug mode but version on the App Store is failing. Code to create the document picker is like: NSArray *theTypes = [UTType typesWithTag:@docxtensionhere tagClass:UTTagClassFilenameExtension conformingToType:nil]; UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc]initForOpeningContentTypes:theTypes]; documentPicker.delegate = self; [self presentViewController:documentPicker animated:YES completion:nil]; So in debug mode this is all gravy. -documentPicker:didPickDocumentsAtURLs: passes back a URL and I can read the file. In release mode I get a URL but my app is denied access to read the file. After inspecting some logging it appears the sandbox is not granting my app permission. error Domain=NSCocoaErrorDomain Code=257 The file “Filename.fileextensionhere” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/private/var/mobile/Library/Mobile Documents/comappleC
9
0
2.3k
Sep ’25
Selecting ~/Library in open panel doesn't give access to ~/Library/Mail
A user of my app brought to my attention that unless they select their ~/Library/Mail folder explicitly in an open panel, they get an error when scanning it inside my app. I can confirm that I also get a permission error when trying to scan it as a subfolder of ~/Library, but not if I select it directly. I'm assuming this is intentional, but it would be nice to have an explanation or some documentation that I can point my users to when they encounter what appears to them as a bug in my app. What makes this matter even more confusing is that selecting a folder in any open panel of an app gives the app access to it for the lifetime of the app, but after restarting the app, access is lost again (unless it has a bookmark to it). This was probably the reason why the user thought that it worked in another app but not in mine. This is the code I use to scan: let openPanel = NSOpenPanel() openPanel.canChooseDirectories = true if openPanel.runModal() == .cancel { return } let enumerator = FileManager.default.enumerato
4
0
126
Sep ’25
FileManager.default.contentsOfDirectory fails with SMB
Hi, I am trying to list the contents of a directory selected by the user using the following code: let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self self.present(documentPicker, animated: true) func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let folderUrl = urls.first else {return} let startAccessingt= folderUrl.startAccessingSecurityScopedResource() guard startAccessing else { print(ERROR) return } defer { if startAccessing { folderUrl.stopAccessingSecurityScopedResource() } } var error : NSError? = nil NSFileCoordinator().coordinate(readingItemAt: folderUrl, error: &error) { (url) in let startAccessing = url.startAccessingSecurityScopedResource() guard startAccessing else { print(ERROR 2) return } defer { if startAccessing { folderUrl.stopAccessingSecurityScopedResource() } } do { let files = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: [.nameK
11
0
3.3k
Dec ’22
Network Extension (App Extension) Not Launching
I'm having a lot of trouble just getting a basic network extension startup, I have a main application that creates the configuration and requests the app extension based network extension to launch. The network extension implements a NEPacketTunnelProvider and the application doesn't receive an error when starting the tunnel but when I inspect the networkextension system logs, I keep getting errors and the network extension itself doesn't appear to start nor does it log anything. log stream --predicate 'subsystem == com.apple.networkextension' neagent: (NetworkExtension) [com.apple.networkextension:] Extension request with extension $(BUNDLE_ID) started with identifier (null) neagent: (NetworkExtension) [com.apple.networkextension:] Failed to start extension $(BUNDLE_ID): Error Domain=NSCocoaErrorDomain Code=4097 connection to service named $(BUNDLE_ID) UserInfo={NSDebugDescription=connection to service named $(BUNDLE_ID)} nesessionmanager: [com.apple.networkextension:] Validation failed - no audit t
4
0
186
Sep ’25
ShieldConfigurationExtension & SwiftData
Hi, I am developing a Screen Time App and I am having issues with the ShieldConfigurationExtension (ShieldConfigurationDataSource). I know this extensions is sandboxed but I should be able to read data from the main app. I am using SwiftData as my database, but I am unable to initialize it in the extensions with an error indicating insufficient file permissions. I have App Group set up and I am able to share data using UserDefaults but that is just inconvenient. Is there any way I could just open the SwiftData in read only mode so that I could display the user some info on the shield? SwiftData Init: private func setupContainer() throws { let schema = Schema([ DogEntity.self, HouseEntity.self ]) // Use app group container if available let config: ModelConfiguration if let containerURL = FileManager.default.containerURL( forSecurityApplicationGroupIdentifier: group.(Bundle.app.bundleIdentifier ?? ) ) { config = ModelConfiguration(schema: schema, url: containerURL.appendingPathComponent(default.sqlite)) } else
1
0
180
May ’25
Reply to iOS folder bookmarks
It was: Error Domain=NSCocoaErrorDomain Code=256 Could not open() the item but then I look in the console: error 00:47:00.954979+0100 kernel Sandbox: BookmarksBench(61956) deny(1) file-write-data /Users/user/Documents/file which reminded me to check the entitlements – turns out I forgot to specify read/write access for user selected files... Fixed that - and everything is good now. Thank you. PS. Quite interesting that that affects secure bookmark creation, but not normal bookmark creation..
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’25
Reply to iOS folder bookmarks
[quote='856443022, DTS Engineer, /thread/797469?answerId=856443022#856443022'] You're testing on iOS, not macOS [/quote] In fact, that was on macOS... Your app never created a security-scoped bookmark Well, the bench UI is flexible, it's a matter of selecting that checkbox in the bench UI.. However, now that I tried it (on Mac) - the create bookmark fails with error.. NSCocoaErrorDomain Code=256 Could not open() the item, specifically this very first step (after the picker): Create with NSURL.BookmarkCreationOptions.withSecurityScope. However, security scoped creation fails at #3. Yep, for me it's failing on 4. tap Create bookmark - if I select withSecurityScope (Mac only) in the UI.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’25
SwiftData migration error: NSCloudKitMirroringDelegate are not reusable
Hello everyone, I used SwiftData for v1 of an app and am now trying to make changes to the schema for v2. I created the v2 schema that adds a property to one of the models. I need to populate the new property so I made a custom migration using didMigrate. However that doesn't seem to matter what I do in the migration because creating the ModelContainer throws an error before didMigrate ever gets called. The error is: Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Instances of NSCloudKitMirroringDelegate are not reusable and should have a lifecycle tied to a given instance of NSPersistentStore.} Higher up in the Xcode output I see things like this (in order): Request 'D25A8CB8-7341-4FA8-B2F8-3DE2D35B5273' was cancelled because the store was removed from the coordinator. BUG IN CLIENT OF CLOUDKIT: Registering a handler for a CKScheduler activity identifier that has already been registered CloudKit setup faile
16
0
1.5k
Aug ’25
Safari App Extension fails to connect to CloudKit daemon (cloudd) with XPC communication errors -- CKErrorDomain Code=6 / NSCocoaErrorDomain Code=4099 – Unable to connect to CloudKit daemon
I'm working on a macOS app with a Safari web extension. I'm trying to share a SwiftData model between devices using CloudKit synchronization. I am able to get synchronization in the main app on the same device, CloudKit sync works correctly — changes appear in the CloudKit Dashboard under com.apple.coredata.cloudkit.zone. However, in the Safari App Extension, data is saved locally and persists across launches, but never syncs to CloudKit. I have followed the recommended practices for configuring the App Group and entitlements, but the issue persists. Questions: Is there an official limitation preventing Safari App Extensions from connecting to the CloudKit daemon (cloudd)? If not, what entitlements or configuration changes are required for a Safari App Extension to successfully sync with CloudKit? Is the xpc_error=159 from bootstrap_look_up() a known sandbox restriction for this extension type? Any guidance from Apple engineers or others who have successfully used CloudKit from a Safari App Extension would be
2
0
132
Aug ’25
NSPersistentCloudKitContainer - Import failed with error: Error Domain=NSCocoaErrorDomain Code=4864
The NSPersistentCloudKitContainer synchronization between core data and iCloud was working fine with phone 15.1. Connected a new iPhone iOS 15.5, it gives error: CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate managedObjectContextSaved:](2504): : Observed context save: - 2022-12-05 13:32:28.377000-0600 r2nr[340:6373] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _importFinishedWithResult:importer:](1245): : Import failed with error: Error Domain=NSCocoaErrorDomain Code=4864 *** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x65, 0x78, 0x61) UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x65, 0x78, 0x61)} CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _importFinishedWithResult:importer:](1245): : Import failed with error: Error Domain=NSCocoaErrorDomain
2
0
1.1k
Aug ’25