I'm fighting with the following error NSCocoaErrorDomain 513 reported by a very small number of users (~ 0.01%):Unable to create directory at path /var/mobile/Containers/Data/Application/EBE2C5D8-5AEC-4D62-9393-B19CAD598FE5/Documents/documents/FF2F88FB-2C07-4FA3-988E-58AD5C21F659/9A02F8A0-74EB-4ED6-81B6-4F40653856D3. Error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “9A02F8A0-74EB-4ED6-81B6-4F40653856D3” in the folder “FF2F88FB-2C07-4FA3-988E-58AD5C21F659”. UserInfo={ NSFilePath=/var/mobile/Containers/Data/Application/EBE2C5D8-5AEC-4D62-9393-B19CAD598FE5/Documents/documents/FF2F88FB-2C07-4FA3-988E-58AD5C21F659/9A02F8A0-74EB-4ED6-81B6-4F40653856D3, NSUnderlyingError=0x15e09de00 { Error Domain=NSPOSIXErrorDomain Code=13 Permission denied } }This error means that the directory cannot be created because of a permission error. That's where I'm lost as the only reason I can see would be if I'm creating a file outside of my app's sandbox.The code generating
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I get the following error when trying to create a string from a file. Code below was added to viewDidLoad(). Test.txt file contains string Hello, World!From url pathlet path = NSBundle.mainBundle().pathForResource(Test, ofType: txt) let url = NSURL(string: path!) do { let string = try String(contentsOfURL: url!, encoding: NSUTF8StringEncoding) print(string) } catch { }However, this code worksFrom string pathlet path = NSBundle.mainBundle().pathForResource(Test, ofType: txt) do { let string = try String(contentsOfFile: path!, encoding: NSUTF8StringEncoding) print(string) } catch { }Am I missing something? This worked for me before. Now on Xcode 7/ iOS 9.0.2, I can't get it to work.rey
I have been struggling with this error. My build succeeds but won't run. I've tried every suggestion I've ready in every article I could find and nothing has worked. This happens if I run it on the simulator or device. Any tips? ============================== The file “APP NAME” couldn’t be opened because you don’t have permission to view it. Domain: NSCocoaErrorDomain Code: 257 Failure Reason: You don’t have permission. Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info. User Info: { NSFilePath = /Users/Me/Library/Developer/Xcode/DerivedData/Main-ekzzcailcbrpykazzxdtbnpsjuhr/Build/Products/Debug-iphoneos/APP NAME.app; } - The operation couldn’t be completed. Permission denied Domain: NSPOSIXErrorDomain Code: 13 Failure Reason: Permission denied
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
OS Version: macOS Sonoma 14.2 Xcode Version: 15.0 Im getting this log errors while launching my app: Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.} Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.} Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcent
When I want to save my array (HTML shape) I have this error.Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “Untitled.xls” in the folder “Desktop”. UserInfo={NSFilePath=/Users/gerardbuguet/Desktop/Untitled.xls, NSUnderlyingError=0x60400044d8c0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}I do not understand why.How can I resolve this issue ?Thanks in advance.
It may be a vague question, but I'm puzzled with this symtpom.I have an app with a Today extension.The Today extension in the released version installed from App Store somehow does not start up.(It fails to start up with console message: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 connection to service named xxx UserInfo={NSDebugDescription=connection to service named xxx})However, when connected with Instruments (which means, when launched from Instruments), it starts up successfully.The exact same built, that startsup when connected with Instruments, fails to start up without Instruments.Could anyone explain what causes this diffrence?(The extension starts up immediately when run directly from Xcode as a debug built (no 'ate bad food' issue). It uses about 9MB memory. Built with Swift 3.)
NSArray *tableau = [fm contentsOfDirectoryAtURL:url .... I get in return: Error Domain=NSCocoaErrorDomain Code=257 The file “*************” couldn’t be opened because you don’t have permission to view it. UserInfo={NSURL=file:///Users/gerardMonNom, NSFilePath=/Users/gerardMonNom, NSUnderlyingError=0x6000033788d0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} How do we fix this anomaly?
When attempting to add a persistent storei.e. persistentStoreCoordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: self.storeUrl, options: options)We're seeing some errors show up in our crash reporting tool, but not sure how to reproduce it.Error Domain=NSCocoaErrorDomain Code=522 (null) UserInfo={NSSQLiteErrorDomain=522, NSUnderlyingException=I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/myAppDb.sqlite. SQLite error code:522, 'not an error'}: file /Users/path/to/my/swift/class/that/attempted/to/add/the/persistent/store.swift, line 37I've read that this could have something to do with Write Ahead Logging, sure. It seems odd that the swift file / line where I make the .addPersistentStore call shows the full local files system path (of my development macine). It makes me think this is something happening only on beta or development builds, but since I can't reproduce it, it's hard to say for certain.It's al
When calling:NSURL* aURL = [NSURL URLByResolvingBookmarkData:secBookmark options:options relativeToURL:nil bookmarkDataIsStale:&isStale error:&err];isStale is YES.When attempting to get a fresh bookmark, calling:NSData* secureBookmark = [aURL bookmarkDataWithOptions:options includingResourceValuesForKeys:nil relativeToURL:nil error:&err];produces:2019-03-11 15:53:51.603133-0700 XXX[534:8439] Error: Error Domain=NSCocoaErrorDomain Code=256 Could not open() the item UserInfo={NSURL=file:///Users/oldmancoyote1/Desktop/E%20Projects%20folder/Drawing/Drawing%201%20.pdf, NSDebugDescription=Could not open() the item}If I ignore isStale, there appears to be no problem. Can I safely ignore isStale?
Hey Team,We are seeing some random crashes for CoreData only on iOS 9 devices. We are primarily seeing two errors when Core Data performs lightweight migration when setting up the Stack -We have no clue about what this error could beError Domain=NSCocoaErrorDomain Code=512 The file couldnU2019t be saved.2. The error code translates to SQLite Error code 14. [Error code is Domain=NSCocoaErrorDomain Code=134110, NSSQLiteErrorDomain Code=14 https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreDataFramework/Miscellaneous/CoreData_Constants/#//apple_ref/doc/constant_group/Migration_Error_Codes , https://www.sqlite.org/rescode.html#cantopen ]Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo= { sourceURL=file:///var/mobile/Containers/Data/Application/BFD91E93-5977-4135-A454-5EBDF8EE53E4/Library/Database/DB.sqlite, reason=Can't copy source store to destination store path, destinationURL=file:///var/mobile/Containers
Hi devs!!! Calling createCredentialRegistrationRequestWithChallenge returns the following error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.AuthenticationServicesCore.AuthenticationServicesAgent UserInfo={NSDebugDescription=connection to service named com.apple.AuthenticationServicesCore.AuthenticationServicesAgent} What can be the potential reason?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Authentication Services
Passkeys in iCloud Keychain
While Using app it start's freezing and i am getting following logs on console. Please help me to resolve this freeze issue.currentDiskUsage failed: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.nsurlstorage-cache UserInfo={NSDebugDescription=connection to service named com.apple.nsurlstorage-cache}; { NSDebugDescription = connection to service named com.apple.nsurlstorage-cache;}
I try to using the module UserNotifications in swift project, to send notifications of my macos app. I pack my app with nested bundle like: /Application/MyApp.app - Contents - Resources - Frameworks - MacOS - my_binary - Notifier.app - Resources - Frameworks - Contents - MacOS - notifier_binary When I use cmdline to execute my notifier_binary, it's work fine. But when I execute it form my_binary, it will failed sometimes in api requestAuthorization, and the auth setting result will be not authed. But in current user's setting, it had been allowed. The error message in log, I can't find anything useful in google result, I have no idea what this error message means. 2022-10-27 16:32:11.297912+0800 0x3ded Error 0x0 1697 0 notifier_binary: (UserNotifications) [com.apple.UserNotifications:Connections] [com.my.notifier] Getting notification settings failed with error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.usernotifications.usernotificationservice was invalidate
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Entitlements
Swift
Notification Center
User Notifications
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~