Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to iPadOS 18 Beta and SwiftData issues
I have the exact same issue and just filed a report FB15146262. iOS 18 doesn't set the one-to-many relationship from the 'one' side, i.e. setting student.school = school will actually keep the relationship at nil and can't be saved into context. This is visible in the debugger error message: SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= (entity: Student; id: 0x600000223380 x-coredata://3B392729-2729-4812-B567-647032714A50/Student/t6F58A598-9DC2-4927-A418-8D37D760FC072; data: { name = jack; school = nil; }), NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=school, NSValidationErrorValue=null} The workaround by @Rainbowql with additionally calling append fixes this issue on iOS 18 but causes the app to crash on iOS 17, because the relationship is already set normally before calling append. On iOS 17, you will get: SwiftData/PersistentModel.swift:540: Fatal error:
Sep ’24
Reply to VoIP push notifications may not be received
I have asked the customer to do unlock the iPhone as soon as it is turned on, and they are supposed to do so, but we have received additional questions about this behavior. Because APNs push and local push are mixed up in my logs, I am a bit confused and unable to answer the customer yet now. For this reason, I have separated APNs push and local push, and arranged the app and iPhone operations in chronological order. Looking at this, could you please answer the following three questions? [Question 1] If my arrange the app and iPhone operations in chronological order, they would look like this. Do you agree with me on this? [Question 2] In this log, should I suspect that the inability to receive APNs PUSH at point 5 is due to a network problem? There was no problem with the network, and the iPhone was not unlocked, so did it simply discard the PUSH received from the network? (From what I understand, I assume it's the latter.) [Question 3] I believe that the sysdiagnose log at points 8 and 10 is a log for local
Sep ’24
Symbol not found in flat namespace with [NSBundle load]
I am having an issue with Xcode 15 when I create an archive build of my application. The general structure I something like: Main Application: Links to staticLib.a Plugins: use datatypes in staticLib.a When I build an archive build and load the bundle for the plugin, I get the following type of errors: Error Domain=NSCocoaErrorDomain Code=3588 dlopen(pluginBinary, 0x0109): symbol not found in flat namespace '_OBJC_CLASS_$_FIRST_MISSING_CLASS' This program runs fine and finds the plugins without issues if I run the program from Xcode. It also will run and find the plugins correctly if I build a release build using xcodebuild. Only if I use Archive does it fail to load these files in the flat namespace. The plugins and the main binary say they use the TWOLEVEL namespace using otool -hV on them. If I link the static library to the plugin, I get undefined behavior because both are linking to the same binary. The plugins are using: -undefined dynamic_lookup in their linker flags. Any ideas how to resolve
4
0
922
Sep ’24
Sandboxed Electron macOS app can't access Photos library
I have an Electron app built for macOS, and it was distributed via 'Developer ID' for years, it worked well and I was able to access the photos in the system Photos library. Surely I already have the 'NSPhotoLibraryUsageDescription' key in Info.plist. Recently we are trying to publish this app to Mac App Store, so I have to turn on the sandbox, after that the app starts giving XPC errors while accessing the Photos library. The errors look like: PHAuthorizationStatus: Authorized CoreData: XPC: sendMessage: failed #0 CoreData: XPC: Unable to sendMessage: to server ... CoreData: XPC: sendMessage: failed #7 CoreData: XPC: Unable to connect to server with options { NSPersistentHistoryTrackingKey = 1; NSXPCStoreServerEndpointFactory = ; skipModelCheck = 1; } CoreData: XPC: Unable to load metadata: Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={Problem=Unable to send to server; failed after 8 attempts.} CoreData: fault: Unable to create token NSXPCConnection. NSXPCStoreSer
5
0
1.2k
Aug ’24
After creating an hardlink sandboxed app cannot write to it anymore
I'm developing an application that uses hardlinks to track certain files created by the app. Initially, before the hardlink is created, the files behave as expected. For example, if the app generates a .number file, I can open and edit it with Numbers without any issues. However, once the hardlink is created, the file appears locked, and Numbers can no longer write to it. Checking the logs in the Console app, I see that Numbers throws an NSCocoaErrorDomain error with code 513. This problem only occurs with sandboxed apps—non-sandboxed apps like Visual Studio Code work fine. I’ve also tried creating the hardlink manually using the ln command in Terminal, but the behavior is the same. I'm currently on a M1 Pro mac running Sonoma 14.2.1. I've also tried on an intel one running Sonoma 14.4 and the behaviour is the exact same. This issue doesn’t occur with symlinks, but my application specifically requires hardlinks, and I haven't been able to find a workaround. Does anyone have any suggestions?
4
0
806
Aug ’24
Unable to see sticker pack in simulator
Hello, I am trying to update my 3 sticker packs. I updated them a few years ago with no problem. I have uploaded my new stickers and when I try to test with simulator, they are not showing up. I tried making a new pack with only 3 small stickers (total of 44kb for all 3) using the template and I got the same errors, nothing shows up in simulator. This is what I get: mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] setAllowableTypes_block_invoke:1242: *** CGImageSourceSetAllowableTypes - ignoring unknown: 'public.avci' Received Connection Invalid mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application. [com.apple.MobileSMS:2F148998-0636-4F50-B2E6-834AD4394B69] Error when getting current app configuration for a
5
0
1.2k
Jun ’24
Read and write permission error in FilterDataProvider Network Extension class
Hi, in my Extension FilterDataProvider class that is inherited from NEFilterDataProvider i am trying to insert logs into my CoreData entity, but when i insert it gives me error NSCocoaErrorDomain: -513 reason: Unable to write to file opened Readonly Any suggestions please to update the read write permission i already have tried this way but no luck let description = NSPersistentStoreDescription(url: storeURL) description.shouldInferMappingModelAutomatically = true description.shouldMigrateStoreAutomatically = true description.setOption(false as NSNumber, forKey: NSReadOnlyPersistentStoreOption) ?
4
0
696
Aug ’24
Reply to Unhandled exception finding default Directory URL '+[NSPersistentContainer defaultDirectoryURL] Could not conjure up a useful location for writing persistent stores.'
CoreData: error: Failed to create directory file:///Users/rick/Library/Application%20Support/Benchmarks: NSCocoaErrorDomain (513) CoreData: fault: Unhandled exception finding default Directory URL '+[NSPersistentContainer defaultDirectoryURL] Could not conjure up a useful location for writing persistent stores.' https://github.com/vanvoorden/2024-08-26 I am running into these errors when attempting to run a benchmark on a SwiftData context from the 2024-08-26 repo. The errors seem to be harmless… the benchmark continues without crashing on those unhandled exceptions. https://github.com/vanvoorden/2024-08-02/ I seem to have no problem running against SwiftData from a different Swift Package Executable (2024-08-02). This package seems to build and run with no errors. This package also creates the expected directory under ~/Library/Application%20Support/2024-08-02. I don't yet completely understand what is happening… but there seems to be some reason why Benchmarks is failing to create that extra direct
Aug ’24
Reply to Using core data in ShieldConfigurationExtension
I think it's quite likely that the sandbox is blocking access to Core Data. I'm using it via Swift Data: do { container = try ModelContainer( for: Settings.self, configurations: ModelConfiguration(allowsSave: allowsSave) ) context = ModelContext(container) } catch { fatalError(*** Failed to create BreakManager: (error)) } I get an error when I try to create the ModelContainer: Failed to register for com.apple.managedconfiguration.effectivesettingschanged: 9 Could not register for user invalidated notifications; status = 9 error: (3) access permission denied error: Encountered exception error during prepareSQL for SQL string 'SELECT TBL_NAME FROM SQLITE_MASTER WHERE TBL_NAME = 'Z_METADATA'' : access permission denied with userInfo { NSFilePath = /private/var/mobile/Containers/Shared/AppGroup//Library/Application Support/default.store; NSSQLiteErrorDomain = 3; } while checking table name from store: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (2
Aug ’24
Reply to VoIP push notifications may not be received
Between 2024-08-08 19:34:16.813 and 2024-08-09 09:27:29.415, Customer is reporting that used my VoIP app via LTE connection. And during that time the server sent a PUSH request 144 times to APNs(I confirmd this from my server log), but the APNs PUSH was not received on an iPhone. (didReceiveIncomingPushWithPayload was not called). Why? A few different issues: An update had been installed and the device had not been unlocked. Note messages like: 2024-08-08 19:34:55.328+0900 routined[38:1637] [DATA PROTECTION] unlocked since boot, NO 2024-08-08 19:34:56.329+0900 atc[47:2598] [Default] Device locked, waiting for first unlock. 2024-08-08 19:34:58.530+0900 carkitd[153:2177] [DNDWD] Not fetching vehicle state - device has not unlocked since boot. 2024-08-08 19:34:59.066+0900 sharingd[68:3068] [AutoUnlock] ### Device not unlocked on start up after retry (state: ) 2024-08-08 19:35:00.546+0900 itunesstored[202:3664] [StoreServices] SSXPCServer: Invalidating connection; device has not been unlocked since boot and then
Aug ’24
Reply to VoIP push notifications may not be received
This customer is using local push in a Wi-Fi Area, And using APNs push out of a Wi-Fi Area(=in a LTE) The following issues were reported in each area. About local push issue Could you tell me mean of following error in a sysdiagnose202408.zip > localpush-sysdiagnose? 2024-08-08 09:42:39.411505+900: nssessionmanager NESMAppPushSession[LocalPushDefaultConfiguration:CF5370FF-878F-4B2E-B39A-8B672E9F678F] failed to report incoming call to CallKit, error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.callkit.networkextension.messagecontrollerhost was invalidated from this process. UserInfo={NSDebugDescription=The connection to service named com.apple.callkit.networkextension.messagecontrollerhost was invalidated from this process.} Extention called reportIncomingCall at 2024-08-08 09:42:39.406(I confirmed it from my VoIP app log), but iOS doesn't kick my VoIP application. Does above log specify cause of this behaviour? (Not only this, but even for 182 calls from 202
Aug ’24
Available Storage displayed in iOS setting is not correct
Hi~recently I have storage issue as follows: Go to iOS Settings -> iPhone Storage , it shows available storage is enough (ex.180.38 GB) But app will get disk full error when trying to write large file (ex. 26 GB) Error Domain=NSCocoaErrorDomain Code=640 The file couldn’t be saved because there isn’t enough space. UserInfo={NSUnderlyingError=0x282db8ae0 {Error Domain=NSPOSIXErrorDomain Code=28 No space left on device}} Then I write the following code to log available space and found it is only 26.95 GB available not 180.38 GB as UI displayed NSError *error = nil; NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:path error: &error]; NSNumber *sizeValue = [dictionary objectForKey:NSFileSystemFreeSize]; uint64_t totalFreeSpace = [sizeValue unsignedLongLongValue]; print(@“ %@ Free space available., [NSByteCountFormatter stringFromByteCount:totalFreeSpace countStyle:NSByteCountFormatterCountStyleFile]); Does any one know what reason may cause this strange situ
4
0
1.7k
Mar ’24
API Call from inside Vision Pro
I'm trying to hit an API URL, however I am getting this error (501) Invalidation handler invoked, clearing connection (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port This is what my info.plist looks like - This is the code I'm using to hit the URL and get a response func sendMessage() { guard let url = URL(string: https://API_URL) e
1
0
474
Aug ’24
Couldn't read values in CFPrefsPlistSource when presenting UIActivityViewController
When I try to display a UIActivityViewController, I get funky logging in the xcode console. This is my code: @IBAction func shareAction(_ sender: Any) { // text to share let text = Some very interesting text! let url = Constants.URL.appStore.absoluteString guard let logo = UIImage(named: App Logo)? .circle() .resize(333, 333) else { return } // set up activity view controller let itemsToShare: [Any] = [ logo, text, url ] let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = self.view // exclude some activity types from the list if #available(iOS 15.4, *) { activityViewController.excludedActivityTypes = [ .airDrop, .sharePlay ] } else { activityViewController.excludedActivityTypes = [ .airDrop ] } // present the Share Sheet self.present(activityViewController, animated: true, completion: nil) } The logging emerges in the console as soon as the code calls: self.present(activityViewControll
1
0
1.5k
Mar ’24