Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

How do I implement NSAttributedStringValueTransformer for attributed strings stored in Core Data
I have an application that uses a Transformable property in Core Data to store NSAttributedStrings and get compiler warnings Object.property is using a nil or insecure value transformer. Please switch to NSSecureUnarchiveFromDataTransformerName or a custom NSValueTransformer subclass of NSSecureUnarchiveFromDataTransformer [2] NSSecureUnarchiveFromDataTransformerName does not support archiving and unarchiving of NSAttributedStrings and so as I understand it I have to create a custom transformer, register that in AppDelegate and enter the transformer class name in the Core Data models object property details. Below is the custom transformer class, however I get an error when trying to decode existing attributed strings. Can anyone shed any light on this ? Why is the new unarchiver unable to handle the NSFileWrapper given this is a property of the NSTextAttachment and works fine with the deprecated unarchiver ? Is this a bug or intentional ? Is there some way to add support for unarchiving the NSFileWrapper ? @
3
0
1.8k
Apr ’21
Reply to AVPlayerItem is not able to reproduce audio from music folder on Macbook M1
Thanks for the comments, there is in fact an error that i didn't see before : AVQueuePlayer status: AVPlayerStatusReadyToPlay AVQueuePlayer error: nil AVPlayerItem status: AVPlayerItemStatusFailed AVPlayerItem error: Error Domain=NSCocoaErrorDomain Code=257 The file couldn’t be opened because you don’t have permission to view it. UserInfo={NSUnderlyingError=0x600002a7f5d0 {Error Domain=NSOSStatusErrorDomain Code=-12203 (null)}} AVURLAsset: AVURLAsset: 0x600002504980, URL = file:///Users/xx/Music/Music/Media.localized/Music/xx/xx/xx.mp3 It only happens with audios from Music folder Something interesting is that the app has permission for Music & Apple Music in Security & Privacy from System preferences Is something else needed to access music folder ?
Topic: Media Technologies SubTopic: General Tags:
Apr ’21
Reply to Apple Document - Creating a Basic Video Player
I finally got the video to play by going to the Signing & Capabilities tab in the Project Settings and checked Outgoing Connections (Client) under App Sandbox. Apple should make note of this requirement in their guide. However, I am still getting the following errors in the console: 2021-03-30 14:45:34.347266-0500 Streamer[12701:657907] [plugin] AddInstanceForFactory: No factory registered for id CFUUID 0x600003974980 F8BB1C28-BAE8-11D6-9C31-00039315CD46 2021-03-30 14:45:34.474219-0500 Streamer[12701:657916] validateSessionInfo: bundleID is invalid. Please specify the bundleID for kRTCReportingSessionInfoClientBundleID 2021-03-30 14:45:34.475221-0500 Streamer[12701:657894] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 0 named com.apple.rtcreportingd UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:34.475366-0500 Streamer[12701:657894] star
Topic: Media Technologies SubTopic: Audio Tags:
Mar ’21
Error when running a binary from containing app
I am running a Safari Web extension and looking to launch a shell script from the containing app. Error in process Error Domain=NSCocoaErrorDomain Code=4 The file “test.command” doesn’t exist. I get the above error when I try to access the binary. I use NSOpenPanel to allow the user to give permission to access the file system. The program works perfectly without the sandbox and so that ensures there is no file path error. I have the following entitlements: com.apple.security.scripting-targets com.apple.security.files.user-selected.executable com.apple.security.files.user-selected.read-write let task = Process() task.launchPath = /Users/test/test.command let openPanel = NSOpenPanel() openPanel.prompt = Choose openPanel.canChooseFiles = false openPanel.canChooseDirectories = true do{ try task.run() }catch{ os_log(.error,Error in process) print( (error)) } What could be the issue ?
8
0
1.2k
Mar ’21
Apple Document - Creating a Basic Video Player
I followed this - https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/creating_a_basic_video_player_macos document to try and create a streaming video player in a macOS app and I am getting nothing but errors. Here's my code: import Cocoa import AVFoundation import AVKit class ViewController: NSViewController { @IBOutlet var playerView: AVPlayerView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. guard let url = URL(string: https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8) else { return } // Create a new AVPlayer and associate it with the player view let player = AVPlayer(url: url) playerView.player = player } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } } When I run the code, I get the following errors in the console: 2021-03-27 09:24:44.920720-0500 Streamer[27640:1013041] [plugin] AddInstanceForFactory: No factory registered for
2
0
2.4k
Mar ’21
PHPicker loadObjectOfClass fails with error
We implemented the new PHPicker and have run into an issue we haven't been able to replicate on our own devices but see a lot of users running into it. The problem is an error after getting the PHPickerResults and trying to get the UIImages. Because the user can select several images at once, what we do is get the results and iterate over each itemProvider object. I'm following apple's guidance and checking if itemProvider canLoadObjectOfClass:UIImage.class, before executing itemProvider loadObjectOfClass:UIImage.class. However we are getting hundreds of reports of users where this last method returns an error. Firstly, this is how we configure our PHPickerViewController: PHPickerConfiguration *configuration = [[PHPickerConfiguration alloc] init]; configuration.selectionLimit = self.pictureSelectionLimit; configuration.filter = PHPickerFilter.imagesFilter; configuration.preferredAssetRepresentationMode = PHPickerConfigurationAssetRepresentationModeCurrent; PHPickerViewController *pickerViewController = [[PHPi
6
0
3.2k
Mar ’21
Apple Configurator - Automation Tools
When running a cfgutil command I can verify across multiple OS versions, 10.15.7, and 11 that we get the following. % cfgutil get all objc[2358]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x7fff8ad23a30) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10681a8c0). One of the two will be used. Which one is undefined. objc[2358]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x7fff8ad23a80) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10681a910). One of the two will be used. Which one is undefined. cfgutil: error: Error Domain=NSCocoaErrorDomain Code=3840 Found non-key inside dict at line 112188 UserInfo={NSDebugDescription=Found non-key inside dict at line 112188, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 Malformed data byte group at line 1; invalid hex UserInfo={NSDebugDescription=Malformed dat
3
0
3.8k
Mar ’21
Reply to How to read property list (binary format) if the iOS fails to load it via NSPropertyListSerialization
I tested in playground (Xcode 12.4). Works with 128. Fails with 129, with a different error message: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=3840 Unexpected character b at line 1 UserInfo={NSDebugDescription=Unexpected character b at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 Conversion of string failed.
Topic: App & System Services SubTopic: General Tags:
Mar ’21
Reply to Network token with CryptoTokenKit
Can you please explain what is the actual reason behind the below error - [client] Unable to connect to tokenServer even after retries. (ep=(null) uid=(null)) Some more information I got from system log - 2021-03-09 00:26:09.036130+0530 localhost ctkd[469]: ctkd [com.apple.CryptoTokenKit:tokenhost] Failed to communicate with driver (null), error: Error Domain=NSCocoaErrorDomain Code=4099 The connection on anonymousListener or serviceListener from pid 21919 was invalidated. UserInfo={NSDebugDescription=The connection on anonymousListener or serviceListener from pid 21919 was invalidated.} 2021-03-09 00:26:09.036225+0530 localhost ctkd[469]: ctkd [com.apple.CryptoTokenKit:tokenhost] failed to acquire token from extension myTokenExtension, error:Error Domain=NSCocoaErrorDomain Code=4099 The connection on anonymousListener or serviceListener from pid 21919 was invalidated. UserInfo={NSDebugDescription=The connection on anonymousListener or serviceListener from pid 21919 was invalidated.} 2021-03
Topic: Privacy & Security SubTopic: General Tags:
Mar ’21
CoreData + CloudKit initial db seed
I'm having some trouble setting an initial sqlite seed for my project. I'm using the public database and I exported the initial .sqlite, .sqlite-shm, .sqlite-wal files in the project bundle. The files are consumed properly and the seed is reflected on my device, but when I test on a different device (signed in with another iCloud account), I get a reimport and the error: Failed to set up CloudKit integration for store: NSSQLCore: 0x13e9171d0 (URL: file:///var/mobile/Containers/...CloudPublic.sqlite) Error Domain=NSCocoaErrorDomain Code=134405 (null) UserInfo={PFCloudKitOldUserIdentityKey=_XXX, PFCloudKitNewUserIdentityKey=_YYY, NSCloudKitMirroringDelegateResetSyncReasonKey=3} Sending 'NSCloudKitMirroringDelegateWillResetSyncNotificationName' with reason: 'AccountChange' Is there any way around this for setting an initial sqlite seed?
0
0
946
Mar ’21
Faild to get owner UUID
Using the call NSOpenPanel *ProfilOpenPanel = [NSOpenPanel openPanel] I get the log: CNC_Interface[42149:1480356] [default] Faild to get owner UUID for url: file:///Users/nadjarohner/Public error: Error Domain=NSCocoaErrorDomain Code=260 The file “Public” couldn’t be opened because there is no such file. UserInfo={NSURL=file:///Users/nadjarohner/Public, NSFilePath=/Users/nadjarohner/Public, NSUnderlyingError=0x600000cf5740 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} About 10 years and 3 computers behind I was administrator in a school and often logged into about 100 Macs . One of it was owned by Nadja Rohner. No search with that name on my machine gives any results, not even with grep. On my MacBookPro I wanted to manage shares. The above name appeared in the list of Shared Folders, but I was not able to delete the entry, because 'the file does not exist.' How can I get rid of this ****** entry?
0
0
652
Mar ’21
NSXPCConnection from LaunchDaemon to LaunchAgent
Hi there! Is it possible to use NSXPCConnection(machServiceName: x, options: y) from service running as LaunchDaemon (system context) to call methods on LaunchAgent running in Aqua Session (gui context)? I have a running code where I connect to LaunchAgent from binary running in Xcode with elevated privileged. However when I launch my application as a LaunchDaemon I get: Agent could not connect: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named x was invalidated. I suspect this could be happening by (XPC/launchd) design because each item is in different launchd domain. Could anyone shed more light on this? If it is not possible to initiate XPC from LaunchDaemon to LaunchAgent, what kind of IPC alternative would you recommend to control the agent from the daemon?
5
0
3k
Feb ’21
Initialize NSPersistentCloudKitContainer with iOS 14 and Public DB
I'm struggling to initialize my schema. I keep getting the error : Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Couldn't initialize CloudKit schema because no stores in the coordinator are configured to use CloudKit Without the initialize it does sometimes create the record's schema. But it feels like its all half working. I have Cloudkit on and Used with Cloudkit is checked under the default configuration in my xcdatamodeld file. Here is my setup code.. _persistentContainer = [[NSPersistentCloudKitContainer alloc] initWithName:@Eco-nomy]; // Add options and make this container PUBLIC. NSPersistentStoreDescription *description = _persistentContainer.persistentStoreDescriptions.firstObject; [description setOption:[NSNumber numberWithBool:YES] forKey:NSPersistentHistoryTrackingKey]; [description setOption:[NSNumber numberWithBool:YES] forKey:NSPersistentStoreRemoteChangeNotificationPostOptionKey]; description.cloudKitContainerOptions.databas
0
0
738
Feb ’21
SwiftUI Preview fail with Core Data: "Error Domain=NSCocoaErrorDomain Code=516"
Hello, Since I added Core Data to my SwiftUI project, preview canva is no more working, showing an error explaining that the update took more than 5 seconds (the app is working correctly in simulator). I opened the preview diagnostic report folder, and found a file named SerializationErrors.txt, with the following message: Error Domain=NSCocoaErrorDomain Code=516 “SizeModel+CoreDataClass.swift” couldn’t be linked to “Intermediates” because an item with the same name already exists. I feel like there is a problem of refreshing the class generated for my Core data model. I tried to follow some recommendations found on this website, deleting the Library/Developer/Xcode/UserData/Previews/Simulator Devices/, or also Library/Developer/Xcode/DerivedData, and cleaning/closing Xcode, but none of them had any effect on the problem. Doing so, I noticed that in the Previews folder, two Simulator Devices were generated (one empty Simulator Devices, and one filled Simulator%20Devices), and regenerated even if I cl
4
0
4.6k
Feb ’21
SwiftUI VideoPlayer added AVURLAssetHTTPHeaderFieldsKey not working
let asset = AVURLAsset(url: url, options: [AVURLAssetHTTPHeaderFieldsKey: [key: value]]) let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer(playerItem: playerItem) VideoPlayer(player: player).onAppear(perform: { player.play() }) I have used the same code to prepare the AVPlayer object on an iOS app and using AVPlayerViewController everything worked properly... but right now on a SwiftUI app I'm using VideoPlayer and it's not playing the video. Is there an issue with VideoPlayer not recognizing AVURLAssetHTTPHeaderFieldsKey?? This is the error I see in the debugger sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 0 named com.apple.rtcreportingd UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
0
0
1.5k
Feb ’21