Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

SwiftUI PhotosPicker does not work
iOS 17.4.1, iPhone 15 Pro. I pick photos from the user's photo library using: ... .photosPicker(isPresented: $addPhotos, selection: $pickedPhotos, matching: .images) .onChange(of: pickedPhotos) { import(photoItems: pickedPhotos) } The picker UI works ok, but then when I import the photos: private func import(photoItems: [PhotosPickerItem]) { for photoItem in photoItems { Log.debug(picked: (photoItem)) Task { do { let imageData = try await photoItem.loadTransferable(type: Data.self) guard let imageData else { Log.error(failed to load image data) return } guard let image = UIImage(data: imageData) else { Log.error(failed to create image from data) return } // use image .... } catch { Log.error(failed to load image data: (error)) } } } } Logging the picked photo gives: PhotosPickerItem(_itemIdentifier: C7E2F753-43F6-413D-BA42-509C60BE9D77/L0/001, _shouldExposeItemIdentifier: false, _supportedContentTypes: [<_UTCoreType 0x1ebcd1c10> public.jpeg (not dynamic, declared), <_UTCoreType 0x1ebcd1d70> public
4
0
2.1k
Apr ’24
Couldn't read values in CFPrefsPlistSource when presenting UIActivityViewController
When I try to display a UIActivityViewController, I get funky logging in the xcode console. This is my code: @IBAction func shareAction(_ sender: Any) { // text to share let text = Some very interesting text! let url = Constants.URL.appStore.absoluteString guard let logo = UIImage(named: App Logo)? .circle() .resize(333, 333) else { return } // set up activity view controller let itemsToShare: [Any] = [ logo, text, url ] let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = self.view // exclude some activity types from the list if #available(iOS 15.4, *) { activityViewController.excludedActivityTypes = [ .airDrop, .sharePlay ] } else { activityViewController.excludedActivityTypes = [ .airDrop ] } // present the Share Sheet self.present(activityViewController, animated: true, completion: nil) } The logging emerges in the console as soon as the code calls: self.present(activityViewControll
1
0
1.5k
Mar ’24
Make my app quit and reopen when updating it with .pkg
Context: Our app has a network system extension. After updating it via MDM sometimes the app and the extension have different versions until you restart the app. I suspect that it is because the app is not quit before installing. As a fix I am trying to create a .pkg with preinstall and postinstall script, that would close the app before installation and open it after installation. My code: FileUtils.mkdir_p(install_scripts) File.open('install_scripts/preinstall', 'w') do |file| file.puts #!/bin/bashnosascript -e 'quit app #{options[:app_name]}'nexit 0 end File.open('install_scripts/postinstall', 'w') do |file| file.puts #!/bin/bashnopen -a '#{options[:app_name]}'nexit 0' end sh chmod a+x install_scripts/preinstall sh chmod a+x install_scripts/postinstall sh( pkgbuild, --scripts, install_scripts, --identifier, ***_identifier(options), --component, ../#{options[:build_path]}/#{options[:app_name]}.app, --install-location, /Applications/#{options[:app_name]}.app, Distribution.pkg ) sh( productbuild, --synthesize
2
0
1.1k
Mar ’24
Reply to ShareLink not reliable, entitlement errors
I'm Facing a similar issue: ShareLink(item: viewModel.file.localURL!) { Image(systemName: square.and.arrow.up) .environment(.symbolVariants, .none) } and I'm getting: Error acquiring assertion: (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErr
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’24
Error 4097 with TCC and privacyaccountingd on real device
Hi, I am new to Swift and trying to develop an app that needs photolibraryusagedescription and photolibraryaddtionsusagedescription. On simulation, I have fetched all photos and delete selected photos successfully but can't share selected photos so I've connect real device to test it out. However, after allow full access to photo album, I got error Domain=NSCocoaErrorDomain Code=4097, connection to service with pid 1353 named com.apple.privacyaccountingd UserInfo={NSDebugDescription=connection to service with pid 1353 named com.apple.privacyaccountingd} I've looked up for solutions so far but still have no idea what created that issue and how to solve it, I've been using the latest version of all devices and apps related. Could someone guide me about this issue? Thank you Here's the code of my ContentView, and function I use to request access, respectively: import Photos struct ContentView: View { @State var showGuide: Bool = false @State var showInfo: Bool = false @StateObject private var photoFetch
0
0
1k
Mar ’24
FilterDataProvider fails installation intermittently and device looses internet
We have a network content-filter consisting of a main target/GUI, a FilterDataProvider extension and a FilterControlprovider extension. The app is installed via MDMs and works without issues the vast majority of times, but during testing of TestFlight builds we've found that intermittently the device fails to install the network extensions and blocks internet access. The GUI is working fine though. From the logs we can see that when this happens the device tries to start the network extensions repeatedly. The issue is solved by restarting the device. Has anyone experienced similar issues or have some ideas of what might cause this behaviour? These are some of the logs we see in Console: neagent [u E6D696F2-62FB-4262-A97C-B2006EC528C5:m (null)] [()] Hub connection error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named .FilterDataProvider ugDescription=connection to service named .FilterDataProvider}code-block Failed to start the data extension .FilterDataProvider: Error Domain=NSCocoaErrorDomain
3
0
814
Mar ’24
Code=4097 "connection to service named com.apple.storekitd"
StoreKit don't work with iOS 17.4. After updating to iOS 17.4 our users can't make any purchases in App. Its very critical bug that affected our App. : Error in remote proxy while checking server queue: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitd UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} [df94_SK2] Failed in XPC product request products(IDs: [report]): Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitd UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} Does anyone know what to do?
1
0
1.7k
Mar ’24
Available Storage displayed in iOS setting is not correct
Hi~recently I have storage issue as follows: Go to iOS Settings -> iPhone Storage , it shows available storage is enough (ex.180.38 GB) But app will get disk full error when trying to write large file (ex. 26 GB) Error Domain=NSCocoaErrorDomain Code=640 The file couldn’t be saved because there isn’t enough space. UserInfo={NSUnderlyingError=0x282db8ae0 {Error Domain=NSPOSIXErrorDomain Code=28 No space left on device}} Then I write the following code to log available space and found it is only 26.95 GB available not 180.38 GB as UI displayed NSError *error = nil; NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:path error: &error]; NSNumber *sizeValue = [dictionary objectForKey:NSFileSystemFreeSize]; uint64_t totalFreeSpace = [sizeValue unsignedLongLongValue]; print(@“ %@ Free space available., [NSByteCountFormatter stringFromByteCount:totalFreeSpace countStyle:NSByteCountFormatterCountStyleFile]); Does any one know what reason may cause this strange situ
4
0
1.7k
Mar ’24
Troubleshooting Core Data Lightweight Migration: A Real-World Challenge
In my recent endeavor, I aimed to introduce new Fetch Index Elements to the Core Data model of my iOS application. To achieve this, I followed a process of lightweight migration, detailed as follows: Navigate to Editor > Add Model Version to create a new version of the data model. Name the new version with a sequential identifier (e.g., MyAppModelV3.xcdatamodel) based on the naming convention of previous models. Select the newly created version, MyAppModelV3.xcdatamodel, as the active model. Mark this new version as the Current model in the Xcode properties panel on the right. In the new version of the model, MyAppModelV3.xcdatamodel, and add the new Fetch Index Elements there. Also, insert v3 in the Versioning Hash Modifier field of affected entity, to indicate this modification. Upon reflection, I realized that creating a new version of the xcdatamodel might not have been necessary for this particular case. However, it appears to have caused no adverse effects on the application's functionality. During t
1
0
971
Mar ’24
Unable to launch application as daemon in macOS
I have a very basic macOS bundled application with just the empty delegate methods implemented. I am wanting to launch this application as a daemon but when I am loading my daemon, it fails to run with the error: The application cannot be opened for an unexpected reason, error=Error Domain=NSCocoaErrorDomain Code=257 The file “GUIDaemon” couldn’t be opened because you don’t have permission to view it. UserInfo={NSURL=file:///Users/vipul.g/Library/Developer/Xcode/DerivedData/Build/Products/Debug/GUIDaemon.app/, NSFilePath=/Users/vipul.g/Library/Developer/Xcode/DerivedData/Build/Products/Debug/GUIDaemon.app, NSUnderlyingError=0x600000034870 {Error Domain=NSPOSIXErrorDomain Code=13 Permission denied}} Below is my daemon property list file. Can someone help what am I doing wrong here. I have made sure that my app has all the permission required. Label com.demo.GUIDaemonApp.plist RunAtLoad StandardErrorPath /Users/vipul.g/MySystemWorkspace/stderr.log StandardOutPath /Users/vipul.g/MySystemWorkspace/s
0
0
489
Mar ’24
Reply to IAP returned an error "Couldn't communicate with a helper application" on iOS 17.4
The issue has been resolved. We found that setting the product name parameter of Xcode to more than 10 Chinese characters can lead to IAP failure. I don't know if this is a deliberate restriction by Apple or a bug in iOS 17.4. when we using SKProductsRequest to request product information, StoreKit will throw the following exception message: [c3d9_SK1] Failed in XPC product request products(IDs: [xsdqxz_tehui_1]): Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.storekitd UserInfo={NSDebugDescription=connection to service named com.apple.storekitd}
Topic: App & System Services SubTopic: StoreKit Tags:
Mar ’24
UIDocumentPickerViewController: Cannot access file from OneDrive
Hello everybody, I am struggling with accessing files from the Location OneDrive through UIDocumentViewController. The error says: Error Domain=NSCocoaErrorDomain Code=260 Die Datei „Testfile.txt“ konnte nicht geöffnet werden, da sie nicht existiert. UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/11E04153-649E-416F-9860-2EA9C0913A18/File Provider Storage/item|1|18a17c69%2D5d6d%2D4b16%2Db388%2D4a9834e9440b/Testfile.txt, NSUnderlyingError=0x281202310 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} The Controller is initialised the following way: let ctrl = UIDocumentPickerViewController(forOpeningContentTypes: [.image, .audio, .video, .item, .content]) And in the delegate method I do the following: func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let documentUrl = urls.first else { return } guard documentUrl.startAccessingSecurityScopedResource() else { parent.errorText = Developer Error: Can't access secu
5
0
1.1k
Mar ’24
Log Messages after upgrading to Xcode 15.3
Hello everyone, after upgrading to Xcode 15.3 I noticed several log messages that weren't present in my project before. Here are some examples: BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to stat item: file:///Users/ ... savedState/restorecount.plist [SendServerMessage](com.apple.mobileasset.autoasset) ErrorHandler: Calling provided reply completion on connection error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobileasset.autoasset was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobileasset.autoasset was invalidated: failed at lookup with error 159 - Sandbox restriction.} for connection connection to service named com.apple.mobileasset.autoasset MA-auto{_failedLockContent} | failure reported by server | error:[NSCocoaErrorDomain:4099] I'm at a loss here. Can I treat these messages as log noise and safely ignore them or is there a
3
0
3k
Mar ’24
Reply to UIFontPickerViewController screen font is broken or black screen issue
When this error message appears, the app also dies. 3 = Error acquiring assertion: (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedF
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’24