Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Core Data crash when used in widget extension
I have this very simple PersistenceController setup. It's used in both the main app and widget target. struct PersistenceController { static let shared = PersistenceController() @MainActor static let preview: PersistenceController = { let result = PersistenceController(inMemory: true) let viewContext = result.container.viewContext return result }() let container: NSPersistentContainer /// The main context. var context: NSManagedObjectContext { return container.viewContext } init(inMemory: Bool = false) { container = NSPersistentContainer(name: Gamery) if inMemory { container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: /dev/null) } else { do { let storeURL = try URL.storeURL(forAppGroup: XXXXXXXXXX, databaseName: Gamery) let storeDescription = NSPersistentStoreDescription(url: storeURL) /// Enable history tracking for cloud syncing purposes. storeDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey) print(### Persistent container location: (storeURL)) container.persi
1
0
144
Jul ’25
Reply to Getting a basic URL Filter to work
About 3): Digging further with Console, I saw this error message: NESMURLFilterSession[Wipr:...]: Failed to start with error: 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.} Obviously no clue what this means 🥲 But it seems that the extensions with the NEURLFilterControlProvider cannot even be launched for some reason?
Jul ’25
iCloud sync issues using NSPersistentCloudKitContainer for Core Data + CloudKit sync.
I have tried to set up iCloud sync. Despite fully isolating and resetting my development environment, the app fails with: NSCocoaErrorDomain Code=134060 (PersistentStoreIncompatibleVersionHashError) What I’ve done: Created a brand new CloudKit container Created a new bundle ID and app target Renamed the Core Data model file itself Set a new model version Used a new .sqlite store path Created a new .entitlements file with the correct container ID Verified that the CloudKit dashboard shows no records Deleted and reinstalled the app on a real device Also tested with “Automatically manage signing” and without Despite this, the error persists. I am very inexperienced and am not sure what my next step is to even attempt to fix this. Any guidance is apprecitated.
1
0
189
Jun ’25
error: CoreData+CloudKit: Never successfully initialized and cannot execute request - incomprehensible archive
anyone getting the following error with CloudKit+CoreData on iOS16 RC? delete/resintall app, delete user CloudKit data and reset of environment don't fix. [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:](2044): - Never successfully initialized and cannot execute request ' 41E6B8D6-08C7-4C73-A718-71291DFA67E4' due to 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)}
8
0
2.1k
Jun ’25
Reply to macOS beta 2 -SwiftTranscriptionSampleApp not work
I tried again your sample app with Xcode beta 2 + macOS beta 2 whiteout success. When start record, in console I see this message (note: I'm italian, so I forced language in it_IT): loadRawPromptTemplateFromModelCatalog failed with Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.modelcatalog.catalog was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.modelcatalog.catalog was invalidated: failed at lookup with error 159 - Sandbox restriction.}
Jun ’25
Foundation model sandbox restriction error
I'm seeing this error a lot in my console log of my iPhone 15 Pro (Apple Intelligence enabled): com.apple.modelcatalog.catalog sync: connection error during call: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.modelcatalog.catalog was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.modelcatalog.catalog was invalidated: failed at lookup with error 159 - Sandbox restriction.} reached max num connection attempts: 1 Are there entitlements / permissions I need to enable in Xcode that I forgot to do? Code example Here's how I'm initializing the language model session: private func setupLanguageModelSession() { if #available(iOS 26.0, *) { let instructions = my instructions do { languageModelSession = try LanguageModelSession(instructions: instructions) print(Foundation Models language model session initialized) } catch { print(Error creating language model session: (error)) lang
2
0
212
Jun ’25
XPC Connection Error
I have an accessory with MFi authenticaiton passed(got 0xAA05) and identification accepted (got 0x1D02). But when I try to open the target stream by using iAP2 EA session framework, I always enounter the same error looking like: XPC connection error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.accessories.externalaccessory-server was invalidated from this process. UserInfo={NSDebugDescription=The connection to service named com.apple.accessories.externalaccessory-server was invalidated from this process.} anybody can tell me what it related with? And what can I do to go through it quickly? Thank you much in advance.
1
0
145
May ’25
LaunchAgent can't connect to CloudKit daemon
For this code: let status = try await container.accountStatus() Seeing this error: 2025-05-08 15:32:00.945731-0500 localhost myAgent[2661]: (myDaemon.debug.dylib) [com.myDaemon.cli:networking] Error Domain=CKErrorDomain Code=6 Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error. UserInfo={NSLocalizedDescription=Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error., CKRetryAfter=5, CKErrorDescription=Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and mo
3
0
184
May ’25
Cannot load iTunesLibrary on macOS Sequoia 15.1
I use the iTunes Library framework in one of my apps, starting with macOS Sequoia 15.1 i can't create the ITLibrary object anymore with the following error: Connection to amplibraryd was interrupted. clientName:iTunesLibrary(ITLibraryLoader) Error connecting to the server via proxy object Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.amp.library.framework UserInfo={NSDebugDescription=connection to service named com.apple.amp.library.framework} configure failed: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.amp.library.framework UserInfo={NSDebugDescription=connection to service named com.apple.amp.library.framework} I created a new sandboxed macOS app, added the music folder read permission and it reproduced the error: import SwiftUI import iTunesLibrary @main struct ITLibraryLoaderApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { var body: some View { Button(Load ITLibrary) { loa
3
0
1k
Jan ’25
File transfer issue from iPhone to Watch after iOS 17.5 & WatchOS 10.5 update
After updating to iOS 17.5 & WatchOS 10.5, the didFinish response from WCSessionDelegate does not come when transferring files from iPhone to Watch. It worked normally until 17.4 & 10.4. There is no problem with checking file completion even if a didFinish response is not received, but I think Apple needs to check this issue and update. File transfer is done using the transferFile function of WCSession. The file being transferred is a single file and its size does not exceed 30MB. When you try to transfer Pi, the message below appears in the Xcode log section. -[WCFileStorage persistOutgoingFileTransfer:] error serializing file transfer , transferring: YES> due to Error Domain=NSCocoaErrorDomain Code=4866 Caught exception during archival: This object may only be encoded by an NSXPCCoder. ( 0 CoreFoundation 0x000000019b064f2c 00E76A98-210C-3CB5-930B-F236807FF24C + 540460 1 libobjc.A.dylib 0x0000000192ef6018 objc_exception_throw + 60 2 Foundation 0x0000000199fe7778 3D3A12E3-F5E9-361F-B00A-4A
29
0
6.5k
Nov ’24
iOS 18.4 and getFileProviderServicesForItem
I support a pair of iOS apps that use a file provider extension. One app exposes a file provider extension, including a file provider extension service and the other app interacts with the file provider extension and uses the service. On iOS 18.3 and before, this all works fine. On iOS 18.4, getFileProviderServicesForItem fails when called from the consuming app with: Error Domain=NSCocoaErrorDomain Code=513 The file couldn’t be saved because you don’t have permission. The supportedServiceSources method in the service hosted by the provider app is never invoked when this occurs. Is there some change to the mechanism for iOS 18.4 that I've not found yet?
5
0
347
Apr ’25
"Failed to set up CloudKit integration" in TestFlight build
I'm building a macOS + iOS SwiftUI app using Xcode 14.1b3 on a Mac running macOS 13.b11. The app uses Core Data + CloudKit. With development builds, CloudKit integration works on the Mac app and the iOS app. Existing records are fetched from iCloud, and new records are uploaded to iCloud. Everybody's happy. With TestFlight builds, the iOS app has no problems. But CloudKit integration isn't working in the Mac app at all. No existing records are fetched, no new records are uploaded. In the Console, I see this message: error: CoreData+CloudKit: Failed to set up CloudKit integration for store: (URL: ) Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.cloudd was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.cloudd was invalidated: failed at lookup with error 159 - Sandbox restriction.} I thought it might be that I was missing the com.apple.security.network.client entitlement, but
4
0
3.5k
Apr ’25
Error Domain=NSCocoaErrorDomain Code=4099
My app says it has built successfully but shows the error No bundle URL Present with the following in the log: [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service with pid 90 named com.apple.commcenter.coretelephony.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service with pid 90 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.} Using Xcode 13, and React Native 65.1 on and iOS 15 Iphone 12. Can anyone help? Error log in full: 2021-10-02 15:22:54.660199+0100 myracnative[556:74795] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service with pid 90 named com.apple.commcenter.coretelephony.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service with pid 90 named com.apple.commcenter.coretelephony.xpc was invalidated from this proce
8
0
12k
Feb ’23
Hundreds of StoreKit2 Errors: 4097
So I ran a promo for my app that got me 30k downloads or so. The app was free for a day and so it got lots of purchases. There were two errors from StoreKit2 that I can't explain (I'll detail the other one in another post) This one: StoreKit.StoreKitError.systemError(Error Domain=NSCocoaErrorDomain Code=4097 connection to service with pid 19497 named com.apple.storekitd UserInfo={NSDebugDescription=connection to service with pid 19497 named com.apple.storekitd} There are various theories online that the display name of the purchase could be an issue. Another was that this indicates that this indicates that a helper process has crashed. Generally my guidance was to restart the device and that seemed to resolve it for most if not everyone. But not everyone reached out and it rained bad reviews and I was accused of a bait and switch and so on. Is there any way to mitigate this? Any way to address it? It doesn't happen for everyone but it happens very frequently still.
3
0
778
Dec ’24