Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to NSCocoaErrorDomain when trying to run
I'm facing the exact same problem with the application I'm working on. Have tried clean up the build folder also check the permission settings for then DerivedData folder but no result. Build succeeds but get the below error Details: The file “myapp” couldn’t be opened because you don’t have permission to view it. Domain: NSCocoaErrorDomain Code: 257 Failure Reason: You don’t have permission. Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info. User Info: { NSFilePath = /Users/sysuser/Library/Developer/Xcode/DerivedData/myapp-aylojruwzhsbrrbwomkiwefxqlxv/Build/Products/Debug-iphonesimulator/myapp.app; } - The operation couldn’t be completed. Permission denied Domain: NSPOSIXErrorDomain Code: 13 Failure Reason: Permission denied - System Information macOS Version 10.15.7 (Build 19H114) Xcode 12.4 (17801) (Build 12D4e) Please if someone can help resolve this issue?
Feb ’21
Reply to SwiftData unversioned migration
Ok Great! I have created my VersionedSchemas that define my four models and included them in the models property. And created my ModelContainer using the schema initializer Schema(versionedSchema: SchemaV2.self) Yet nothing works. I'm getting a few errors including: 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. and error: Store failed to load. (type: SQLite, url: with error = Error Domain=NSCocoaErrorDomain Code=134504 Cannot use staged migration with an unknown model version. UserInfo={NSLocalizedDescription=Cannot use staged migration with an unknown model version.} with userInfo { NSLocalizedDescription = Cannot use staged migration with an unknown model version.; } I’m concerned that I may have corrupted my database with all the things I’ve been trying. Is there a chance that the database is corrupted, or is there something fundame
Aug ’24
Reply to SKAdnetwork 2.2
I am able to get SKAdnetwork 2.2 for fidelity-type 1 but [SKAdNetwork startImpression:self.impression completionHandler:^(NSError * _Nullable error) { NSLog(@Start SKAdImpression with error: %@, error); }]; Always failing with below error 2021-05-25 17:49:16.120256+0530 SKAdNetworkApp[2409:704536] SKAdNetwork: Error in remote proxy while starting view-through impression: Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 0 named com.apple.storekitservice UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.storekitservice} iOS console logs NSXPCConnection: 0x100978be0 connection on mach service named com.apple.storekitservice from pid 2409: Exception caught during decoding of received selector startAdImpressionWithConfig:completionHandler:, dropping incoming message. Exception: Exception while decoding argument 0 (#2 of invocation): Exception: +[NSNumber enumerateObjectsUsingBlock:]: unrecognized selector sent to class 0x1e613e768 Any idea? Thanks in advance
Topic: App & System Services SubTopic: General Tags:
May ’21
Reply to Issue with .itemProvider on macOS 15.1
Was there a fix for this problem what was not mentioned in the macOS release notes? After ignoring this problem for some time I recently found out, that it works again! But strangely I had to switch back to use .itemProvider, as the above shown solution with FileRepresentation doesn't work when drag and drop to Apple Mail. This will lead to the error: Writing data to /Users/joachim/Library/Containers/com.apple.mail/Data/tmp/WebKitDropDestination-QxhKmpOG/test.txt failed. Error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “test.txt” in the folder “WebKitDropDestination-QxhKmpOG”. UserInfo={NSUserStringVariant=( Folder ), NSFilePath=/Users/joachim/Library/Containers/com.apple.mail/Data/tmp/WebKitDropDestination-QxhKmpOG/test.txt, NSURL=file:///Users/joachim/Library/Containers/com.apple.mail/Data/tmp/WebKitDropDestination-QxhKmpOG/test.txt, NSUnderlyingError=0x600003a964c0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} Any ideas?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Reply to AMFI - framework has entitlements but is not a main binary
Hi there, we are developing an application using Firebase Messenging. Although everything runs smoothly when launching the application from Xcode to a dev iPhone (we can get FCM token and receive push notifications), we also get an AMFI issue when installing the application from Testflight : AMFI: constraint violation /private/var/containers/Bundle/Application/[...]/App.app/Frameworks/FirebaseCore.framework/FirebaseCore has entitlements but is not a main binary The application does not crash, but Firebase library is broken. 11.9.0 - [FirebaseMessaging][I-FCM023014] Error while reading embedded mobileprovision Error Domain=NSCocoaErrorDomain Code=260 The file “embedded.mobileprovision” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/private/var/containers/Bundle/Application/[...]/App.app/embedded.mobileprovision, NSURL=file:///private/var/containers/Bundle/Application/[...]/App.app/embedded.mobileprovision, NSUnderlyingError=0x3007cde00 {Error Domain=NSPOSIXErrorDomain Code=2 N
Topic: App & System Services SubTopic: General Tags:
Mar ’25
Reply to PHPickerViewController fails to load image
UPDATE: I tried using loadFileRepresentation instead. itemProvider.loadFileRepresentation(forTypeIdentifier: UTType.jpeg.identifier) { (url, error) in guard let url = url else { print(Failed to load url) return } And this time I get the following error on the console. `Error copying file type public.jpeg. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 Cannot load representation of type public.jpeg UserInfo={NSLocalizedDescription=Cannot load representation of type public.jpeg, NSUnderlyingError=0x600001d26430 {Error Domain=NSCocoaErrorDomain Code=4101 Couldn’t communicate with a helper application. UserInfo={NSUnderlyingError=0x600001dbcb70 {Error Domain=PHAssetExportRequestErrorDomain Code=0 The operation couldn’t be completed. (PHAssetExportRequestErrorDomain error 0.) UserInfo={NSLocalizedDescription=The operation couldn’t be completed. (PHAssetExportRequestErrorDomain error 0.), NSUnderlyingError=0x600001dbca80 {Error Domain=PAMediaConversionServiceErrorDomain Code=2 The operation could
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Using electron-forge, app signed with codesign fails to verify with spctl
Nothing like a public question to un-wedge the debugging muscle. Debugging this some more, I found that I had not run with DEBUG=electron-notarizer, and turning that on, shows the following output: 2021-12-23T19:09:25.522Z electron-notarize notarizing using the legacy notarization system, this will be slow An unhandled rejection has occurred inside Forge: Error: Failed to upload app to Apple's notarization servers *** Error: Notarization failed for '/var/folders/w8/hsj6918d0fsb8hxb127hqgp00000gn/T/electron-notarize-JveOtm/CloudInstance.zip'. *** Error: Unable to upload your app for notarization. Failed to get authorization for username 'jwatte@observeinc.com' 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 'jwatte@
Topic: Code Signing SubTopic: General Tags:
Dec ’21
Reply to Got a serious NSURLSession background session bug
I'm seeing the same issue with my app. When I restart downloading of a content that previously failed, it sometimes fails with Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory UserInfo={NSErrorFailingURLKey=xxx, NSErrorFailingURLStringKey=xxx}. It will sometimes recover after trying several times. Sometimes I had to reinstall the app to recover from this issue. I see an other error in console that could be related to this issue.Error removing item at url:file:///private/var/mobile/Containers/Data/Application/E58771BB-D7DE-5B6E-547FE8B44E25/Library/Caches/com.apple.nsurlsessiond/Downloads/XXXX/,error:Error Domain=NSCocoaErrorDomain code=4 couldn't be removed.UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/E58771BB-D7DE-5B6E-547FE8B44E2/Library/Caches/com.apple.nsurlsessiond/Downloads/XXX,NSUserStringVariant=(Remove), NSUnderlyingError=0X153e32f90{Error Domain=NSPOSIXErrorDomain code=2 No such file or directory}}I do not know why these errors occur and how to workar
Nov ’17
Reply to setAlternateIconName: did anyone manage to make it work?
Just a heads up for my fellow Googlers, I was having trouble implementing this in my app. Using the simulator, iPhones would work, but iPads would not. I was seeing this error:error: Error Domain=NSCocoaErrorDomain Code=4 The file doesn't exist. UserInfo={NSUnderlyingError=0x60800044b3a0 {Error Domain=LSApplicationWorkspaceErrorDomain Code=-105 iconName not found in CFBundleAlternateIcons entry UserInfo={NSLocalizedDescription=iconName not found in CFBundleAlternateIcons entry}}}I was referencing these two example repos:https://github.com/steventroughtonsmith/AlternateIconTesthttps://github.com/iSame7/AlternateAppIconsI tried a bunch of debugging stuff and finally hit upon something that seems to help. I noticed if I replaced the contents of my AppIcon.appiconset/Contents.json file with one from the example repos, things seem to work on the iPad. I'm not 100% sure what's going wrong, but my Contents.json specifies a filename and I suspect that's the root of the problem. Hopefully this helps future fr
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’17
Reply to iOS USB device access
Hi, eskimo Lightning to USB OTG Adapter is from another vendor. I tried to use CryptoTokenKit in my iOS14+ app to connect to smart card token but I can't to find out how to fix next problem: this is my simple code import CryptoTokenKit let mngr = TKSmartCardSlotManager.default According official documentation in CryptoLibSwift.entitlements I have added this com.apple.security.smartcard but I have this one when app runs 2021-12-22 xxxx CryptoLibSwift[5479:4269434] [smartcard] ctk: connecting to slot registration server ( connection to service on pid 0 named com.apple.ctkd.slot-client) failed, error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.ctkd.slot-client was invalidated. UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.ctkd.slot-client was invalidated.} of course my next code doesn't work but token connected to iPhone let slotName = mngr?.slotNames[0] print(slotName:, slotName) How to fix this? Thanks.
Topic: App & System Services SubTopic: Drivers Tags:
Dec ’21
Reply to Use WeatherKit in an Xcode playground?
Update: This code does not crash the app, and the error returned hints that I might have an access issue. I'm still wondering if this is even possible in a playground. As an aside, I have successfully used Apple's Flight Planner app that is offered as a WeatherKit demo. So my account seems to be authorized or whatever the word is. import UIKit import WeatherKit import CoreLocation let sanFrancisco = CLLocation(latitude: 37.7749, longitude: 122.4194) do { let weather = try await WeatherService().weather(for: sanFrancisco) } catch { print(error) } This produces the error: xpcConnectionFailed(Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.weatherkit.authservice UserInfo={NSDebugDescription=connection to service named com.apple.weatherkit.authservice}) Playground execution failed: error: execution stopped with unexpected state. error: Execution was interrupted. The process has been left at the point where it was interrupted, use thread return -x to return to the state bef
Jul ’23
Reply to Xcode 15's "Replace Container" feature replaces the container with incorrect permissions?
This problem is not repaired in Xcode 15.1 beta 3! This is a serious error that can be easily provoked: in the Window menu, select Device and Simulators, Download Container... and immediately Replace Container... with the one you just downloaded. When the app tries to access the file in .../Library/Application Support, the following error message appears: Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=513 Du hast nicht die Zugriffsrechte, um die Datei „Application Support“ im Ordner „Library“ zu sichern. UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/F2ACE0F7-9446-46B7-8B82-AD269E62C2A1/Library/Application Support, NSUnderlyingError=0x2812861c0 {Error Domain=NSPOSIXErrorDomain Code=13 Permission denied}} Unfortunately this problem prevents us from testing and further developing our app.
Nov ’23
Reply to "Error connecting back to host app" in Safari 13
I have similar problem with simple Safari Extension App.After Safari has been running for some time. On `send()` (button click in popover) 'SFSafariApplication.getAllWindows' stops working and completion handler is never fired. Console shows 'Error connecting back to host app: NSCocoaErrorDomain, code: 4099'.Edit: also 'SFSafariApplication.openWindow' not working after error Tested on Safari Technology Preview - Release 91 (Safari 13.1, WebKit 14609.1.3) MojaveSafariExtensionViewController.swift @IBAction func send(_ sender: Any) { self.count += 1 SFSafariApplication.getAllWindows { (windows) in for window in windows { window.getAllTabs { (tabs) in for tab in tabs { tab.getPagesWithCompletionHandler { (pages) in for page in pages ?? [] { page.dispatchMessageToScript(withName: test, userInfo: [count: self.count]) } } } } } } } @IBAction func open(_ sender: Any) { SFSafariApplication.openWindow(with: URL.init(string: https://google.com)!) { (window) in NSLog(opened) } }script.jsdocument.addEventListene
Topic: Safari & Web SubTopic: General Tags:
Sep ’19
Reply to NSXPCConnection multiple instances.
Hi eskimo,I am trying to build this solution you suggested, but am a bit unclear as to what you mean by:That child ‘checks in’ with the main service.The child creates an anonymous XPC listener (+[NSXPCListener anonymousListener]), gets an endpoint for that listener (endpoint) and passes that endpoint to the service.Is this by letting the launched endpoint task connect to the broker task via NSXPCConnection(serviceName:)?It does not seem to be able to connect to the broker XPC service, I think because its a child task and doesn't have permission to talk to it? Because of this, I can't pass the endpoint back to the main application.Any idea what might be wrong?The error I am getting back in the endpoint task is:Received error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.xxx.yyy.broker was invalidated. UserInfo={NSDebugDescription=The connection to service on pid 0 named com.xxx.yyy.broker was invalidated.}The broker is running when this error occurs and the ma
Mar ’20
Reply to iOS 15 beta 4 CloudKit Auth Error
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:]_block_invoke(2775): - Finished automatic import - SandboxImport - with result: success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134410 (null) UserInfo={NSUnderlyingError=0x280987db0 {Error Domain=CKErrorDomain Code=36 CKInternalErrorDomain: 1028 UserInfo={NSUnderlyingError=0x2809a7900 {Error Domain=CKInternalErrorDomain Code=1028 Account temporarily unavailable due to bad or missing auth token UserInfo={CKErrorDescription=Account temporarily unavailable due to bad or missing auth token, NSLocalizedDescription=Account temporarily unavailable due to bad or missing auth token, NSUnderlyingError=0x2809a69d0 {Error Domain=CKInternalErrorDomain Code=2011 Couldn't get an authentication token UserInfo=0x2812a2200 (not displayed)}}}, CKErrorDescription=Account temporarily unavailable due to bad or missing auth token, NSDebugDescription=CKInternalErrorDomain
Jul ’21