Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to SharePlay Developer Profile not working?
I'm trying with iOS beta 7 and the updated SharePlay Developer Profile and I'm getting the following error: Error preparing group activity: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.group-activities.conversationmanagerhost was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.group-activities.conversationmanagerhost was invalidated: failed at lookup with error 159 - Sandbox restriction.} The call to prepareForActivation() is returning .cancelled without any prompt on the device.
Topic: App & System Services SubTopic: General Tags:
Aug ’21
Ionic NFC Support is NOT available on IOS
Hello, I have a big problem with the NFC (I use Ionic & Capacitor), indeed despite having uninstalled and reinstalled it still gives me the same error when I compile it on an IOS emulator: [CoreNFC] 00000002 822651e0 -[NFCHardwareManager areFeaturesSupported:outError:]:154 XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.nfcd.service.corenfc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.nfcd.service.corenfc was invalidated from this process. I don't understand this error, I correctly add the right line on Info.plist to say that I am using NFC. I use the phonegap plugin made for ionic 5. **Ionic v5.33.1 Angular v12.1.0 Capacitor v1.2.0**
1
0
3.6k
Aug ’21
“History.db” couldn’t be copied because you don’t have permission to access
I am trying to read history of below browsers in Mac through daemon. Safari (History.db) Google Chrome (History) Firefox (places.sqlite) Since the original History.db files are locked, i am copying it to another location so i can read from copied one. However i get below error, **“History.db” couldn’t be copied because you don’t have permission to access Error Domain=NSCocoaErrorDomain Code=512** Any help is much appreciated.
4
0
2.1k
Aug ’21
Reply to Unable to see the list of Applications in FamilyPicker for the parent device
Same behaviour. Following are my logs Connection error from Optional(com.apple.ManagedSettingsAgent): Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction.} Attempts remaining: 1 Failed to fetch effective value for com.apple.ManagedSettings.effective-media-settings.changed: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction.} It is applying some Sandbox restrictions! Xcode 13 beta 4, iOS 15 beta 4
Topic: App & System Services SubTopic: General Tags:
Aug ’21
Swift.DecodingError.dataCorrupted and app crash with "The given data was not valid JSON.", underlyingError: Optional(Error Code=3840 "No value"
here is my code struct ServerMessage: Codable { let error, email, firstname, lastname: String let Id: Int } out of 5 variables returned from api, 4 are string and 1 is int, class HttpAuth: ObservableObject { var didChange = PassthroughSubject() var authenticated = false { didSet { didChange.send(self) } } func checkDetails(useremail:String, userpass: String) { guard let url: URL = URL(string: http://www.mytestdomain.com/webapi/Users.php) else { print(invalid login URL) return } var urlRequest: URLRequest = URLRequest(url: url) urlRequest.httpMethod = POST urlRequest.setValue(application/json, forHTTPHeaderField: Content-Type) do { let params = [action: login, UserEmail: useremail, UserPass: userpass] urlRequest.httpBody = try JSONSerialization.data(withJSONObject: params, options: .init()) URLSession.shared.dataTask(with: urlRequest) { (data, resp, err) in guard let data = data else { return } let finalData = try! JSONDecoder().decode([ServerMessage].self, from: data) print(finalData) if let err = err { print
2
0
4.4k
Aug ’21
The given data was not valid JSON.
I am working with an API and I'm trying to pass data to a detail view but when making the call to the API it displays the error: Detail View: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 Garbage at end. UserInfo={NSDebugDescription=Garbage at end.}))) At first, I thought my structs were wrong but I have checked them and made them retrieve the simplest information but it still doesn't work. I'll leave my code below: Recepie Detail Model struct DetailResponse:Codable { let yields:String let name:String //let original_video_url:String? //let sections: [Ingredients] //let instructions: [Instructions] } /*struct Ingredients:Codable { let raw_text:String }*/ struct Instructions:Codable, Identifiable { let id:Int let position:Int let display_text:String let start_time:Int let end_time:Int let temperature: String } class RecepieDetailModel:ObservableObject { //@Published var
3
0
7.1k
Aug ’21
Code to read from iCloud Drive works on Mac Catalyst and iOS Simulator, gives permission errors on physical iOS device - Why?
The code here works on Mac Catalyst, and on the iOS simulator; on a physical iOS device it throws an error on the try Data line with an error, NSCocoaErrorDomain Cocoa=257: The file couldn't be opened because you don't have permission to view it. let puzzleParser = PuzzleParser() var pseudoPuzzleData: Data let urlToLoad = UserDefaults.standard.url(forKey: lastSavedDocument) if urlToLoad != nil { let decoder = JSONDecoder() do { let result = urlToLoad?.startAccessingSecurityScopedResource() print(hello from loadInitialPuzzle(), (result)) pseudoPuzzleData = try Data(contentsOf: urlToLoad!) urlToLoad?.stopAccessingSecurityScopedResource() AppDelegate.puzzle = try decoder.decode(Puzzle.self, from: pseudoPuzzleData) } catch // etc. Any ideas why this is happening, and what to do about it? I could really use some help here ...
1
0
890
Jul ’21
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
XPC Connection error
Hi I am trying to implement XPC between my helper app and my network extension. It is giving me this error when I try to get the remoteObjectProxyWithErrorHandler Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 0 named 9A48B11J6J.com.myapp.app.Extension UserInfo={NSDebugDescription=connection to service on pid 0 named 9A48B11J6J.com.myapp.app.Extension} Why could this be happening?
1
0
2.0k
Jul ’21
File does not exist error - but it does
I'm a hobbyist and I'm trying to convert a shell script into a compiled MacOS SwiftUI app. It requires running a third party utility that I placed in /usr/local/bin. I found example code on the web that runs the /usr/bin/say command. It works just fine, but when I modify it to try to run the utility in /usr/local/bin, I receive a file does not exist error. Assuming it was some sort of permissions problem, I modified the permissions on /usr/local/bin to 777, and still get the error. I searched in the Mac's Security and Privacy and added Xcode to the Developer Tools to allow it run run software that does not meet the system's security policy. Nope. I've even copied the /usr/bin/say command over to /usr/bin/local and get the same error. I get the error on both the latest Big Sur Xcode and on the latest beta Monterey and Xcode beta. Could someone please point me the docs that explain what is happening here? Thanks. Here's the error that I'm getting: SayThis/ContentView.swift:38: Fatal error: 'try!' expression une
1
0
3.5k
Apr ’22
DeviceActivityMonitor startMonitoring error
I created my Device Activity Monitor extension, and then attempted to start monitoring using the code example from the video: let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour: 0, minute: 0), intervalEnd: DateComponents(hour: 23, minute: 59), repeats: true ) let center = DeviceActivityCenter() do { try center.startMonitoring(.daily, during: schedule) } catch { print(error) } The startMonitoring call always fails for me with the same error: [monitor] Failed to create UsageTrackingAgent proxy: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.UsageTrackingAgent was invalidated. UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.UsageTrackingAgent was invalidated.} Setting up the extension is a very manual process, so I likely missed a step somewhere, but any ideas on what this error might be indicating?
2
0
1.8k
Jul ’21
Batch insert error when unique constraint is set on multiple attributes
I'm testing out Core Data batch insert. The performance is amazing!! Data gets imported in a just a couple hundreds of milliseconds. New rows are inserted and existing rows are updated. I ran into 1 problem though.... If the unique constraint is set with multiple attributes, batch insert will fail. Below is the call stack of the failed operation: 2020-10-06 00:05:44.900901-0700 TestHostingApp[17605:1541912] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'error in batch insertion: Error Domain=NSCocoaErrorDomain Code=134050 (null) UserInfo={NSExceptionOmitCallstacks=true, _NSCoreDataOptimisticLockingFailureConflictsKey=()}' *** First throw call stack: ( 0 CoreFoundation 0x00007fff2043a126 __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007fff20177f78 objc_exception_throw + 48 2 CoreFoundation 0x00007fff20439f4f +[NSException raise:format:] + 0 3 Foundation 0x00007fff207881ca -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 1
3
0
1.6k
Jul ’21
Reply to Batch insert error when unique constraint is set on multiple attributes
Hi, I see the similar problem in my simple test project at Github ( at the commit: 23c759d ): I am trying to save users of a multilanguage app into Core Data by using NSBatchInsertRequest and I am using uid,language as constraints: and the error (when calling 2nd time) is: `TopsBatchInsert/TopViewModel.swift:103: Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134050 (null) UserInfo={NSExceptionOmitCallstacks=true, _NSCoreDataOptimisticLockingFailureConflictsKey=( )}, [_NSCoreDataOptimisticLockingFailureConflictsKey: <__NSArray0 0x102b7a9b0>( ) , NSExceptionOmitCallstacks: 1] 2021-07-13 16:30:02.944932+0200 TopsBatchInsert[86706:2120693] TopsBatchInsert/TopViewModel.swift:103: Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134050 (null) UserInfo={NSExceptionOmitCallstacks=true, _NSCoreDataOptimisticLockingFailureConflictsKey=( )}, [_NSCoreDataOptimisticLockingFailureConflictsKey: <__NSArray0 0x102b7a9b0>( ) , NSExceptionOmitCallstacks: 1]
Jul ’21
Drag via pasteboard changed on Monterey?
This code works fine on macOS 11: var body: some View { VStack { ActionControl() .padding() .onDrag { () -> NSItemProvider in let value = Action(string: hello, world).string let p = ActionProfile(value: value) return NSItemProvider(item: p, typeIdentifier: ActionProfile.pasteboardType) } MyTextView() .padding() } } class ActionProfile: NSObject, NSCoding, NSSecureCoding { static var supportsSecureCoding: Bool = true static var pasteboardType = com.my.app.action.profile @objc var rawValue: String func encode(with aCoder: NSCoder) { aCoder.encode(rawValue, forKey: value) } required init(value: String) { self.rawValue = value } required init?(coder aDecoder: NSCoder) { self.rawValue = aDecoder.decodeObject(of: NSString.self, forKey: value)! as String } required init?(pasteboardPropertyList propertyList: Any, ofType type: NSPasteboard.PasteboardType) { return nil } } extension ActionProfile: NSPasteboardWriting, NSPasteboardReading { static var nsPasteboardType: NSPasteboard.PasteboardType = .init(pasteboardTy
2
0
1.1k
Jul ’21
How to troubleshoot when Safari App Extension not appear in Safari Preferences?
I'm developing a Safari App Extension. Previously it worked fine. When I run the project in Xcode, and enable Allow Unsigned Extensions in Safari, I can see my extension in Safari Preferences -> Extensions page.After I merged code with one of my team member, suddenly the Extension cannot get installed.I have tried:Clean the build folder in Xcode, and run again. But no luck.Restart Xcode doesn't help either.Use command pluginkit -mAvvv -p com.apple.Safari.extension to check installed Safari extensions list. My extension is not in the list.There are some errors in Xcode output, but I can't link them with the issue I'm facing:objc[59117]: Class AMSupportURLConnectionDelegate is implemented in both /System/Library/PrivateFrameworks/EmbeddedOSInstall.framework/Versions/A/EmbeddedOSInstall (0x7fff9a2aa748) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1063e8600). One of the two will be used. Which one is undefined.objc[59117]: Class AMSupportURLSession is implemented in
12
0
5.4k
Jun ’21