I am trying to pick images from the PhotoLibrary. But When I tried to open the Photo Library by clicking the button, an empty screen appears with the following error. And this error are showed: UIImagePickerController UIViewController create error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 0 named com.apple.mobileslideshow.photo-picker.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid. What do I have to do?. Please Someone Guide me through. Thankyou.
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, I am trying to list the contents of a directory selected by the user using the following code: let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self self.present(documentPicker, animated: true) func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let folderUrl = urls.first else {return} let startAccessingt= folderUrl.startAccessingSecurityScopedResource() guard startAccessing else { print(ERROR) return } defer { if startAccessing { folderUrl.stopAccessingSecurityScopedResource() } } var error : NSError? = nil NSFileCoordinator().coordinate(readingItemAt: folderUrl, error: &error) { (url) in let startAccessing = url.startAccessingSecurityScopedResource() guard startAccessing else { print(ERROR 2) return } defer { if startAccessing { folderUrl.stopAccessingSecurityScopedResource() } } do { let files = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: [.nameK
created FB8908465 i tried locations obtained with NSTemporaryDirectory (also /tmp /private/tmp /var/tmp) and NSSearchPathForDirectoriesInDomains + .cachesDirectory in with user, local, network and system domains. consistently getting this error: NSCocoaErrorDomain Code=513 You don’t have permission to save the file
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hi all, According to the reference link, Packaging a Daemon with a Provisioning Profile - https://developer.apple.com/forums/thread/129596 I changed our launchd daemon to run as an .app. But when lsd(LaunchServices) ran .app/Contents/MacOS/FamRTServicebig on macOS Big Sur, this error occurred: Non-fatal error enumerating at , continuing: Error Domain=NSCocoaErrorDomain Code=260The file “PlugIns” couldn’t be opened because there is no such file. UserInfo={NSURL=PlugIns/ -- file:///Library/Application%20Support/test/bin/FamRTServicebig.app/Contents/, NSFilePath=/Library/Application Support/test/bin/FamRTServicebig.app/Contents/PlugIns, NSUnderlyingError=0x7fedb6c199a0 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} 45683955: Checking whether application is managed at file:///Library/Application%20Support/test/bin/FamRTServicebig.app//com.test.realtime.scan system.log: Nov 20 16:07:22 MacBookAirnoMacBook-Air com.apple.xpc.launchd[1] (com.test.realtime.scan[438]): removing service sin
Hello! I have a project with Apple Sign-in. It works on Catalina, but doesn't on Big Sur. I get an error [com.apple.authkit] Failed to establish connection between notification center endpoint and daemon service with error: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=} when trying to create ASAuthorizationAppleIDProvider like so _appleIdProvider = [[ASAuthorizationAppleIDProvider alloc] init]
Hi, I have pretty trivial problem. So, I am trying to use URLSession network request but I am getting errors. This code is in the shared file that works when I run it as app, but when I run it as AppClip it is not working. Running on the simulator is working even as AppClip. Here is the code (pretty trivial): let session = URLSession.shared let url = URL(string: https://learnappmaking.com/ex/users.json)! let task = session.dataTask(with: url, completionHandler: { _, response, error in print(error) print(response) }) task.resume() I am getting this error: 2020-11-20 19:35:05.189273+0100 ExampleAppClip[14703:4633304] [Client] Updating selectors after delegate removal failed with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 92 named com.apple.commcenter.coretelephony.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service on pid 92 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.} 2020-11-20 19:35:05.3637
Hello all! I've killed a few days trying to save a file and list it in a home directory. First I retrieve a home directory URL. I tried several options: docDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) docDir = URL(fileURLWithPath: NSHomeDirectory()) In any way when running on simulator or my iPhone it results in just file:/// Well, maybe that's ok for sandboxed iOS app... After that I prepare a file URL. I tried two ways: let file = docDir.appendingPathComponent(myfile.tmp) let file = URL(fileURLWithPath: myfile.tmp) print(file.absoluteURL) Here I get file:///myfile.tmp Finally I try to create file do { try Data(count: 0).write(to: file2) } catch { print(Failed to create file: '(file)' because of: (error)) } And here is what I get On simulator: Failed to create file: './myfile.tmp -- file:///' because of: Error Domain=NSCocoaErrorDomain Code=642 You can’t save the file “myfile.tmp” because the volume “AirHD — данные” is read only.
https://developer.apple.com/documentation/photokit/browsing_and_modifying_photo_albums I am thinking of making a photo editing application (photo rotation application) by referring to the sample project that can be downloaded from this URL. In this sample project, when I try to filter photos with sepia or chrome, some photos work and some do not work. When things don't work, usually run into errors like the one below. Can't edit the asset: Optional (Error Domain = NSCocoaErrorDomain Code = -1 (null)) I don't even know the correlation between photos that succeed and photos that fail to edit. It's strange that Apple's genuine photo app can rotate all photos. Is the structure different from the genuine app? How can I successfully edit (filter and rotate) all kinds of photos based on this sample code? The code below is the code in the sample project. It seems that the image is generated using .ciContext.writeJPEGRepresentation PHPhotoLibrary.shared().performChanges({ ttttttttttttttlet request = PHAssetCh
Topic:
Media Technologies
SubTopic:
Photos & Camera
Tags:
Photos and Imaging
Core Image
Core Graphics
PhotoKit
Has anyone gotten schema initialization to work with the new initializeCloudKitSchemaWithOptions function? I am always getting an internal CoreData No authToken receive for asset error thrown from this call: Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. (Dry run option completes without error)
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
I'm having this same issue on a simulator. I'm using Xcode 12.2 and simulator 14.2. I did the setup as in https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode and I'm testing a subscription purchase and the error happens right after payment confirmation screen. When I printed out the transaction error I got the following (lldb) po transaction.error Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 25563 named com.apple.storekitservice UserInfo={NSDebugDescription=connection to service on pid 25563 named com.apple.storekitservice} Is there a way to fix it? Did I missed some config step>
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
People at Apple apparently are not capable of writing stable code. After Big Sur update I started getting this 0 CoreFoundation 0x00007fff204976af __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007fff201cf3c9 objc_exception_throw + 48 2 CoreFoundation 0x00007fff204c0512 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff212796c9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191 4 AccountsDaemon 0x00007fff37dd111e -[ACDDatabaseConnection _persistentStore] + 258 5 AccountsDaemon 0x00007fff37dd0f20 -[ACDDatabaseConnection version] + 28 6 AccountsDaemon 0x00007fff37d89c1c __58-[ACDDatabaseInitializer updateDefaultContentIfNecessary:]_block_invoke + 60 7 CoreData 0x00007fff25ad2821 developerSubmittedBlockToNSManagedObjectContextPerform + 161 Does anybody know what is ACDDatabase, where to find it and how to fix this. Cause I am completely locked out of my Mac account now and apple support is useless. Error is Exception Type: EXC_CRASH (SIGABRT) Exception Codes
I got a similar error playing in Playground (Xcode 12.2) with the initial data completed to 12 keys. Error message: NEWDATA 183 bytes Playground execution terminated: An error was thrown and was not caught: ▿ DecodingError ▿ dataCorrupted : Context codingPath : 0 elements debugDescription : The given data was not valid JSON. ▿ underlyingError : Optional some : Error Domain=NSCocoaErrorDomain Code=3840 Badly formed object around character 161. UserInfo={NSDebugDescription=Badly formed object around character 161.} I then realised that I forget the ending comma in NEWDATA after NAME9: HELLO Adding it solved the problem. So I tested with 18 keys and works as well.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Hi,everyone. :) Recently, I'm trying to make AppClip for my project. When I tried to use NSURLSessionDownloadTask[created by NSURLSession which is initialized with the config backgroundSessionConfigurationWithIdentifier] to download a file with a legal HTTPS URL. It's finally failed 1)Environment: MasOS BigSur Xcode 12.2 Simulator [Run with automatic profile settings] 2)Confusion: The Main Target's download function is normal in the simulator with automatic profile settings.[Someone's advise, I just wanted to try] 3)The Error Info: Trigger Paths: Run AppClip->didFinishLaunchWithOptions->Initialize DownloadSessionTask->Task Resume.[UIApplicationState = UIApplicationStateActive] callBack:URLSession:task:didCompleteWithError below is lldb outputs: 2020-12-10 16:39:45.199333+0800 MFWAppClip[78965:2018825] BackgroundSession <73023646-DBBD-4BD9-B9EF-D79C9DB0B3AB> connection to background transfer daemon interrupted 2020-12-10 16:39:47.716800+0800 MFWAppClip[78965:2022242] Task <E6284F80-16C0-498B-
Same issue when launching iOS simulator with Xcode 12.2 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: { .... }- The operation couldn’t be completed. Permission denied Domain: NSPOSIXErrorDomain Code: 13 Failure Reason: Permission denied- Any solution so far?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Hi all. I have an error as Xcode isn’t letting me parse my JSON file data into an array. It says in the diagnostic report that “Fatal error: Couldn’t parse Rest.json as Array: dataCorrupted(Swift.DecodingError.Context(codingPath: , debugDescription: “The given data was not valid JSON.”, underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 “No string key for value in object around character 3.” UserInfo={NSDebugDescription=No string key for value in object around character 3.}))): file SaiMirrasKitchen/ModelData.swift, line 30” So if anyone could help, I would appreciate it! Harri