Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Code=4097 "connection to service named com.apple.storekitd"
StoreKit don't work with iOS 17.4. After updating to iOS 17.4 our users can't make any purchases in App. Its very critical bug that affected our App. : Error in remote proxy while checking server queue: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitd UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} [df94_SK2] Failed in XPC product request products(IDs: [report]): Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitd UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} Does anyone know what to do?
1
0
1.7k
Mar ’24
Reply to JSON DATA CORRUPTED ERROR
ataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 Invalid value around line 1, column 0. UserInfo={NSDebugDescription=Invalid value around line 1, column 0., NSJSONSerializationErrorIndex=0}))) dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/eshansingh/Library/Developer/Xcode/DerivedData/EmployeeManagement-bfquzjwgjywziwfrfyygkodtlgop/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to How to access files when running XCTests in Ventura. Currently I receive "unauthorised access" errors.
Isn’t that the expected outcome? Oooo, negative questions are hard to answer in English (-: I ran a quick test of a regular app on macOS 13. Granting Full Disk Access to the app avoids the need for Files and Folders > Removable Volume. So this problem is somehow related to xctest. I then retried using a Swift package. Specifically, I created a simple package: % swift package init and modified the test like so: % cat Tests/TestTests/TestTests.swift import XCTest @testable import Test final class TestTests: XCTestCase { func testExample() throws { let url = URL(fileURLWithPath: /Volumes/TCCTestRemovable/test.txt) let d = try Data(contentsOf: url) print(count:, d.count) } } where TCCTestRemovable is a removable volume. Running this test from Terminal works: % swift test … count: 14 That’s because Terminal on my Mac has the Files and Folders > Removable Volumes privilege. In TCC parlance, Terminal in the responsible code for any programs you run from the shell. If I remove that privilege, the test fails: %
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Unable to upload your app for notarization.
*** Error: Notarization failed for 'app.zip'. *** Error: Unable to upload your app for notarization. Failed to get authorization for username xxxx and password. ( Error Domain=NSCocoaErrorDomain Code=0 Status code: 0 UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.} ) (-1011) { NSLocalizedDescription = Unable to upload your app for notarization.; NSLocalizedFailureReason = Failed to get authorization for username 'xxxx' and password. (n Error Domain=NSCocoaErrorDomain Code=0 Status code: 0 UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}n); }
2
0
970
Oct ’21
Reply to security-scoped bookmarks
In the hopes of helping someone else - here's a better statement of the problem:-(BOOL) writeBookmarkForURL:(NSURL*)thisURL ofType:(NSUInteger)thisType asReadOnly:(BOOL)readOnly; { BOOL didWriteURL = NO; NSError *thisError = nil; if (readOnly) { bookmarkCreationOptions = (NSURLBookmarkCreationOptions)(NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess); } else { bookmarkCreationOptions = (NSURLBookmarkCreationOptions)(NSURLBookmarkCreationWithSecurityScope); } NSLog(@ready to: bookmarkDataWithOptions bookmarkCreationOptions:%ld,bookmarkCreationOptions); NSData*myData = [thisURL bookmarkDataWithOptions:bookmarkCreationOptions includingResourceValuesForKeys:nil relativeToURL:nil error:&thisError]; if(thisError!=nil) NSLog(@bookmarkDataWithOptions ERROR errorDesc:%@,[thisError debugDescription]); else if(myData!=nil)NSLog(@bookmarkDataWithOptions SUCCESS errorDesc:%@,[thisError debugDescription]); if(myData!=nil){ thisError=nil; NSURL*bookmarkURL = [self bookmarkURLForType:(int)thisType]; NSLog(@ready to:
Topic: Code Signing SubTopic: General Tags:
Dec ’16
Reply to Read the files in that folder
There was no update because you missed my point: you were able to save the bookmark by an accident, but your code was still wrong (AFAICT). I hesitate to provide sample code, because I'm not sure exactly what your requirements are (and it's not my job to do your job), but here:import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching (_ notification: Notification) { // Create the Application Support subfolder if necessary let fileManager = FileManager.default let appSupportURL = fileManager.urls (for: .applicationSupportDirectory, in: .userDomainMask).first!.appendingPathComponent (com.example.testbookmark) do { // Note: this will fail after the first time, but the failure will be detected when the bookmark file read is tried try fileManager.createDirectory(at: appSupportURL, withIntermediateDirectories: true, attributes: nil) } catch { } // Look for an existing bookmark to the Documents folder let bookmarkURL = appSupportURL.appendingPathComponent
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’17
Reply to Error Domain=NSCocoaErrorDomain Code=3840 AND
my bad i forgot my code : import Foundation import UIKit protocol HomeModelDelegate { func itemsDowloaded(client:[Client] ) } class HomeModel : NSObject { var delegate:HomeModelDelegate? func getItems(){ //Hit the conn url let serviceURL = http://myFTPSERVER/service.php //Download the JSON Data let url = URL(string: serviceURL) if let url = url { // Create a URL Session let session = URLSession(configuration: .default) let task = session.dataTask(with: url) { (data, url, error) in if let data = data { //Succed print(data) //call the parseJson self.parseJson(data) }else{ } } // Start the task task.resume() } //notify the view controller and pass the data back } func parseJson(_ data:Data){ var clientArray = [Client]() do { //Parse the data into Client structs let jsonArray = try JSONSerialization.jsonObject(with: data, options: []) as! [Any] print(jsonArray) //loop through each result in the json array for jsonResult in jsonArray { //Cast json result as a dictionary let jsonDict = jsonResult as! [String:String
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22
my app crash in second launch on iOS 13 and above
my app crash in second launch on iOS 13 and above Need help take a look the log : 2020-08-04 14:33:45.464576+0000 ExMessager[13501:1547907] CFURLSetResourcePropertyForKey failed because it was passed an URL which has no scheme 2020-08-04 14:33:45.695751+0000 ExMessager[13501:1548827] [CoreBluetooth] XPC connection invalid 2020-08-04 14:33:45.842033+0000 ExMessager[13501:1548811] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated. UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.} 2020-08-04 14:33:45.842033+0000 ExMessager[13501:1548827] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated. UserInfo={NSDebugDescription=The connection to service on pid 0
2
0
5k
Aug ’20
Error with JSON in App
So when I try retreive the JSON from my site I get an error with the Json problem, here it is Error Domain=NSCocoaErrorDomain Code=3840 Garbage at end. on this line of code let json = try NSJSONSerialization.JSONObjectWithData(data!, options: .MutableContainers) as! NSDictionaryit happens with both NSArray and NSDictionary
2
0
966
Jul ’16
Reply to NSEntityMigrationPolicy Changing an optional to a non-optional
Yeah.. just to make sure I'm giving the correct info.iOS app.Going from version 1 to version 2 of the dataModel.Created dataModel2 (and made default)Changed dataModel2's two properties (latitude and longitude) into Doubles (they were strings)Created a MappingModel (Event to Event) with all of the entities.Set the MappingModel to use EventTransformationPolicyIn app delegate - used the following for options for the persistentStoreCoordinatorlet options = [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption: false]class EventTransformationPolicy: NSEntityMigrationPolicy { func fromStringToDouble (string: String) -> Double { return (string as NSString).doubleValue } override func createDestinationInstancesForSourceInstance(sourceInstance: NSManagedObject, entityMapping mapping: NSEntityMapping, manager: NSMigrationManager) throws { print(Converting Event) let newEvent = NSEntityDescription.insertNewObjectForEntityForName(mapping.destinationEntityName!, inManagedObjectCont
Jan ’16
Reply to XCode 11.7 & 12 Plug-In Fatal Error
2020-10-11 18:59:08.680 Xcode[34078:994651] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDE.IDEiOSSupportCore (/Applications/Xcode-beta.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3588 dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore, 265): Library not loaded: /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice Referenced from: /Applications/Xcode-beta.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore Reason: image not found UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore, NSDebugDescription=dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore, 265)
Oct ’20
iPadOS 18 Beta and SwiftData issues
I had a series of @Model classes with some mandatory attributes and some optional. Pre-move to 18, everything was working fine. After the migration, it reports that every single non-Optional attribute is nil upon trying to save. The error is CoreData related but not sure if its in the Core layer or Swift layer. Sample error (with app data removed) is : SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 Multiple validation errors occurred. Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=systemName, NSValidationErrorValue=null} I have modified the code to provide default values for all constructors in an attempt to see a difference, but get the same errors
3
0
1k
Jun ’24