I'm trying to rename a file (a FileWrapper containing a UIDocument subclass) as follows:coordinationQueue.async { var error: NSError? = nil let fileCoordinator = NSFileCoordinator(filePresenter: self) fileCoordinator.coordinate(readingItemAt: url, options: .withoutChanges, writingItemAt: targetURL, options: .forMoving, error: &error) { fromURL, toURL in do { fileCoordinator.item(at: fromURL, willMoveTo: toURL) try FileManager().moveItem(at: fromURL, to: toURL) fileCoordinator.item(at: fromURL, didMoveTo: toURL) // Success! } catch { // Handle error } } if let error = error { // Handle error } }… but it's failing on the moveItem, with the following error:Error Domain=NSCocoaErrorDomain Code=513 “from_file” couldn’t be moved because you don’t have permission to access “My_folder”. UserInfo={NSSourceFilePathErrorKey=/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/My_folder/from_file, NSUserStringVariant=( Move), NSDestinationFilePath=/private/var/mobile/Library/Mobile Documents/com~
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We had a few users reporting this issue where our app is unable to connect to StoreKit. Failed product request from the App Store server: systemError(Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitagent UserInfo={NSDebugDescription=connection to service named com.apple.storekitagent}) This occurs when calling Product.products(for:). Some users mentioned they had to restart their Mac in safe mode to make the error go away, some had DNS cache issues and clearing those helped, or some found the culprit to be Adguard. What could be causing this error as it is not very clear what's causing it?
Hello, we have rare case of AuthorizationCenter.shared.requestAuthorization(for: .individual) failing to autorize user on real device - iPhone XR (iOS 16.1.2). It does not throw the standard FamilyControlsError which we are handling, but NSCocoaErrorDomain. This is the entire po description: Error Domain=NSCocoaErrorDomain Code=4864 The given data was not a valid property list. UserInfo={NSCodingPath=(), NSDebugDescription=The given data was not a valid property list., NSUnderlyingError=0x283af4d80 {Error Domain=NSCocoaErrorDomain Code=3840 Cannot parse a NULL or zero-length data UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}}} The localized one says: The data couldn’t be read because it isn’t in the correct format. This sounds like some error deep in iOS. The testing device has Apple ID logged in and uses passcode. Anything we can do on our end to solve this issue?
i have received a lot of crash log only in iOS16 the crash occured when i called : [[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:resultHandler] here is the crash log Exception Type: NSInternalInconsistencyException ExtraInfo: Code Type: arm64 OS Version: iPhone OS 16.0 (20A5328h) Hardware Model: iPhone14,3 Launch Time: 2022-07-30 18:43:25 Date/Time: 2022-07-30 18:49:17 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:Unhandled error (NSCocoaErrorDomain, 134093) occurred during faulting and was thrown: Error Domain=NSCocoaErrorDomain Code=134093 (null) Last Exception Backtrace: 0 CoreFoundation 0x00000001cf985dc4 0x1cf97c000 + 40388 1 libobjc.A.dylib 0x00000001c8ddfa68 0x1c8dc8000 + 96872 2 CoreData 0x00000001d56d2358 0x1d56cc000 + 25432 3 CoreData 0x00000001d56fa19c 0x1d56cc000 + 188828 4 CoreData 0x00000001d5755be4 0x1d56cc000 + 564196 5 CoreData 0x00000001d57b0508 0x1d56cc000 + 935176 6 PhotoLibraryServ
Crash occurs frequently in testflight builds, below log is reported in crashlytics for the crashFatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=256 The file ####.sqlite” couldn’t be opened. UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/D73975F3-ED76-4C7B-A30A-0C751C8471AA/Library/Application Support/####.sqlite, NSSQLiteErrorDomain=23}, [NSFilePath: /var/mobile/Containers/Data/Application/D73975F3-ED76-4C7B-A30A-0C751C8471AA/Library/Application Support/####.sqlite, NSSQLiteErrorDomain: 23]: file /Users/elanarulaj/Desktop/voxer_client/packages/sdk.swift/VoxerKit/VoxerKit/Classes/####SDK.swift, line 86I do not find any working solution in StackOverFlow
I'm trying to use the Assessment Configuration with the most recent changes introduced. The entitlement that the app is using is: com.apple.developer.edu-assessment-mode If the entitlement is not correct, then the app won't start because the provisioning profile won't match. Once the application tries to start a session I get the following error: [16777:98639] [Core] Encountered error running activation: com.apple.assessment.assessmentMode.enable. Error: NSError: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.assessmentagent UserInfo={NSDebugDescription=connection to service named com.apple.assessmentagent} Desc : Couldn’t communicate with a helper application. Sugg : Try your operation again. If that fails, quit and relaunch the application and try again. Domain : NSCocoaErrorDomain Code : 0x1001 (4097) Extra info: { NSDebugDescription = connection to service named com.apple.assessmentagent; } Error: Error Domain=AEAssessmentErrorDomain Code=1 (null) UserInf
Topic:
App & System Services
SubTopic:
Core OS
Tags:
macOS
Automatic Assessment Configuration
Assessment
I am trying to access data stored in Core Data in a previous release of an app for a bundle ID with a new app which I'm trying to get to access this data and send to an external API over the internet. The persistent container in the old app is set up like this: private lazy var persistentContainer: NSPersistentContainer = { let url = Bundle(for: ModelManager.self).url(forResource: GIRC, withExtension: momd) let model = NSManagedObjectModel(contentsOf: url!) let retval = NSPersistentContainer(name: GIRC, managedObjectModel: model!) let desc = NSPersistentStoreDescription() desc.url = NSPersistentContainer.defaultDirectoryURL().appendingPathComponent(GIRC.sqlite) desc.type = NSSQLiteStoreType desc.shouldAddStoreAsynchronously = false retval.persistentStoreDescriptions = [desc] retval.loadPersistentStores { (desc, error) in if error == nil { var values = URLResourceValues() values.isExcludedFromBackup = true try? desc.url?.setResourceValues(values) } } return retval }() so in the new app, I use this code to acce
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(
I work on an app that saves data to the Documents folder in the users iCloud Drive. This uses the iCloud -> iCloud Documents capability with a standard container. We've noticed an issue where a user will delete the apps data by doing to Settings > {Name} > iCloud > Storage > App Name > select delete data from iCloud, and then our app can no longer write to or create the Documents folder. Once that happens, we get this error: Error Domain=NSCocoaErrorDomain Code=513 You don't have permission to save the file Documents in the folder iCloud~your~bundle~identifier. UserInfo={NSFilePath=/private/var/mobile/Library/Mobile Documents/iCloud~your~bundle~identifier/Documents, NSURL=file:///private/var/mobile/Library/Mobile%20Documents/iCloud~your~bundle~identifier/Documents, NSUnderlyingError=0x1102c7ea0 {Error Domain=NSPOSIXErrorDomain Code=13 Permission denied}} This is reproducible using the sample project here https://developer.apple.com/documentation/uikit/synchronizing-documents-in-the-
Topic:
App & System Services
SubTopic:
iCloud & Data
I have developed an app and its working fine, I decide to add Unit-Testing to the project while running the test on the device, Xcode throws me an error -> Failed to load test bundle from file:///private/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas%20dev.app/PlugIns/aspasDevTests.xctest/: Error Domain=NSCocoaErrorDomain Code=3588 dlopen(/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas dev.app/PlugIns/aspasDevTests.xctest/aspasDevTests, 0x0109): -> The bundle “aspasDevTests” couldn’t be loaded. Try reinstalling the bundle. I tried many things but nothing is working, needed help in the issue, Thanks in advance
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
I am coding a new version of my app and it has a new store version. I add a new version of the model and set the Model version of the new model in the Inspector view of the model.I added an options dictionary to addPersistentStoreWithType (as explained in the documentation of Lightweight migration)...NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption: @YES, NSInferMappingModelAutomaticallyOption: @YES};But I am receiving the following error...Error Domain=NSCocoaErrorDomain Code=134100 The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store.Please suggest what I should do.
Hi, We have developed a per-app VPN (and containing app) on iOS 9.x/iOS 10.x based on Network Extension NEAppProxyProvider. VPN configurations are generated and distributed to devices. Sometimes the plugin doesn't lauch and fails with below error in device logs. This is an intermittent issue but once the device goes into this state it never comes back unless restarted or enrolled into another environment. It's not clear from the device log nda errorcode 4097 is pretty generic which just means The operation couldn’t be completed. It looks like a IPC failure but reason is unknown. Any insight into this error will help.Jun 6 12:55:10 test-iPhone pkd[90] <Info>: match returned 1 plug-ins Jun 6 12:55:10 test-iPhone neagent(Foundation)[2409] <Notice>: calling plugIn beginUsing: Jun 6 12:55:10 test-iPhone pkd[90] <Info>: assigning plug-in <private>(<private>) D0FC15A1-A6B9-49CC-B4C7-2689CA489B72 to plugin sandbox Jun 6 12:55:10 test-iPhone pkd[90] <Notice>: allowing host 2409 <
Hello everybody. I am trying to save a new contact in the contact book. But I get an error in the catch block: Domain=NSCocoaErrorDomain Code=134092 “(null)”. This error only appears on Mac 13.1 Ventura. Everything works fine on iOS and MacOS 14.2.1 Sonoma. What could be the problem? func save(_ cnContact: CNMutableContact, identifier: String? = nil) throws { let saveRequest = CNSaveRequest() saveRequest.add(cnContact, toContainerWithIdentifier: identifier) do { try CNContactStore().execute(saveRequest) } catch { print(error) } }
Message failed: -[BAAgentClientProxy currentDownloadsWithCompletion:]_block_invoke error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.backgroundassets.user UserInfo={NSDebugDescription=connection to service named com.apple.backgroundassets.user} The above error occurs when debugging Background Assets on iPhone。