Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

SwiftData Error: Failed to find any currently loaded container for Deck)
Problem I was using swift data on my project in what I thought was a not very complex data model and then after I added the delete function it gave me this error and crashed the simulator every time. DataModel import Foundation import SwiftData @Model class Deck { var name: String var cards: String init(name: String, cards: String) { self.name = name self.cards = cards } } And this is where I was fetching the data. DeckView import SwiftUI import SwiftData struct DeckView: View { @State private var showingSheet = false @Environment(.modelContext) var modelContext @Query var decks: [Deck] var body: some View { NavigationStack { ZStack { Color.background .ignoresSafeArea() List { ForEach(decks) { deck in HStack { VStack(alignment: .leading) { Text(deck.name) Text(deck.cards) } Spacer() Button { // Action } label: { Image(systemName: ellipsis.circle) } } } .onDelete(perform: deleteDeck) } .scrollContentBackground(.hidden) } .navigationTitle(Decks) .navigationBarTitleDisplayMode(.automatic) .toolbar { ToolbarItem(
2
0
1.5k
Oct ’23
Thread THClient APIs fails with error, "The connection to service with pid 36689 named com.apple.ThreadNetwork.xpc was invalidated from this process."
iOS version : 15.4.1 xcode : 13.3.1 my code: let threadClient = THClient() threadClient.retrieveAllCredentials { credentials, error in if let credentials = credentials { print( count = (credentials.count)) credentials.forEach { credential in print( networkKey = (String(describing: credential.networkKey))) print( extendedPANID = (String(describing: credential.extendedPANID))) print( borderAgentID = (String(describing: credential.borderAgentID))) print( activeOperationalDataSet = (String(describing: credential.activeOperationalDataSet))) print( networkKey = (String(describing: credential.networkKey))) print( pskc = (String(describing: credential.pskc))) print( channel = (credential.channel)) print( panID = (String(describing: credential.panID))) print( creationDate = (String(describing: credential.creationDate))) print( lastModificationDate = (String(describing: credential.lastModificationDate))) } } } result: 2022-05-09 18:04:29.864501+0900 [36766:2122724] Client: -[THClient connectToXPCService] - connectToXPC
1
0
1.2k
May ’22
CoreData+CloudKit Model Migration Failing
So I've been developing happily with CoreData+CloudKit for a while now, and really haven't run into any issues until this. I've migrated my model a couple of times, and it worked fine, but this was the first time I added a new entity to the model. If I run on a device (any device, iPhone, iPad, Mac via Catalyst), I get a migration error. Here's the entirety of my persistentContainer setup: public var persistentContainer: NSPersistentContainer = { let modelPath = Bundle(for: CoreDataStack.self).url(forResource: Progress, withExtension: momd)! let model = NSManagedObjectModel(contentsOf: modelPath)! let container = NSPersistentCloudKitContainer(name: Progress, managedObjectModel: model) container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { print(storeDescription) fatalError(Unresolved error (error), (error.userInfo)) } }) return container }()And here's the error I'm getting:Callstacks=true}}}CoreData: annotation: : Attempting recovery from error enco
10
0
5.9k
Oct ’23
Error on writing with AVAssetExportSession with iOS 17.0 (21A5291h), works fine in IOS 16
I have these code snippets to take an existing video file, write one additional track to it and then write the result to a new file. let movie = AVMovie(url: fromFileUrl) let mutableMovie = movie.mutableCopy() as! AVMutableMovie (removed some code here that adds another track to the mutableMovie) let exporter = AVAssetExportSession( asset: mutableMovie, presetName: AVAssetExportPresetPassthrough ) exporter!.outputFileType = .mov exporter!.outputURL = newFilePath exporter!.exportAsynchronously {... This works great up to IOS 16, but from IOS 17 beta I get the following errors in the console of XCODE 15 beta 5 <<<< AVAsset >>>> +[AVURLAsset _getFigAssetCreationOptionsFromURLAssetInitializationOptions:assetLoggingIdentifier:figAssetCreationFlags:error:]: AVURLAssetHTTPHeaderFieldsKey must be a dictionary <<<< AVError >>>> AVLocalizedErrorWithUnderlyingOSStatus: Returning error (NSCocoaErrorDomain / 257) status (-12 203) The export then fails with the follo
4
0
1.1k
Sep ’23
Reply to Sharing Extension issues with Files App
Hello, I got some logs: error 12:14:31.339407+0200 Files Failed to request default share mode for fileURL:file:///private/var/mobile/Containers/Shared/AppGroup/9C1A35FD-D1EB-425F-9B5F-2999517B4E4E/File%20Provider%20Storage/LD_28Sep22_121037.dat error:Error Domain=NSOSStatusErrorDomain Code=-10814 (null) UserInfo={_LSLine=1608, _LSFunction=runEvaluator} default 12:14:31.346082+0200 Files defaultShareModeCollaboration for fileURL:file:///private/var/mobile/Containers/Shared/AppGroup/9C1A35FD-D1EB-425F-9B5F-2999517B4E4E/File%20Provider%20Storage/LD_28Sep22_121037.dat = NO default 12:14:31.349231+0200 Files <_SFFPShareCollaborationItem: 0x281c98180> identifier:8F5CE4F8-D9A4-46E8-921D-BBD6E4104AA2, type:0, itemProvider: {types = ( public.file-url, public.url )}, activityItem:file:///private/var/mobile/Containers/Shared/AppGroup/9C1A35FD-D1EB-425F-9B5F-2999517B4E4E/File%20Provider%20Storage/LD_28Sep22_121037.dat, placeholderActivityItem:https://www.apple.com/icloud/, options:(null), sendCopyRepresentation:(nu
Topic: App & System Services SubTopic: General Tags:
Nov ’23
CoreData causing error running Mac App - Is there a way to reset app so it starts fresh?
Yesterday I had issues with my CoreData database for my Multiplatform app which resulted in changes to the schema. I reset the CloudKit version and, on the iOS simulator, had to delete my app and run the code again to get it to work. My issue is with the macOS target. I'm getting the same fatalError (Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134140 Persistent store migration failed, missing mapping model.) when running the macOS app but I can't figure out how to delete it so I can run it fresh like I did with the iOS version. I've found where the application is created (in the Debug directory ultimately within my app's Build directory) and removed them all but when run the newly created application has the same error. Should I move up the directory structure and remove the entire app directory within Xcode/DerivedData or is there another way? Wanted an answer before I do something I can't go back from :) Thanks, Kyra
2
0
2.6k
Nov ’23
SwiftUI ShareLink Exporting Issues with Custom CSV UTType
Hello! I'm working on an app that generates CSV files in memory and allows users to export them through a ShareLink. I am using a custom UTType for my CSV files as .commaSeparatedText exports a .txt file, and a custom UTType was proposed as a workaround here: https://www.hackingwithswift.com/forums/swiftui/sharelink-problem-with-csv-file/21194. The app works on a development build, albeit with a lot of entitlement and sandboxing errors, but fails in production (sideloaded archive). Development errors are as follow: Error acquiring assertion: (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: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <> wit
3
0
2.3k
Oct ’23
The model configuration used to open the store is incompatible with the one that was used to create the store.
I have deleted the app and try to run the Xcode project again. How can I remove this error ? Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=134020 The model configuration used to open the store is incompatible with the one that was used to create the store. UserInfo={NSAffectedObjectsErrorKey=
2
0
1.8k
Oct ’23
Notification Service Extension didn't work correctly
Hello all. I face problem with Notification Service Extension. User mobile receive notification without any problem, payload contain mutable-content:1 inside it ( also, full example of payload is attached ), but, NSE didn't run correctly, also, original content of notification didn't saw ( in case, and there is a crash because of something wrong in app ) I checked device logs, and I see next errors: [*] Mutated notification request is nil, will supress original content; notificationRequest=7019-8D60, error=Error Domain=NSCocoaErrorDomain Code=4097 connection from pid 487 on anonymousListener or serviceListener UserInfo={NSDebugDescription=connection from pid 487 on anonymousListener or serviceListener}, runtime: 0.410339 [*.notificationextension] Service extension connection encountered an error: sessionUUID=88D39801-67DF-4DC7-AA70-2AD7E8634369, error=Error Domain=NSCocoaErrorDomain Code=4099 The connection from pid 505 on anonymousListener or serviceListener was invalidated: client is gone.
3
0
1.3k
Oct ’23
Reply to Xcode 9 - Can't Update Help Book
I worked on my Application. I did NOTHING to change the Help Book except change one small bit of text. I did everything listed in this thread: I deleted the existing version in the Applications folder. I cleared the Help data bases with hiutil -P ~/Library/Caches/com.apple.help.d. I have done this many times before but now with MacOS Sonoma 14.0 I get errors: Received termination response from helpd HPDHelpDataIsTerminating: Shutdown request successfully sent to helpd Unable to clear caches at path: /Users/myname/Library/Containers/com.apple.helpviewer Error: Error Domain=NSCocoaErrorDomain Code=513 “Help Viewer” couldn’t be removed because you don’t have permission to access it. UserInfo={NSUserStringVariant=(Remove), NSFilePath=/Users/myName/Library/Containers/com.apple.helpviewer, NSUnderlyingError=0x600000d90d80 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} Caches not cleared: There was a problem clearing Help Viewer and helpd cache files, see logs for details There is nothing
Oct ’23
Random "duplicate column name" crashes using SwiftData
Hello everyone, I am experiencing a very weird issue. I have a simple relationship between 2 models, that occasionally starts crashing the app, with the following error: error: : Attempting recovery from error encountered during addPersistentStore: 0x282523c60 Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, reason=Cannot migrate store in-place: I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application Support/default.store. SQLite error code:1, 'duplicate column name: Z1POSITIONS', destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, NSUnderlyingError=0x2825c6700 {Error Domain=NSCocoaErrorDomain Code=134110 An error occurre
1
0
1.1k
Oct ’23
Reply to How do I use a Thread Network API in IOS
It works in iOS 17.1 using asynchronous code let extPanIdHex = yourExtPanId if let extPadIdData = Data(hexString: extPanIdHex) { let thClient = THClient() Task { let credentials = try await thClient.credentials(forExtendedPANID: extPadIdData) } } Sinchronous code still has some problems This one doesn't work let thClient = THClient() thClient.retrieveCredentials(forExtendedPANID: extPadIdData) { credentials, error in NSLog() } Returned error Client: -[THClient retrievePreferredCredentials:]_block_invoke - Error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service with pid 396 named com.apple.ThreadNetwork.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service with pid 396 named com.apple.ThreadNetwork.xpc was invalidated from this process.} But this one oddly works let thClient = THClient() thClient.retrieveCredentials(forExtendedPANID: extPadIdData) { credentials, error in let c = thClient NSLog() }
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’23
How to fix NSCloudKitMirroringDelegate unhandled exception after faulty model change
I have a complex data model in development mode, with a large amount of data, using CoreData with CloudKit sync. All worked fine, syncing from a Mac to an iPad Pro, until I made some unwise changes to the model and a couple of relationships. I should have known, but was hurrying and not thinking clearly. The App is not on the App Store: it's for my own use. Records are now not synced to CloudKit: _error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _importFinishedWithResult:importer:]- (1371): : Import failed with error: Error Domain=NSCocoaErrorDomain Code=134421 Import failed because applying the accumulated changes hit an unhandled exception. UserInfo={NSLocalizedFailureReason=Import failed because applying the accumulated changes hit an unhandled exception., NSUnderlyingException=* -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]}_** It seems that there's a queue of faulty (non-matching) updates, which I can find no way of purging. Perhaps I could d
4
0
1.7k
Oct ’23
Can't debug ILMessageFilterExtension
I have an application that filters messages using ILMessageFilterExtension. I have app groups set up and sertificates/profiles. The filtering worked a couple of months ago, but recently I noticed that I can't debug the extension( ILMessageFilterExtension's init() didn't called). When I connect to the Messages process, I get the following errors. What could be the problem? 2023-07-17 19:52:31.450808+0200 MobileSMS[2344:373404] [ServerBag] Checked bag access permission -- allowed? YES {self: , hasMachAccess: YES, hasEntitlements: YES} 2023-07-17 19:52:31.498361+0200 MobileSMS[2344:373407] [AppConfiguration] [com.apple.MobileSMS:F297CBA2-105E-4D38-9EB1-BB09500B39C7] Error when getting current app configuration for action identifier ConversationListFocusFilterAction, error='Error Domain=DNDErrorDomain Code=1007 No current action is available. Supply the caller with the default. UserInfo={NSLocalizedDescription=No current action is available. Supply the caller with the default.}' 2023-07-17 19:52:31.545894+0200 Mo
1
0
1.3k
Oct ’23
How to create an xccovreport from an xcresult bundle.
We are having an issue when trying to view the the coveage report in our merged result bundle Running xccov view --report --only-targets merged.xcresult results in: 09:52:54 Error: Error Domain=XCCovErrorDomain Code=0 Failed to load coverage archive in scheme action '(null)' in result bundle UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action '(null)' in result bundle, NSUnderlyingError=0x7f8ff8714f30 {Error Domain=NSCocoaErrorDomain Code=260 The file “Metadata.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x7f8ff8714930 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}}}} Checking the man page for xccov I was inspired by the idea of extracting the coverage report from the result bundle to try to understand or work around our error. The man xccov page states that If xccov is passed a result bundle directly, it will extract the report or archive implicitly, as part
8
0
4.1k
Oct ’23