Hi Team,I am using NSPersistent store container, when calling save context method I am getting below error.Can you please help me out to figure out what exactly the issue is -:Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=256 The file “FileName.sqlite” couldn’t be opened. UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/77BD98A1-5EF1-4EF6-8F53-827F820F1238/Library/Application Support/FileName.sqlite, NSSQLiteErrorDomain=10, NSUnderlyingException=disk I/O error}, [NSUnderlyingException: disk I/O error ( 0 CoreFoundation 0x00000001818d6da4 <redacted> + 252 1 libobjc.A.dylib 0x0000000180a905ec objc_exception_throw + 56 2 CoreData 0x00000001841af760 <redacted> + 2932 3 CoreData 0x0000000184225f84 <redacted> + 124 4 CoreData 0x00000001842a8ba4 <redacted> + 84 5 libdispatch.dylib 0x00000001811c8ae4 <redacted> + 16 6 libdispatch.dylib 0x00000001811d1640 <redacted> + 56 7 CoreData 0x00000001842a8aa0 <redacted> + 256 8 CoreDataYour Hel
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,I have an issue with store and migrations and I cannot yet figure out what it is.I'm doing progressive manual migrations (not lightweight) and for some users, when I try to find a model compatible with the store, I'm unable to.This seems to happen for users with a brand new store. They install the app. They open it once and either face the issue immediately, or maybe they may have closed the app quickly after launch (eg. put in the background) and reopened it later. In some cases, there might have been an instance of a NSCocoaErrorDomain 134000 error on the first launch of the app when attempting to read the metadata from a store (that didn't exist yet).When the app opens, model.isConfiguration(withName:, compatibleWithStoreMetadata:) returns false, so I'm triggering the migration flow.I'm iterating on a list of models to try to find the one compatible with the user's store (it should be the most recent model anyways, since the app was just installed).None of my existing models seem to be compa
I've downloaded xip-archive of Xcode to my external drive and tried to unarchive it. Then I opened Xcode.app and got this error. Same error I've got on my internal drive.My OS: macOS Hight Sierra 10.13.4Xcode 9.3------------------------------------------------------------------------------------------------[MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.dbg.DebuggerLLDB (/Volumes/Untitled/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3587 dlopen_preflight(/Volumes/Untitled/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB): Library not loaded: @rpath/LLDB.framework/LLDB Referenced from: /Volumes/Untitled/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB Reason: image not found UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Volumes/Untitled/Xcode.app/Contents/Plug
I faced the same issue, couple of times:Details:Do Not Disturb Schedule is turned onOn iPhone 7 (iOS 9.4)Please test database changes to Private RecordZone during the Do Not Disturb Schedule.Please could others confirm whether it happened during Do Not Disturb Schedule ?Error:Error connecting to CloudKit daemon: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.cloudd UserInfo={NSDebugDescription=connection to service named com.apple.cloudd}
Topic:
Graphics & Games
SubTopic:
GameKit
Tags:
I get the following message in the console when I run consecutive healthkit queries on iOS beta 2.The error does not seem to happen on iOS 11.4.Has anyone else seen this and/or have a solution. The application does not crash and no errors are logged.[query] <HKSampleQuery:0x280656760 deactivated>: Error reactivating query: Error Domain=NSCocoaErrorDomain Code=4099 The connection from pid 0 was invalidated from this process. UserInfo={NSDebugDescription=The connection from pid 0 was invalidated from this process.}This error also appears in the console.[query] <HKStatisticsCollectionQuery:0x280c401a0 deactivated>: Error reactivating query: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.healthd.server was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid. UserInfo={NSDebugDescription=The connection to service named com.apple.healthd.server was interrupted, but the message was sent over an a
In XCode 9.4.1, #fileLiteral is working well with .txt file, .pdf file while crashed with loading a .mlmodelBelow is the error msg:Playground execution failed:error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).The process has been left at the point where it was interrupted, use thread return -x to return to the state before expression evaluation.* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x000000011fc1356e libswiftFoundation.dylib`Foundation.URL.init(fileReferenceLiteralResourceName: Swift.String) -> Foundation.URL + 206 frame #1: 0x000000012368f5c3 $__lldb_expr2`main at Image Detection.xcplaygroundpage:17 frame #2: 0x0000000109763600 CoreML`linkResources + 304 frame #3: 0x000000010aeff15c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 frame #4: 0x000000010aefe910 CoreFoundation`__CFRunLoopDoBlocks + 336 frame #5: 0x000000010aef9174 CoreFoundation`__CFRunLoopRun + 1
I put your code into a test project here and then tweaked the catch clause to print the error: NSLog(error %@, error as NSError)Here’s what I see:2018-07-23 10:36:18.485751+0100 xxsi[3066:315833] error Error Domain=NSCocoaErrorDomain Code=264 The file “notam.cgi” couldn’t be opened because the text encoding of its contents can’t be determined. UserInfo={NSURL=https://flightplanning.navcanada.ca/cgi-bin/Fore-obs/notam.cgi?ni_FIR=on&Stations=CZEG}So the problem isn’t that you can’t load the resource, it’s that the resource isn’t being parsed correctly. That’s because of a text encoding problem; you’re using String(contentsOf:), whose text encoding behaviour is not well specified. I strongly recommend that you fetch the resource using URLSession. For example, code like this: let url = URL(string: https://flightplanning.navcanada.ca/cgi-bin/Fore-obs/notam.cgi?ni_FIR=on&Stations=CZEG)! let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0) URLSession.
Topic:
App & System Services
SubTopic:
Networking
Tags:
I am having some issues decoding `null` responses from some REST APIs, using JSONDecoder. According to the spec, `null` is a valid JSON text, along with `true` and `false :A JSON value MUST be an object, array, number, or string, or one of the following three literal names: false null trueThough when I use JSONDecoder to handle the response of a DELETE or a GET for non-existent values (both of which return a 200 HTTP status code with `null` in the body), I get the following error :Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 JSON text did not start with array or object and option to allow fragments not set. UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}))))Seems that the default decode(type:data:) calls JSONSerialization.jsonObject(with: data) without the allowFragments reading opti
Hi everyone,I have an error on my app. When I launch it, the log shows:[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}The app is freeze during this warning, which appear at least 20 times in just one second.Any idea?Thanks in advance.Best regards,Rubén
When using NSString.localizedUserNotificationString(:_) with an argument, the system service responsible for user notifications fails.[Connections] [REDACTED_BUNDLE_ID] Adding notification request failed with error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.usernotifications.usernotificationservice UserInfo={NSDebugDescription=connection to service namedIf the arguments argument is nil, this problem does not occur.Localizable.stringsnotification_one = Here's a number: %D; notification_two = Hello;Swiftlet notificationContentOne = UNMutableNotificationContent() notificationContentOne.body = NSString.localizedUserNotificationString(forKey: notification_one, arguments: [5]) UNUserNotificationCenter.current().add(notificationContentOne) // <-- Service error let notificationContentTwo = UNMutableNotificationContent() notificationContentTwo.body = NSString.localizedUserNotificationString(forKey: notification_two, arguments: nil) UNUserNotificationCenter.current().ad
Im getting similar error while using CoreTelephony on unwantedCommunication Extension.I have linked CoreTelephony as linked library and this is my troublesome code.. let networkInfo = CTTelephonyNetworkInfo() let carrier = networkInfo.subscriberCellularProvider print(carrier);and my error log is: 2018-08-08 14:24:55.100318-0400 ReportSpam1Extension[4192:295308] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}Please help.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
Everywhere I can find the same solution to retrieve carrier information. So Im sure it works. but, For me its returning an error:Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}The code that generates this error is inside unwanted message communication extension like:let networkInfo = CTTelephonyNetworkInfo() let carrier = networkInfo.subscriberCellularProvider print(carrier);As it works in the parent app but not inside the target extension, Im sure that the Extension is not allowing me to do so. If thats the case then what are my other options? It would be a roadblock if I cannot send the Carrier Name of the user along with the userInfo.
I have since tried to instantiate and decode my data manually with various permutations of NSKeyedUnarchiver methods, but I keep running into issues. Here's one of the ways I rewrote the call to +[NSKeyedUnarchiver unarchiveObjectWithData:]:NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; [unarchiver setRequiresSecureCoding:NO]; cookies = [[Cookies alloc] initWithCoder:unarchiver];Here's the initWithCoder: method from my Cookies class:- (id)initWithCoder:(NSCoder *)coder { if (self = [super init]) { _version = [coder decodeObjectForKey:keychainVersion]; _cAccount = [coder decodeObjectForKey:currentAccount]; _pAccount = [coder decodeObjectForKey:primaryAccount]; _dict = [coder decodeObjectForKey:dictionary]; _shouldHaveFirstRunToken = [coder decodeBoolForKey:shouldHaveFirstRunToken]; } return self; }I traced this method call with my debugger, and I found that my call to initWithCoder returns an empty Cookies object. That is, all the calls to -[NSKeyedUnarchiver decodeObj
Topic:
Programming Languages
SubTopic:
General
Tags:
I changed th saveroutin to:- (void)saveImage:(NSImage *)sourceImage toPixelDimensions:(NSSize)newSize path:(NSURL*)myUrl filename:(NSString*)newFileName { NSLog(@Absoluter String from NSURL %@,[myUrl absoluteString]); NSLog(@FileName %@,newFileName); NSInteger index = 0; for (NSString *line in sizeTable) { NSArray *sizeArray = [line componentsSeparatedByString:@x]; NSUInteger sizex = [[sizeArray objectAtIndex:0] integerValue]; NSUInteger sizey = [[sizeArray objectAtIndex:1] integerValue]; //NSLog(@%lu , %lu,sizex,sizey); NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:sizex//newSize.width pixelsHigh:sizey//newSize.height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0]; rep.size = newSize; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:rep]]; [sourceImage drawInRect:NSMakeRect(0, 0, newSize.width, newSize.h
Topic:
Developer Tools & Services
SubTopic:
Developer Forums
Tags:
If am using that:BOOL test = [pngData writeToURL:[NSURL URLWithString:saveFileName] options:NSDataWritingAtomic error:&myError]; NSLog(@%@,myError); //BOOL test = [pngData writeToURL:[NSURL URLWithString:saveFileName] atomically:YES]; if(test == true){ //NSLog(@Gespeichert); NSLog(@Saved as %@,[saveFileName stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]); }else{ NSLog(@Error request: Failed to save Images %@,myError); }i get this Error:2018-08-23 16:01:00.016 ImageToAsset[779:43332] Absoluter String from NSURL file:///Volumes/UserDisk/users/sven/Desktop/New/Test/iPhone%20Xcode%20Asset2018-08-23 16:01:00.016 ImageToAsset[779:43332] FileName iPhone Xcode Asset2018-08-23 16:01:00.034 ImageToAsset[779:43332] file:///Volumes/UserDisk/users/sven/Desktop/New/Test/iPhone%20Xcode%20Asset20@2x.png2018-08-23 16:01:00.073 ImageToAsset[779:43332] Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “iPhone Xcode Asset20@2x.png” in the folder “Test”. UserInfo=
Topic:
Developer Tools & Services
SubTopic:
Developer Forums
Tags: