Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Today, mysteriously, the sample code works again. How could this possibly happen? Yesterday all my App Store apps weren't able to resolve and create file bookmarks, and today they work again. It's hard to guess at an exact cause, but this particular error: Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key ...comes from one of the intermediate daemons involved in resolving security scoped bookmarks. If there was a problem in one of the lower level daemons it communicated with, then it's possible the problem would resolve itself if/when that daemon restarted. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’24
Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Before updating to macOS 15 Sequoia, I used to be able to create file bookmarks with this code: let openPanel = NSOpenPanel() openPanel.runModal() let url = openPanel.urls[0] do { let _ = try url.bookmarkData(options: [.withSecurityScope]) } catch { print(error) } Now I get an error Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key These are the entitlements: com.apple.security.app-sandbox com.apple.security.files.user-selected.read-write com.apple.security.files.bookmarks.app-scope Strangely, my own apps continued working, after updating to macOS 15 some days ago, until a few moments ago. Then it seems that all of a sudden my existing bookmarks couldn't be resolved anymore, and no new bookmarks could be created. What could be the problem?
28
0
3.6k
Sep ’24
WorldTrackingProvider Not running. Arkitsession terminated
Hi everyone I am working on a small project that requires World Anchors so that I can persist my content through whenever the user chooses to leave/close the app. However I can't manage to make my Arkit session to run even though I think all the privacy permissions have been set and allowed correctly. Here is a sample code in an empty scene: // // WorldTrackingView.swift // SH_AVP_Demo // // Created by 李希 on 9/19/24. // import SwiftUI import RealityKit import RealityKitContent //import VisionKit import ARKit import Foundation import UIKit import simd struct WorldTrackingView_test: View { @State var myCube = Entity() @Environment(.scenePhase) var myScenePhase var body: some View { RealityView { content in //Load Scene if let Scene = try? await Entity.load(named: WorldTrackingScene, in: realityKitContentBundle){ //Add scene to the view content.add(Scene) //Look for the cube entity if let cubeEntity = Scene.findEntity(named: Cube){ myCube = cubeEntity // Create collission for the cube myCube.generateCollisionSha
2
0
702
Sep ’24
Reply to Help with 2 way relationships with classes (SwiftData / cloudkit)
I'm getting 2 errors when I try add cloudkit.. The first because a direct relationship does not exist and the second is a container issue ... error: Store failed to load. (type: SQLite, url: file:///var/mobile/Containers/Data/Application/D931D996-869F-4CED-842E-D1373B0DE090/Library/Application%20Support/default.store) with error = Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=CloudKit integration requires that all relationships have an inverse, the following do not: GroupData: task GroupSortOrder: group TaskData: groupSortOrders} with userInfo { NSLocalizedFailureReason = CloudKit integration requires that all relationships have an inverse, the following do not:nGroupData: tasknGroupSortOrder: groupnTaskData: groupSortOrders; } SwiftData/PersistentModel.swift:327: Fatal error: Unable to find a container with entity GroupSortOrder My classes are as follows: import SwiftData @Model class TaskData: Identifiable, Equatable { var id = UUID() va
Sep ’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 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
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
On Log Noise - Debugging
I came across several errors being reported when I run my app, however my app seems to function correctly. I believe they fall in the category listed on this ( now locked ) thread https://developer.apple.com/forums/thread/115461 However, I wanted to post the ones I found to clarify ( close to submission) just in case any of these end up being more than just log noise later. PLEASE let me know if you've come across these before and whether they impacted anything or if you can confirm they are just log noise. Thanks in advance! -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations AVAudioSession_iOS.mm:2,223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.” UserInfo={NSDebugDescription=The connecti
10
0
3.1k
Aug ’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
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