Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Error Domain=NSCocoaErrorDomain Code=518 "The file couldn’t be saved because the specified URL type isn’t supported."
Hello, I'm trying to save some Strings in a csv document: var tempString = String() for Rezept in alleRezepte { tempString += (Rezept.name), (Rezept.description), (Rezept.nutrients), (Rezept.whatToDo)n } let dirs = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .allDomainsMask, true) as? [String]) let path = dirs?[0].appending(rezepte.csv) let url = URL(string: path!) do { try tempString.write(to: url!, atomically: true, encoding: String.Encoding.utf8) } catch { print(error) } print(Daten gesichert)And I get this error:CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no schemeError Domain=NSCocoaErrorDomain Code=518 The file couldn’t be saved because the specified URL type isn’t supported.How can I fix this?Thank you for helping.
9
0
23k
Jan ’22
Reply to Error Domain=NSCocoaErrorDomain Code=518 "The file couldn’t be saved because the specified URL type isn’t supported."
Your issue is that URL(string:) expects a valid URL with a scheme (like file://), but you're passing a file path directly. It is similar to the following error:ErrorDomain = NsCocoaErrorDomain & ErrorCode = 4 Instead, you should use URL(fileURLWithPath:) for file paths. Here's the fixed code: var tempString = String() for Rezept in alleRezepte { tempString += (Rezept.name), (Rezept.description), (Rezept.nutrients), (Rezept.whatToDo)n } if let dirs = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first { let path = dirs.appending(/rezepte.csv) let url = URL(fileURLWithPath: path) do { try tempString.write(to: url, atomically: true, encoding: .utf8) print(Daten gesichert) } catch { print(Error saving file: (error)) } }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’24
Reply to App intermittently disappearing after installation
I think intermittently is a misnomer. It is sysem-dependent and consistently happening, just not on any of the systems in our control. To give additional context, we can see it existed in our postinstall check, but then at the end it says it can't find the file instead of PackageKit: Registered bundle ... but we can't find a message explaining why it is being removed. 2024-10-02 09:43:06-04 MBA-L-8114 package_script_service[9897]: ./postinstall: App Name: /Applications/.hiddenfolder/app1.app found. ... 2024-10-02 09:43:06-04 MBA-L-8114 package_script_service[9897]: PackageKit: Hosted team responsible for script has been cleared. 2024-10-02 09:43:06-04 MBA-L-8114 package_script_service[9897]: Responsibility set back to self. 2024-10-02 09:43:06-04 MBA-L-8114 installd[3215]: PackageKit: Writing receipt for com.company.pkg.app1 to / 2024-10-02 09:43:06-04 MBA-L-8114 installd[3215]: PackageKit: Touched bundle /Applications/HelperApp.app 2024-10-02 09:43:06-04 MBA-L-8114 installd[3215]: PackageKit: Touched bundle
Dec ’24
Reply to FailedToAnalyzeBuiltTargetDescription: Could not analyze the built target description for Views to create the preview.
I am experiencing the same issue on Xcode 16.1 (16B40), when merged binary is enabled, erroring (redacted my library name with <>): | ================================== | | | CouldNotParseInput | | | | ================================== | | | | | FailedParsingMachObjectFile | | | | | | MachO data could not be parsed for: <> | | | Reason: Underlying failure reading data | | | Data header bytes: [] | | | Data header ASCII: | | | | | | ================================== | | | | | | | NSError.NSCocoaErrorDomain.260: The file “<>” couldn’t be opened because there is no such file. | | | | | | | | NSCocoaErrorDomain (260): | | | | ==NSURL: <> -- file:/// | | | | ==NSFilePath: /<> | | | | | | | | ================================== | | | | | | | | | NSError | | | | | | | | | | NSError: Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory
Nov ’24
ESIM: Always taken to unknown state for iOS 14.0, where it work perfect for iOS 13.0
I work for one of the networks. I am able to successful download the eSIM in iPhone for iOS 13.*. Where I was taken to unknown state (CTCellularPlanProvisioningAddPlanResult) in iOS 14.0 always also it prompt the os screen to install eSIM(Set up Mobile Plan) Please let me know why it take to unknown state always and why OS screen popup ?, please let me know if any configuration needed specific for iOS 14.x Also attached the configuration & prototype code for your reference hud.show(animated: true) let plan = CTCellularPlanProvisioning() self.request = CTCellularPlanProvisioningRequest() self.request?.address = // SMDP Address self.request?.matchingID = // Acitvation code. if let validRequest = self.request { weak var weakSelf = self plan.addPlan(with: validRequest) {[weak self] result in self?.hud.hide(animated: true) switch result { case .success: weakSelf?.alertMessageToUser(title: Hurray !..., message: ESIM Downloaded Successfully) print(Successful) case .fail: print(ESIM Download failed, contact you
9
0
5.5k
Jun ’23
Getting "No valid file provider found with identifier"
I am currently developing an app based on a file provider extension and intermittently encounter the error: No valid file provider found with identifier. Usually, I can mount (addDomain) successfully after building the app, but occasionally this error appears and then disappears after 10-15 minutes I see these errors from log stream: 2024-07-28 01:01:46.644401+0530 0x1abf0 Default 0x0 6654 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [WARNING] No provider found with identifier (null) for calling bundle on second attempt. 2024-07-28 01:01:47.099043+0530 0x1aac7 Error 0x0 6926 0 mdbulkimport: (FileProvider) [com.apple.FileProvider:default] [ERROR] Cannot query for providers. Error: NSError: Cocoa 4099 2024-07-28 01:01:47.099203+0530 0x1aac7 Error 0x0 6926 0 mdbulkimport: (FileProvider) [com.apple.FileProvider:default] [ERROR] received an error when listing providers, attempting again: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=} (count: 3) 2024-07
2
0
1k
Jul ’24
Using ContactAccessButton freezes the entire app
When using both the ContactsAccessButton demo project, as well as when implementing it in my own, the whole app freezes after entering a few characters and searching through contacts. I don't know if this is necessarily reproducable because it's probably related to the contacts in my contact book. Typing in Lex does not freeze the app, but typing in Adam No freezes it. I get the following console error before my app freezes and I'm forced to force quit it: #ContactsButton Failed to get service proxy: Error Domain=NSCocoaErrorDomain Code=4097 connection to service with pid 3387 named com.apple.ContactsUI.ContactsButtonXPCService UserInfo={NSDebugDescription=connection to service with pid 3387 named com.apple.ContactsUI.ContactsButtonXPCService} #ContactsButton Failed to get remote content: nil (got this a number of times ContactsAccessButton really doesn't seem production ready...
2
0
532
Sep ’24
Reply to Error Domain=NSCocoaErrorDomain Code=4099
This error is coming only in iOS 15, but no such error is on iOS 17 or 18, need help 2024-11-14 07:29:28.173901-0600 Zacks[16171:116902] [Client] Updating selectors after delegate addition 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.}
Nov ’24
PHAssetCollectionChangeRequest.removeAssets Does Not Work
Hello! I am trying to remove a photo from my Photos Library using PhotosUI. I run into this error when I attempt to delete it: Error returned from daemon: Error Domain=com.apple.accounts Code=7 (null) No photos access scope requirements declared for changes Failed to log access with error: access= accessor:<> identifier:82068C12-FD10-4DE2-9867-B4406FBFB706 kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 accessCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.privacyaccountingd UserInfo={NSDebugDescription=connection to service named com.apple.privacyaccountingd}
2
0
600
Nov ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Does anyone see the same problem on macOS 14.7.1? I've received multiple reports from users that macOS 14.7.1 cannot create new bookmarks or resolve existing bookmarks. Same error message: Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key UserInfo={NSDebugDescription=Failed to retrieve app-scope key} All users updated from macOS 13.* Ventura to macOS 14.7.1 Sonoma, which triggered the issue Restarting Mac does not fix the issue Clearing all app data does not resolve the issue One user reported that using bookmarks on a new macOS user account works correctly. This leads me to believe that the macOS keychain for their user account is broken. See also https://developer.apple.com/forums/thread/46583 Does upgrading from macOS 13 to macOS 14.7.1 break the keychain?
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’24
macos Objective-C openURL failed
error: Error Domain=NSCocoaErrorDomain Code=256 The application “Google Chrome” could not be launched because a miscellaneous error occurred. UserInfo={NSURL=file:///Applications/Google%20Chrome.app/, NSLocalizedDescription=The application “Google Chrome” could not be launched because a miscellaneous error occurred., NSUnderlyingError=0x6000038376c0 {Error Domain=RBSRequestErrorDomain Code=5 Launch failed. UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000038349f0 {Error Domain=OSLaunchdErrorDomain Code=112 Could not find specified domain UserInfo={NSLocalizedFailureReason=Could not find specified domain}}}}}
1
0
334
Nov ’24
ipatool failed
In my Xcode Version 16.0, I try to export an adhoc IPA file (sure the certificate is correct). get error ipatool failed, error in log 2024-10-27 07:56:28 +0000 Output: ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin24] /Applications/Xcode.app/Contents/SharedFrameworks/AppThinning.framework/Resources/ipatool:4135: warning: assigned but unused variable - prev /Library/Ruby/Gems/2.6.0/gems/CFPropertyList-3.0.6/lib/cfpropertylist/rbCFPropertyList.rb:83: warning: assigned but unused variable - temp Ignoring date-3.3.4 because its extensions are not built. Try: gem pristine date --version 3.3.4 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:117:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.3.4/lib/date_core.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/date-3.3.4/lib/date_core.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/
1
0
1k
Nov ’24
WidgetKit with SwiftData on macOS
Xcode: 16.1 macOS: Sequoia When I run widget preview, I got the following errors CoreData: error: Store failed to load. (type: SQLite, url: file:///Users/user/Library/Group%20Containers/group.com.app.name/Library/Application%20Support/default.store) with error = Error Domain=NSCocoaErrorDomain Code=256 The file couldn’t be opened. UserInfo={reason=Unknown failure to access file: 1} with userInfo { reason = Unknown failure to access file: 1; } Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=256 The file couldn’t be opened. UserInfo={reason=Unknown failure to access file: 1} with this code let sharedModelContainer: ModelContainer = { let schema = Schema([Company.self, Person.self]) do { return try ModelContainer(for: schema, configurations: [.init(isStoredInMemoryOnly: false)]) } catch { fatalError(error: (error)) } }() Does anyone know why this happens and how to fix this?
5
0
1.1k
Nov ’24
Top Shelf and App Icon not appearing on tvOS 18.
I am a developer working on tvOS apps for Enterprise. I would like to report an issue occurring in tvOS 18.1. Workflow : Exporting tvOS build from Xcode (Enterprise). We have developed another Mac App to white label the tvOS App. We are changing its Assets and bundle identifier of the app while white labeling process. Resigning app again. Distributing through JAMF. Problem: We have been facing a problem for a while. The top shelf is not working in our white -labeled app and app icon is not appearing. BTW App is opening and doing well. I'm just getting following lines in console (Apple TV Device Console). MDMProvisoningProfileTrust could not find record of managed app 'com.company.connecttv.events' with error: Error Domain=NSOSStatusErrorDomain Code=-10814 (null) UserInfo={_LSLine=1734, _LSFunction=runEvaluator} Unable to create LSApplicationRecord for application: com.company.connecttv.events. error=Error Domain=NSOSStatusErrorDomain Code=-10814 UserInfo={_LSLine=1734, _LSFunction=} Top shelf content doesn't
1
0
514
Nov ’24
NSCocoaErrorDomain 513
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
14
0
18k
Oct ’20