Security scoped bookmarks that were created before updating to macOS 14.7.5 cannot be resolved anymore after updating to macOS 14.7.5. Reproduction: Sandboxed app on macOS version 14.7.4 Create and store a security scoped bookmark to a user selected folder: let url: URL = let data = try url.bookmarkData(options: [.withSecurityScope], includingResourceValuesForKeys: nil, relativeTo: nil) Update to macOS 14.7.5 Resolve the previously stored bookmark: let data: Data = var stale: Bool = true let url = try URL(resolvingBookmarkData: data, options: [.withSecurityScope], relativeTo: nil, bookmarkDataIsStale: &stale) Expected: The bookmark is resolved correctly and the resulting url can be used to access the folder/file in the sandboxed app after starting access. Observed: URL(resolvingBookmarkData:) throws an error: Error Domain=NSCocoaErrorDomain Code=259 The file couldn’t be opened because it isn’t in the correct format. New security scoped bookmarks created on macOS 14.5.7 can be resolved without
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi everyone, I'm facing an issue where I cannot write a file to a shared App Group container in my tvOS app when running on a real device. My code works perfectly on the simulator, but fails on a physical device with a permissions error. I’ve set up an App Group with a custom identifier (e.g., group.), and it’s correctly configured in the Capabilities section of Xcode for both my main app and widget targets. Here’s the code I’m using to save a test file: func saveTestFile() { guard let groupURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group.) else { print(Couldn't access the Group URL.) return } let containerURL = groupURL.appendingPathComponent(Library, isDirectory: true) if FileManager.default.isWritableFile(atPath: containerURL.path) { print(Directory IS writable) } else { print(Directory IS NOT writable) } let fileURL = containerURL.appendingPathComponent(test.txt) let content = Hello App Group! do { try content.write(to: fileURL, atomically: true, encoding: .utf8) print(F
When you create a ModelConfiguration, the default value of the cloudKitDatabase attribute .automatic, which tells SwiftData to enable CloudKit synchronization using the primary CloudKit container from the app’s entitlements. That is why you see that SwiftData automatically picks up the CloudKit container, if you configure one in your project, and enables CloudKit integration. If you don't like the default behavior, pass .none when you create the model configuration. Assuming that you use the Xcode template code to trigger the crash, most likely, you will see the following message in your Xcode console: Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=CloudKit integration requires that all attributes be optional, or have a default value set. The following attributes are marked non-optional but do not have a default value: Item: timestamp} The log makes clear that the failure is triggered because Item: timestam
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I'm unable to get live activity to show up in my app so I started to play with the demo app Emoji Rangers. The demo project initially only created a live activity in-app and then you're able to update it via the demo buttons. I added the following code to have it be able to start a live activity from the backend: func observePushToStartToken() { Task { for await data in Activity.pushToStartTokenUpdates { let token = data.map {String(format: %02x, $0)}.joined() // Send token to the server print(got PUSHTOSTART TOKEN: (token)) } } } I get the token and then I use it to send this payload that should start the activity: { aps:{ timestamp:1743719911, event:start, content-state:{ currentHealthLevel:100, eventDescription:Adventure has begun!, supercharged:true }, input-push-token:1, attributes-type:AdventureAttributes, attributes:{ currentHealthLevel:100, eventDescription:Adventure has begun!, supercharged:true }, alert:{ title:{ loc-key:%@ is on an adventure!, loc-args:[ Power Panda ] }, body:{ loc-key:%@ found a s
Our app has a network extension (as I've mentioned lots 😄). We do an upgrade by downloading the new package, stopping & removing all of our components except for the network extension, and then installing the new package, which then loads a LaunchAgent causing the containing app to run. (The only difference between a new install and upgrade is the old extension is left running, but not having anything to tell it what to do, just logs and continues.) On some (but not all) upgrades... nothing ends up able to communicate via XPC with the Network Extension. My simplest cli program to talk to it gets Could not create proxy: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named blah was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named bla was invalidated: failed at lookup with error 3 - No such process.} Could not communicate with blah Restarting the extension by doing a kill -9 doesn't fix it; neither does r
Thank you for looking into it, very much appreciated. I'm not sure if the errors from the logs you posted are related to the underlying issue. Those same error/exception logs always show up when resolving the first bookmark after app launch, regardless of whether that bookmark resolves/fails. And they also show up on macOS 15. Here are the debug logs for a bookmark that was created before updating to 14.7.5: default 11:20:08.512031+0200 Resolving bookmark: debug 11:20:08.512159+0200 bookmarkRef=<0x600001b2c660 > options=0x400 relativeToURL=(null) propertiesToInclude=(null) repIsStaleP=0x16db12a58 errorRefP=0x16db12898 debug 11:20:08.512214+0200 Client beginning scoped bookmark resolution. debug 11:20:08.512233+0200 Resolution request message is prepared and about to be sent to the agent. debug 11:20:08.512612+0200 0x6000036935c0 rule ^Contents$ added (weight 0, flags 0x12) debug 11:20:08.512650+0200 0x6000036937a0 rule ^(.LSOverride|.DS_Store|Icon |.SoftwareDepot.tracking)$ added (weight 0, flags
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Tested on iOS 18.5, Beta 1 (22EF5042g), same issue is still present. getFileProviderServicesForItem fails when called from the consuming app with: Error Domain=NSCocoaErrorDomain Code=513 The file couldn’t be saved because you don’t have permission. The supportedServiceSources method in the service hosted by the provider app is never invoked when this occurs.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hello, I've encoutered an issue with Safari App Extensions. My extension prints lots of suspect error logs in the Xcode console and inside Console.app. This happens basically whenever I make any interaction with the App Extension or with Safari. The most common and predictable error log I get is: No current extension context; trying most recent context (Subsystem: com.apple.SafariServices) However, I also sometimes get the following error messages, albeit less frequently, which may be related: No extension context for best match No extension context for remote object Error connecting back to host for remote object: NSCocoaErrorDomain, code: 4099 No known extension contexts for profile 00000000-0000-0000-0000-000000000000 Most recent extension context B7223E12-B563-45E0-97F8-50500BC6B994 does not have connection back to host; trying best match context I haven't been able to find anything about these error logs in Apple documentation or on the Internet, so I did a bit of empirical investigation. I repr
I have a basic setup following WWDC 2020 on Safari Web Extensions and another one on XPC. The video even mentions that one can use UserDefaults or XPC to communicate with the host app. Here is my setup. macOS 15.2, Xcode 16.2 A macOS app (all targets sandboxed, with an app group) with 3 targets: SwiftUI Hello World web extension XPC Service The web extension itself works and can update UserDefaults, which can then be read by SwiftUI app - everything works by the book. The app can communicate to the XPC service via NSXPCConnection - again, everything works fine. The problem is that the web extension does not communicate with XPC, and this is what I need so that I can avoid using UserDefaults for larger and more complex payloads. Web Ext handler code: class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling { func beginRequest(with context: NSExtensionContext) { // Unpack the message from Safari Web Extension. let item = context.inputItems[0] as? NSExtensionItem let message = item?.userInfo?[SFExte
Hello, community, I'm using an HTML editor in a .NET MAUI application running on macOS, and I'm encountering some unexpected behavior during text editing: Double-click text selection disappears after approximately one second. Styles randomly revert or are applied to the wrong text unexpectedly. It appears to be related to macOS spell checking. When using editable elements (, or with contenteditable), the system enables spell checking by default. During this, MAUI attempts to communicate with a system process: com.apple.TextInput.rdt, which is not running, leading to repeated errors like: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.TextInput.rdt was invalidated: failed at lookup with error 3 - No such process. Question: What is com.apple.TextInput.rdt, and why might it not be running? Thank you for any help!
Hi All, Trying to validate some altool credentials, produces this error message. Failed to get authorization for username '<username/>' and password with errors:( Error Domain=NSCocoaErrorDomain Code=0 Status code: 0 UserInfo={NSLocalizedDescription=Status code:0, NSLocalizedFailureReason=The auth server returned a bad status code.}) This is returned when altool is called in the following way. xcrun altool --notarization-history 0 -u <username/> -p <password/> --output-format xml macOS 11.2.3 and Xcode 12.5 Things that have been tried already. Making sure the Apple system status page shows no issues. Different networks. Checked to see if any agreements need to be activated. Recreated the app-specific password multiple times. Any other suggestions? @Quinn - Hi Quinn, it's Sam Rowlands (again) and this is with another App Wrapper customer experiencing this issue (so not me directly).
I am unable to connect iPhone to Xcode. Getting error - The developer disk image could not be staged on the host.; Couldn’t communicate with a helper application. Xcode - 16 Beta Mac OS - Sonoma 14.6.1 iOS - 17.6.1 VPN - No Details are as follows: The developer disk image could not be staged on the host. Domain: com.apple.dt.CoreDeviceError Code: 12045 Failure Reason: Couldn’t communicate with a helper application. User Info: { DVTErrorCreationDateKey = 2024-08-21 11:04:09 +0000; DeviceIdentifier = 01162B62-9C06-48A4-B2F7-D17ABD2D35B0; NSURL = file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg; com.apple.dt.DVTCoreDevice.operationName = enablePersonalizedDDI; } -- Couldn’t communicate with a helper application. Domain: NSCocoaErrorDomain Code: 4099 Recovery Suggestion: Try your operation again. If that fails, quit and relaunch the application and try again. User Info: { NSDebugDescription = The connection to service created from an endpoint was invalidated: failed at lookup with error 9 - Bad
I'll preface this to say that I'm not 100% sure this is all accurate, but I wanted to share this problem I was seeing developing a widget for a SwiftUI app in case it helps someone else get to a solution faster. Two weeks ago I released a version of an app which contained a brand new widget. For the kind property of the widget's configuration I just used something generic: AppWidget. Last week we wanted to add an additional widget into the app and I realized that I ought to make the kind be a little more specific. So I renamed the first kind from AppWidget to DailyPromptWidget ... and made the second widget use a kind named DailyCheckInWidget. Then, we started seeing issues where the widget wasn't responding to taps and would eventually go blank. I could add in a new widget to the home screen and that'd work fine. Searching the Internet for ideas yielded nothing. I connected my iPhone to my Mac and launched the Console app and then started tapping on the non-responsive widget. I discovered a few output messag
I'm a bit stuck, I believe I'm experiencing this issue too although I'm not sure if it's exactly the same or not. I'm trying to test a migration from V2 to V3 in the simulator but the app always terminates before didMigrate with issues such as: error: Attempting to retrieve an NSManagedObjectModel version checksum while the model is still editable. This may result in an unstable verison checksum. Add model to NSPersistentStoreCoordinator and try again. error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2313): - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.} BUG IN CLIENT OF CLOUDKIT: Registering a handler for a CKScheduler activity identifier that has already been registered (com.apple.coredata.cloudkit.activity.export.8315617A-2590-4989-A1F0-0AACDDA4713E). I'm not sure the first one is re
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
On iOS 18 only, I've been getting this error from the didFailToContinueUserActivityWithType in AppDelegate, the activity needed for universal links. It didn't happen on previous versions of it. Has anyone encountered this ?