Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

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
An error occurred on the xpc connection to setup the background session: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.nsurlsessiond was invalidated from this process." UserInfo={NSDebugDescription=The conne
I am facing this issue when trying to access AWS S3 through AWS Cognito and Amplify on XCUITest build, iOS 13.0 Simulator. IT works on simulators with
0
0
893
Sep ’20
Reply to CoreDataCloudKitDemo fails when creating a new Tag
Actual Error: Context saving error: Error Domain=NSCocoaErrorDomain Code=134040 Save operation could not be completed. UserInfo={NSAffectedStoresErrorKey=( (URL: file:///var/mobile/Containers/Data/Application/1505976C-354D-4B4F-A1DE-E6A312F01E99/Library/Application%20Support/private.sqlite), ( (URL: file:///var/mobile/Containers/Data/Application/1505976C-354D-4B4F-A1DE-E6A312F01E99/Library/Application%20Support/private.sqlite), (URL: file:///var/mobile/Containers/Data/Application/1505976C-354D-4B4F-A1DE-E6A312F01E99/Library/Application%20Support/shared.sqlite) ) ), NSUnderlyingException= threw while encoding a value.}
Jun ’21
Reply to Xcode 8 don't Start
i Have the same issue. How can i find Python version ?? save me please?2016-10-31 15:06:09.372 Xcode[11430:230967] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.dbg.DebuggerLLDB (/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3587 dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB): Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python Referenced from: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB Reason: no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.7/Python
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’16
Reply to Xcode 15 can't install iOS 17 platform simulator
Also running into this, I have a handful of other weird things too like when I go to uninstall listed runtimes I get: ❯ xcrun simctl runtime delete 21J353 An error was encountered processing the command (domain=com.apple.CoreSimulator.simdiskimaged.SimDiskImageError, code=18): Cannot stage disk image or bundle for delete: 4A9A3A5B-03C2-4A4F-AF9B-A237B7A500BE Underlying error (domain=NSCocoaErrorDomain, code=4): “4A9A3A5B-03C2-4A4F-AF9B-A237B7A500BE.dmg” couldn’t be moved to “NSIRD_simdiskimaged_rClQ89” because either the former doesn’t exist, or the folder containing the latter doesn’t exist. The file doesn’t exist. Almost feels like my CoreSimulator directories got corrupted and now I can't recover.
Sep ’23
Reply to iOS folder bookmarks
[quote='856443022, DTS Engineer, /thread/797469?answerId=856443022#856443022'] You're testing on iOS, not macOS [/quote] In fact, that was on macOS... Your app never created a security-scoped bookmark Well, the bench UI is flexible, it's a matter of selecting that checkbox in the bench UI.. However, now that I tried it (on Mac) - the create bookmark fails with error.. NSCocoaErrorDomain Code=256 Could not open() the item, specifically this very first step (after the picker): Create with NSURL.BookmarkCreationOptions.withSecurityScope. However, security scoped creation fails at #3. Yep, for me it's failing on 4. tap Create bookmark - if I select withSecurityScope (Mac only) in the UI.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’25
Reply to Can we save to NSUserDocuments?
A bit more information[self createFolder:@test];+ (void)createFolder:(NSString*)folder{ NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *thePath = [documentsPath stringByAppendingPathComponent:folder]; NSError *error = nil; [fileManager createDirectoryAtPath:thePath withIntermediateDirectories:YES attributes:nil error:&error];}Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “test” in the folder “Documents”. UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/A64A699C-2441-49CF-8DA3-1188CC0E67D6/Documents/test, NSUnderlyingError=0x147d75170 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’15
Reply to iOS Development: Create file failed(return domain:NSCocoaErrorDomain,code:512)
Within NSCocoaErrorDomain, error 512 is NSFileWriteUnknownError, which I’ll admit is not very instructive. In most situations like this the error’s userInfo dictionary contains an NSUnderlyingErrorKey property with more info about the error. Any sign of that here? If you can engage with one of the users hitting this problem, you should ask them to trigger a sysdiagnose log immediately after seeing it. This captures a copy of their system log, which may contain clues as to what’s triggering the problem.You can learn more about sysdiagnose logs from our Bug Reporting > Profiles and Logs page.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Feb ’20
Reply to JSONDecoder Limit
I got a similar error playing in Playground (Xcode 12.2) with the initial data completed to 12 keys. Error message: NEWDATA 183 bytes Playground execution terminated: An error was thrown and was not caught: ▿ DecodingError ▿ dataCorrupted : Context codingPath : 0 elements debugDescription : The given data was not valid JSON. ▿ underlyingError : Optional some : Error Domain=NSCocoaErrorDomain Code=3840 Badly formed object around character 161. UserInfo={NSDebugDescription=Badly formed object around character 161.} I then realised that I forget the ending comma in NEWDATA after NAME9: HELLO Adding it solved the problem. So I tested with 18 keys and works as well.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’20
Reply to QLThumbnailGenerator doesn't work
Thanks for this post. I didn't consider that it would return errors in addition to an image. It makes it impossible to know when the thumbnail generator is 'finished' with a request, which harms progress reporting. All in all this API's behavior is poorly documented and I have no idea what to expect from it. There are multiple files in my iCloud Drive that it just decides to not return thumbnails for.I am seeing the same errors you mention:error: Optional(Error Domain=QLThumbnailErrorDomain Code=2 No cached thumbnail) Error Domain=NSCocoaErrorDomain Code=4865 requested key: 'root' UserInfo={NSDebugDescription=requested key: 'root'}However, there are numerous files in my case that do not complete successfully with an image. (Despite being image files)
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’19
Reply to Can't generate live photo in iOS 15.1
@tpian928 did you get this functioning in the end? I see no real difference between your code and mine (although obviously more code is needed to generate a live photo), but it's still not functioning on iOS 15.1. On attempting to add the paired video and photo to the library we get a non-nil assetPlaceholder but the completion handler is not called by [[PHPhotoLibrary sharedPhotoLibrary] performChanges:completionHandler:] and we see errors like this in the log: 2021-11-09 13:54:48.122501+0000 REDACTED[480:23929] [error] error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003. UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003.} 2021-11-09 13:54:48.122518+0000 REDACTED[480:23913] CoreData: XP
Nov ’21
Reply to How to configure Kerberos SSO Extension to handle challenges in native app
Hi VMdominguez,I'm getting the same error. Are you able to confirm in your console logs of the device:*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSCFConstantString stringByAppendingString:]: nil argument' *** First throw call stack: (0x1b81d0164 0x1b7ee4c1c 0x1b848e5b8 0x1e3faef54 0x1e3fac914 0x1023df684 0x1023e2f30 0x1b7e6eec4 0x1b7e7033c 0x1b7e727b4 0x1b7e7f5c0 0x1b7e7fd9c 0x1b7ed76d8 0x1b7edd9c8)Looks like the KerberosExtension Process crashes, (Note the animation of the new SSOExtension disappears really fast after entering your password and hitting enter)The crashes should be generating logs and found in:iPhone > Settings > Privacy > Analytics & Improvements > Analytics Data > KerberosExtensionSSO.logGeneration of SysDiagnostics.logs: https://developer.apple.com/bug-reporting/profiles-and-logs/Instructions: https://download.developer.apple.com/iOS/iOS_Logs/Single_SignOn_Diagnostics_Logging_Instructions.pdfEdit:Check out this error too,
Topic: Privacy & Security SubTopic: General Tags:
May ’20
Reply to Feedbacks for DeclaredAgeRange - missing platform support
Regarding feedback FB20954846 for App Clip support, I got a message from Apple saying it is fixed. I can now compile, and code sign for an App Clip using the DeclaredAgeRange API. Great. Now that I can get past the compiler failure I'm running up against a new issue. When installed via TestFlight, an App Clip throws that the age range is unavailable. In the console app it looks like the App Clip is still prohibited from calling the system functionality: default PerformanceOrganizer AppClip 18:36:39.200071-0600 (501) Failed to fetch persona: got error from remote proxy: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction.} error PerformanceOrganizer AppClip 18:36:39.200108-0600 (50
Dec ’25
Reply to AVPlayerItem is not able to reproduce audio from music folder on Macbook M1
Thanks for the comments, there is in fact an error that i didn't see before : AVQueuePlayer status: AVPlayerStatusReadyToPlay AVQueuePlayer error: nil AVPlayerItem status: AVPlayerItemStatusFailed AVPlayerItem error: Error Domain=NSCocoaErrorDomain Code=257 The file couldn’t be opened because you don’t have permission to view it. UserInfo={NSUnderlyingError=0x600002a7f5d0 {Error Domain=NSOSStatusErrorDomain Code=-12203 (null)}} AVURLAsset: AVURLAsset: 0x600002504980, URL = file:///Users/xx/Music/Music/Media.localized/Music/xx/xx/xx.mp3 It only happens with audios from Music folder Something interesting is that the app has permission for Music & Apple Music in Security & Privacy from System preferences Is something else needed to access music folder ?
Topic: Media Technologies SubTopic: General Tags:
Apr ’21
Reply to SwiftData does not retrieve my inverse one-to-many Relationship
Your code actually throws the following error when saving the context (if you add do...try... catch for context.save()) SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= (entity: ThirdModel; id: 0x60000028c520 ; data: { name = my third model; parent = nil; }), NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=parent, NSValidationErrorValue=null} To avoid the error, change the to-one relationship to Optional. Also, when declaring a relationship, use var because SwiftData maintains it for you. If you declare your models in the following way, your code will work: final public class SecondModel { var parent: FirstModel? ... } @Model final public class ThirdModel { var parent: SecondModel? ... }
Topic: Programming Languages SubTopic: Swift Tags:
May ’24