Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Be careful changing a widget's "kind" configuration
We are experiencing the same issue with our app. However, for us, it's not caused by changing the kind, but only after an app update in which there were no changes regarding the widget. Just after it updated, the widget turns black in some cases. It also appears black in the widget gallery. Removing and adding it again did not work in this case, only after an iOS restart it works fine again. I am seeing a similar error in console: Content load failed: unable to find or unarchive file for key: [my.bundle.id::my.bundle.id.widget:MyWidget:systemSmall::158.00/158.00/21.60:(null)] on no host. The session may still produce one shortly. Error: Using url `file:///private/var/mobile/Containers/Data/PluginKitPlugin/A1582067-2483-4B92-B1E4-A35F5BBA0DF7/SystemData/com.apple.chrono/placeholders/MyWidget/systemSmall----158.00w--158.00h--21.60r--0f--0.00t-0.00l-0.00b0.00t.chrono-timeline` ... Error Domain=NSCocoaErrorDomain Code=4 Die Datei „systemSmall----158.00w--158.00h--21.60r--0f--0.00t-0.00l-0.00b0.00t.chrono
Topic: App & System Services SubTopic: General Tags:
Mar ’24
Passkeys in AppClip shows intermittently "Couldn't communicate with a helper application."
I have a demo AppClip which does Passkey registration and assertion in a wizard style page collection. Very often, the assertion would fail with the error Couldn't communicate with a helper application. Retrying it few times will eventually work. Full error: Connection to agent service interrupted with error: Error Domain=NSCocoaErrorDomain Code=4097 Couldn’t communicate with a helper application. I don't know exactly what's causing this and how to prevent it? It only seems to happen during assertion, not registration.
1
0
783
Mar ’24
SwiftData fatal error SwiftData.SwiftDataError._Error.loadIssueModelContainer)
Hello everyone, i'm working on an app to make my family life easier. it's was working fine with simple features but now I have added some feature but it's not working on the simulator or on my iPhone. The live preview is working fine... error message is Thread 1: Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer) nothing is very clear in the message except: Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo={entity=Recette, attribute=isApero, reason=Validation error missing attribute values on mandatory destination attribute}}} issue looks to come from my variable var isApero: Bool. Unfortunately I can't see the problem. below my model: import SwiftData @Model final class Recette { // @Attribute(.unique) var creationDate: Date var name: String var type: String var ingredient1: String var ingredient2: String var imageName: String var people1: Bool var people2: Bool var peop
1
0
1.2k
Mar ’24
App doesn't have permission to open files
Here's how my app used to work: On one device, generate a text file with a custom extension. Send it via AirDrop or in Messages to another device. Open the file in another copy of my app. The app processes the data correctly the way I want. Now, when I try to do this, I get this: Error Domain=NSCocoaErrorDomain Code=257 The file “Shopping List.sld” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/Shopping List.sld, NSUnderlyingError=0x282280a50 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/Shopping%20List.sld I think this broke with the iOS 17 upgrade. What permissions or capabilities do I need to add to my app to do that, and how do I go about adding them? I am quite new to xCode and iOS developement, but I had this working before.
1
0
1.8k
Mar ’24
SwiftData+CloudKit,AppGroups Error
I use SwiftData, CloudKit, and App Groups. An error occurs on the first run, but it works on the second run. error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate tearDown:]_block_invoke(792): : Told to tear down with reason: Store Removed error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1192): : Failed to set up CloudKit integration for store: (null) Error Domain=NSCocoaErrorDomain Code=134060 UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.} I don't know why store path is null in error message. I passed the store url and CloudKit database name in ModelConfiguration. static var release: ModelContainer = { do { let schema = Schema(versionedSchema: ModelSchema.self) let appGroupURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group-identifier) let databaseURL = appGroupURL?.appending(path: Database.sqlite) let databaseName = Database let configur
2
0
862
Jan ’24
Reply to Setup LaunchAgent in Xcode
Hey @eskimo :) Thanks for this clarification about notarisation :) Did it crash? Did that generate a crash report? No at all. When I try to run the application I saw these logs: Unable to register Error Domain=SMAppServiceErrorDomain Code=1 Operation not permitted UserInfo={NSLocalizedFailureReason=Operation not permitted} Received XPC error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named W4MF6H9XZ6.com.tonygo.NetworkMonitorApp.group.agent was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named W4MF6H9XZ6.com.tonygo.NetworkMonitorApp.group.agent was invalidated: failed at lookup with error 3 - No such process.} That makes totaly sense as the agent never starts ... I checked with the Console application like I usually did, but I see no messages. I put all my last changed on this branch: https://github.com/tony-go/NetworkMonitor/tree/sma-app-service
Feb ’24
Encountering Error Domain=NSCocoaErrorDomain Code=513 while creating hard link between files on MacOS(Mac Catalyst App)
Hi, I am trying to create a hard link on MacOS(Mac Catalyst App) between files using [self linkItemAtURL:fromURL toURL:toURL error:&error]; Source Path for MacOS - /var/folders/lf/dt_4nxd945jdry2241phx0_40000gn/T/net.appname.AppName/documents/... Destination Path for MacOS - /Users/username/Library/Group Containers/group.net.appname.AppName.shared/Message/Media/... Although the same code works fine on iOS, but getting following error on MacOS Error Domain=NSCocoaErrorDomain Code=513 couldn’t be linked because you don’t have permission to access, Operation not permitted Source Path for iOS - /Users/user/Library/Developer/CoreSimulator/Devices/B4054540-345F-4D90-A3C5-DA6E6469A3FC/data/Containers/Data/Application/B4AB7D70-491C-49E5-9A3F-27E66EC3423D/tmp/documents/... Destination Path for iOS - /Users/user/Library/Developer/CoreSimulator/Devices/B4054540-345F-4D90-A3C5-DA6E6469A3FC/data/Containers/Shared/AppGroup/842B248E-CCA6-4B5C-82BD-2858EADD3A90/Message/Media/... However, interestingly if I try t
5
0
1.8k
Feb ’24
Error Domain=NSCocoaErrorDomain Code=257
Hello, I have created a documentspicker to select a PDF file and then upload it to storage, but I am getting this error only on my device; it works correctly on the simulator. This is my code: @Binding var alertShow:Bool var detailpet:String = func makeCoordinator() -> Coordinator { return DocumentPicker.Coordinator(parent1: self) } func makeUIViewController(context: UIViewControllerRepresentableContext) -> UIDocumentPickerViewController { let picker = UIDocumentPickerViewController(forOpeningContentTypes: [.pdf]) picker.allowsMultipleSelection = false picker.delegate = context.coordinator return picker } func updateUIViewController(_ uiViewController: UIDocumentPickerViewController, context: UIViewControllerRepresentableContext) { } class Coordinator : NSObject, UIDocumentPickerDelegate { var parent:DocumentPicker init(parent1: DocumentPicker){ parent = parent1 } func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls:[URL]) { let bucket = Storage.storage().reference(
1
0
706
Feb ’24
Scheduling UserNotifications in MessageFilter app extension is throwing an error
I have a MessageFilter app extension embedded in my iOS app and it works great filtering out junk SMS messages. I want to show a local notification whenever a message has moved to the junk folder and I'm trying to do it like so: final class MessageFilterExtension: ILMessageFilterExtension { func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterQueryResponse) -> Void) { let offlineAction = self.offlineAction(for: queryRequest) switch offlineAction { case .allow, .junk, .promotion, .transaction: let response = ILMessageFilterQueryResponse() response.action = offlineAction scheduleLocalNotification(for: keyword) /* -> Here */ completion(response) @unknown default: break } } func scheduleLocalNotification(for keyword: Keyword) { let content = UNMutableNotificationContent() content.title = Test content.body = Test2 content.categoryIdentifier = FILTER_SMS_BLOCKED let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 3,
1
0
864
Apr ’23
Unit test SwiftData migrations
I'm trying to write a unit test for a SwiftData migration. In the teardown function I delete the SQLite container files, but then the underlying sqlite library complains. There must be a way to gracefully terminate the SwiftData container before I delete the files, but I don't see how. Simplying nil-ifying the references doesn't work. I don't see any obvious close functions, so I hope someone knows a non-obvious function. override func tearDownWithError() throws { // Cleanup resources // -- DOES NOT CLOSE UNDERLYING SQLITE ACCESS -- self.container = nil self.context = nil // Delete database do { try FileManager.default.removeItem(at: self.url) } catch { // Ignore file not found, report everything else. let nserror = error as NSError if nserror.domain != NSCocoaErrorDomain && nserror.code == 4 { throw error } } try? FileManager.default.removeItem(at: self.url.deletingPathExtension().appendingPathExtension(store-shm)) try? FileManager.default.removeItem(at: self.url.deletingPathExtension().appe
1
0
1k
Feb ’24
SwiftData Migration Error: Missing Attribute Values on Mandatory Relationship
I'm currently working on a data model migration in Swift using a custom schema migration plan. My project involves migrating settings from one schema version to another (SchemaV1 to SchemaV2). Both schema versions include a class named FSViz, but with slightly different properties. In the newer schema, SchemaV2, I introduced a new property named textSettings of type TextSetting, replacing the textColor property from SchemaV1. Here's a simplified version of my migration code and class definitions: Model: extension SchemaV1 { @Model public final class FSViz { @Attribute(.unique) public let id: UUID public var textColor: TextColor init(textColor: TextColor) { self.id = UUID() self.textColor = textColor } } } extension SchemaV2 { @Model public final class FSViz { @Attribute(.unique) public let id: UUID public var textSettings: TextSetting init(textSettings: TextSetting) { self.id = UUID() self.textSettings = textSettings } } } initMyApp: public struct InitMyApp { static func makeInitialFSViz() -> FSViz? { FSVi
1
0
2.4k
Feb ’24
ASAuthorizationController performRequest returns 4097 error
Hi all, Trying to create a Passkeys registration in my app. This is the implementation I have: ASAuthorizationPlatformPublicKeyCredentialProvider *provider = [[ASAuthorizationPlatformPublicKeyCredentialProvider alloc] initWithRelyingPartyIdentifier:[[jsonDict objectForKey:@rp] objectForKey:@id]]; ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest *request = [provider createCredentialRegistrationRequestWithChallenge: [jsonDict objectForKey:@challenge] name:[[jsonDict objectForKey:@user] objectForKey:@name] userID:[[jsonDict objectForKey:@user] objectForKey:@id]]; ASAuthorizationController *controller = [[ASAuthorizationController alloc] initWithAuthorizationRequests:[NSArray arrayWithObject:request]]; controller.delegate = self; controller.presentationContextProvider = self; [controller performRequests]; But I get this error: Remote proxy object error handler invoked with error: Error Domain=NSCocoaErrorDomain Code=4097 Couldn’t communicate with a helper application. Connection to agent ser
4
0
2.0k
Jan ’24
DeviceActivityReportExtension error
I've created a new project to see how DeviceActivityReportExtension works. After creating the app, added the extension and also added FamilyControl capability. In the main, I've added only the report view using SwiftUI, but it does not work. This is the error I get: 2023-04-27 18:21:55.980280-0700 TestScreenTime[38540:24995233] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2023-04-27 18:21:55.980313-0700 TestScreenTime[38540:24995233] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2023-04-27 18:21:55.980337-0700 TestScreenTime[38540:24995233] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine
2
0
1.3k
Apr ’23
Permission issue accessing Reminders through EventKit in MacOS app
Hello, I have an app that I would like to have read and write access to Reminders using EventKit, but on MacOS 14 (14.2.1) when I call requestFullAccessToReminders I get error = nil, success = false (even when access is granted) and there is no permission prompt to use user when access has not yet been granted. Note this is not an issue in iOS. Here's a stripped down example of what I'm talking about import EventKit struct ContentView: View { let store = EKEventStore() @State var permissionState = Ready to Request var body: some View { VStack { Text(permissionState).font(.title) Button(Request Access) { requestFullAccessToEvents() }.padding() } .padding() } func requestFullAccessToEvents() { store.requestFullAccessToReminders { (granted, error) in if let foundError = error { permissionState = Error: + foundError.localizedDescription } else if granted { permissionState = Permission Granted } else { permissionState = Permission Denied } } } } then the plist NSRemindersFullAccessUsageDescription something me
1
0
1.1k
Feb ’24
Error `sandbox_extension_issue_file` when resolving security-scoped bookmark of file under `/System/Volumes/Data/...`
I'm getting a sandbox_extension_issue_file error [1: Operation not permitted] from ScopedBookmarkAgent while trying to resolve a successfully created security-scoped bookmark via URL(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:) which then produces the error Error Domain=NSCocoaErrorDomain Code=256 Couldn't issue sandbox extension for the resolved URL The error only occurs for files under a dedicated folder /System/Volumes/Data/Test and not for files and folders under, e.g., /Users/... From what I understand, everything at /System/Volumes/Data/ and below should be accessible for the user. I've made sure that the Test folder has read and write permissions for the current user and changed ownership of the folder to username:staff, where username denotes my local user name. This happens both under macOS Big Sur 11.6.2 and macOS Monterey 12.1. Any help is much appreciated!
13
0
3.6k
Jan ’22