Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Sanboxed apps won't open 3rd party filesystem files
When launching Preview.app on the command line, I get an 'Operation not permitted' error returned. % /System/Applications/Preview.app/Contents/MacOS/Preview /Volumes/myfs/Through_the_pines.jpg 2024-06-17 14:23:16.826 Preview[2745:37915] PVImageContainer initWithURL:file:///Volumes/myfs/Through_the_pines.jpg failed, error = Error Domain=NSCocoaErrorDomain Code=257 The file “Through_the_pines.jpg” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/Volumes/myfs/Through_the_pines.jpg, NSUnderlyingError=0x6000022302a0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} File permissions allow reading for all users: % ls -l /Volumes/myfs/Through_the_pines.jpg -rw-rw-r--@ 1 developer staff 2396454 Mar 25 10:48 /Volumes/myfs/Through_the_pines.jpg Am I right in assuming it's sandbox related?
Topic: Privacy & Security SubTopic: General Tags:
Jun ’24
NSCocoaErrorDomain Code=134092 When Updating ContactsError, and Error "Attempt to read notes by an unentitled app" while I am not request for notes
Hi, I'm writing a command line program with Swift Package Manager that uses Contacts API to automatically add phonetic names for the contacts. However, I found I was unable to do so for contacts that has notes. First, when I was trying to enumerate the contacts, there is a strange error output: 2023-01-22 18:58:36.085525+0800 PhoneticNames[18591:98356] [core] Attempted to register account monitor for types client is not authorized to access: {( com.apple.account.CardDAV, com.apple.account.Exchange, com.apple.account.LDAP )} 2023-01-22 18:58:36.085580+0800 PhoneticNames[18591:98356] [accounts] CNAccountCollectionUpdateWatcher 0x6000003ccc40: Store registration failed: Error Domain=com.apple.accounts Code=7 (null) 2023-01-22 18:58:36.085606+0800 PhoneticNames[18591:98356] [accounts] CNAccountCollectionUpdateWatcher 0x6000003ccc40: Update event received, but store registration failed. This event will be handled, but the behavior is undefined. 2023-01-22 18:58:36.136236+0800 PhoneticNames[18591:98344] [api] Attem
2
0
2.1k
Mar ’23
Custom keyboard randomly crash with NSExtension Error
I'm currently developing a custom keyboard which bundled with main app. The keyboard would randomly crash when switch between apps with opened custom keyboard on physical device. I've read posts around but seems not what I've encountered. Bundle ID of main app: com.company.appName Bundle ID of keyboard extension: com.company.appName.Keyboard When custom keyboard is opened second time on other app, a sole personality warning would show up, but this won't lead to crash. WARNING! Sole personality is ambiguous; this may lead to erratic behavior [lifecycle] [u 9A2D7B1D-20AF-4E2A-A72F-C37C8D4FDEEA] [com.company.appName.Keyboard(1.0.0)] WARNING! Sole personality is ambiguous; this may lead to erratic behavior; personalities: { com.companyName.appName.keyboard = { 19209 = <PKServicePersonality: 0x28299da00; core = <[u 9A2D7B1D-20AF-4E2A-A72F-C37C8D4FDEEA] [com.company.appName.Keyboard(1.0.0)],[d (null)] [/private/var/containers/Bundle/Application/67892ACC-5BDA-4205-828D-4D94D6E87ABD/AppName.app/PlugIns/Keyboard
1
0
919
Dec ’23
Why does NSAttributedString's NSItemProviderWriting implementation not transfer custom attributes that implement Codable?
I am working on supporting some formatted text editing in my app, and I've been experimenting with copy and paste support for formatted text. I discovered that NSAttributedString implements NSItemProviderWriting, which means I can give it to UIPasteboard via setObjects and all the built-in attributes transfer perfectly if I then paste it into another text view, or even another app that behaves itself. But if I have custom attributes in my attributed string, having their values implement Codable doesn't let them transfer across the clipboard. In my implementation of textPasteConfigurationSupporting(_: transform:), I try to get an attributed string like this: let attr = item.itemProvider.loadObject(ofClass: NSAttributedString.self) { val, err in //...handle here } I get an error like this: Error Domain=NSItemProviderErrorDomain Code=-1000 Cannot load representation of type com.apple.uikit.attributedstring UserInfo={NSLocalizedDescription=Cannot load representation of type com.apple.uikit.attributedstring, NSUnd
1
0
1.1k
Jun ’24
Core Data error: SQLITE_IOERR_SHMOPEN; what is this?
Hi, when setting up our Core Data stack in our iOS app (manually, with a NSManagedObjectModel/Context & NSPersistentStoreCoordinator) we have reports a rare bug we haven't been able to reproduce. Occasionally when adding a persistent store we get a NSCocoaErrorDomain 256 error (NSFileReadUnknownError) with NSSQLiteErrorDomain=4618 in the user info. That's SQLITE_IOERR_SHMOPEN , which the SQLite docs describe this way: I/O error within the xShmMap method on the sqlite3_io_methods object while trying to open a new shared memory segment It seems to specifically /not/ be a SQLITE_FULL error. Do you know what type of issue can cause this? Or where/how I can start tracking this down?
1
0
1.1k
Jun ’24
Reply to Local SwiftData to CloudKit migration
Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Unable to find a configuration named 'default' in the specified managed object model.} It seems that you are hitting a SwiftData bug – When CloudKit integration is enabled, creating a ModelContainer with a migration plan triggers an error. Since WWDC is there, I'd suggest that you try with the latest beta. If the issue is still there, please file a feedback report for the SwiftData team to investigate. For an immediate workaround, you might consider the following flow: Create two model containers, container1 for the local store and container2 for the CloudKit store. For container2, use a configuration name (synced in your case) to differentiate the CloudKit store from the local one, and don't use migration plan, which avoids the error. Migrate the data with your own code, which includes fetching data from container1, transforming it if necessary, and saving the
Jun ’24
missing aps environment for push notifications
I'm having problems with the [gameName].entitlements for push notifications on iOS 10In iOS 10 you have to press a 'fix me' button in the Push Notifications area under Capabilities. This creates a [gameName].entitlements file which contains the line:aps-environment = development.This file is in my .ipa bundle and should fix a problem with registering for push notifications in iOS10.However, when my app runs I still get this error:fail to register with error Error Domain=NSCocoaErrorDomain Code=3000 no valid 'aps-environment' entitlement string found for application UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}Any ideas?Cheers,Steve
2
0
3.9k
Oct ’16
How do you allow an XPC service to create a new file based on an NSURL that the user selected from an NSSavePanel?
How do you send an NSURL representing a new file, as returned from an NSSavePanel, to an XPC service such that the service is granted permission to create the file? I can successfully pass an NSURL to the XPC process if the NSURL represents an existing file. This is documented in Apple's Documentation: Share file access between processes with URL bookmarks This involves creating bookmark date while passing 0 in as the options. However, if you try to create bookmark data for an NSURL that represents a file that is not yet created, you do not get any bookmark data back and an error is returned instead: Error Domain=NSCocoaErrorDomain Code=260 The file couldn’t be opened because it doesn’t exist. Simply passing the file path to the XPC process, by way of: xpc_dictionary_set_string(message, file_path, url.fileSystemRepresentation); Does not grant the XPC create/write permissions. Is there an API or trick I'm missing? Note that the user should be allowed to save and create new files anywhere of their choo
1
0
987
Jun ’24
Reply to swiftUI apps with SwiftData and CloudKit crashes on iOS but works on MacOS
on MacOS 14.5, the app on Mac also crash with the same error Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Unable to find a configuration named 'default' in the specified managed object model.} I think there is something todo with MacOS 14.5 and iOS 17.5.....
Jun ’24
NSCocoaErrorDomain code = 134093 , only in iOS16
i have received a lot of crash log only in iOS16 the crash occured when i called : [[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:resultHandler] here is the crash log Exception Type: NSInternalInconsistencyException ExtraInfo: Code Type: arm64 OS Version: iPhone OS 16.0 (20A5328h) Hardware Model: iPhone14,3 Launch Time: 2022-07-30 18:43:25 Date/Time: 2022-07-30 18:49:17 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:Unhandled error (NSCocoaErrorDomain, 134093) occurred during faulting and was thrown: Error Domain=NSCocoaErrorDomain Code=134093 (null) Last Exception Backtrace: 0 CoreFoundation 0x00000001cf985dc4 0x1cf97c000 + 40388 1 libobjc.A.dylib 0x00000001c8ddfa68 0x1c8dc8000 + 96872 2 CoreData 0x00000001d56d2358 0x1d56cc000 + 25432 3 CoreData 0x00000001d56fa19c 0x1d56cc000 + 188828 4 CoreData 0x00000001d5755be4 0x1d56cc000 + 564196 5 CoreData 0x00000001d57b0508 0x1d56cc000 + 935176 6 PhotoLibraryServ
7
0
3.9k
Jun ’24
[PHImageManager requestImage] crash only iOS17.0
Unhandled error (NSCocoaErrorDomain, 134093) occurred during faulting and was thrown: Error Domain=NSCocoaErrorDomain Code=134093 (null) Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0xed5e0 __exceptionPreprocess 1 libobjc.A.dylib 0x2bc00 objc_exception_throw 2 CoreData 0x129c8 _PFFaultHandlerLookupRow 3 CoreData 0x11d60 _PF_FulfillDeferredFault 4 CoreData 0x11c58 _pvfk_header 5 CoreData 0x98e64 _sharedIMPL_pvfk_core_c 6 PhotoLibraryServices 0x6d8b0 -[PLInternalResource orientation] 7 PhotoLibraryServices 0x6d7bc -[PLInternalResource orientedWidth] 8 Photos 0x147e74 ___presentFullResourceAtIndex_block_invoke 9 PhotoLibraryServices 0x174ee4 __53-[PLManagedObjectContext _directPerformBlockAndWait:]_block_invoke 10 CoreData 0x208ec developerSubmittedBlockToNSManagedObjectContextPerform 11 libdispatch.dylib 0x4300 _dispatch_client_callout 12 libdispatch.dylib 0x136b4 _dispatch_lane_barrier_sync_invoke_and_complete 13 CoreData 0x207f8 -[NSManagedObjectContext performBlockAndW
6
0
2.1k
Nov ’23
UIDocumentPickerViewController -> OneDrive/G-Drive -> NSFileCoordinator
Hey, I'm not sure I'm even in the correct ballpark - trying to allow my app to download largish videos from user's OneDrive and G-Drive to app Is it correct to use NSFileCoordinator in this way? How do I report progress as it downloads the video (is it possible?) Is it correct to dismiss the picker like this? anything else wrong (or, like is....any of it correct? :) it's sort of working with my contrived examples (I created new personal G-drive / Onedrive accounts, and copied vids up there), but...when I use a file from our corporate OneDrive, from shared folder, I get: NSCocoaErrorDomain Code=3328 The requested operation couldn’t be completed because the feature is not supported. Is this the NSFileProvider extension (Microsoft's) complaining? public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let url = urls.first else { return } let isSecurityScoped = url.startAccessingSecurityScopedResource() print((#function) - iSecurityScoped = (isSecu
1
0
1.2k
Jun ’24
Failed to load test bundle from file, Error Domain=NSCocoaErrorDomain Code=3588
I have developed an app and its working fine, I decide to add Unit-Testing to the project while running the test on the device, Xcode throws me an error -> Failed to load test bundle from file:///private/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas%20dev.app/PlugIns/aspasDevTests.xctest/: Error Domain=NSCocoaErrorDomain Code=3588 dlopen(/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas dev.app/PlugIns/aspasDevTests.xctest/aspasDevTests, 0x0109): -> The bundle “aspasDevTests” couldn’t be loaded. Try reinstalling the bundle. I tried many things but nothing is working, needed help in the issue, Thanks in advance
2
0
3.1k
Mar ’23
Reply to SwiftData does not retrieve my inverse one-to-many Relationship
Your code actually throws the following error when saving the context (if you add do...try... catch for context.save()) SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= (entity: ThirdModel; id: 0x60000028c520 ; data: { name = my third model; parent = nil; }), NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=parent, NSValidationErrorValue=null} To avoid the error, change the to-one relationship to Optional. Also, when declaring a relationship, use var because SwiftData maintains it for you. If you declare your models in the following way, your code will work: final public class SecondModel { var parent: FirstModel? ... } @Model final public class ThirdModel { var parent: SecondModel? ... }
Topic: Programming Languages SubTopic: Swift Tags:
May ’24
Xcode 15.3+ bug: framework tests executed in fresh simulator fail to write data to disk
I have filed this as FB13722352. I am sharing it here because I haven't seen it mentioned anywhere online yet and am curious if anyone else has run into it. In Xcode 15.3+, writing data to disk fails when running the tests for a Framework project in a fresh simulator. Specifically, if the selected simulator has never been launched before (i.e. is newly-created), any test execution that attempts to write data into the NSDocumentDirectory directory will fail for a period of time after the simulator is first launched (I've observed between 10s and 20s). After that period of time, the same data write action will succeed. It appears that Xcode 15.3+ is starting test execution too soon, without waiting a sufficient amount of time for the Simulator to fully boot. This issue does not occur in Xcode 15.2 or prior versions. Since the issue only appears in a fresh (never-before booted) simulator, it is likely to pop up consistently in CI test runs (where simulators are not re-used). This can cause confusion because the
1
0
835
May ’24