Hi, I am new to Xcode and just starting to write my first lines of code. When I start my app on the Simulator it works fine the first time. Sometimes one code change also works, but then I always run into problems. The Simulator does not update or run properly anymore. I tried killing all Simulator processes, restarting xCode, stopping most other running apps, nothing worked but to reboot. Anyone an idea what to do? Here are two of the error messages that pop up: Error message 1 Couldn’t communicate with a helper application. Domain: NSCocoaErrorDomain Code: 4099 Recovery Suggestion: Try your operation again. If that fails, quit and relaunch the application and try again. User Info: { DVTErrorCreationDateKey = 2022-04-14 18:58:11 +0000; IDERunOperationFailingWorker = _IDEInstalliPhoneSimulatorWorker; NSDebugDescription = The connection to service named com.apple.l s d.installation was invalidated: failed at lookup with error 32 - Broken pipe.; } -- Analytics Event: com.apple.dt.IDERunOperationWorkerF
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Our app includes a share extension that allows you to share images which are uploaded and stored in S3. Prior to iOS 15 this generally worked without any issues. I am now getting the following error with the background upload session, but only after the first share. An error occurred on the xpc connection requesting pending callbacks for the background session: Error Domain=NSCocoaErrorDomain Code=4097 connection to service with pid 126 named com.apple.nsurlsessiond In other words if I share 5 images they all upload fine. If I try to upload an additional 5 the first one usually succeeds and the rest all fail with the above error. Wondering if anyone else has seen this issue and has any thoughts on how to address this.
Hello all, I am using a AVAggregateAssetDownloadTask to download a stream. In the session's init, the delegateQueue is set to main. I create and resume session tasks from a separate thread: func doSomething async { Task { //Task setup here mySessionTask.resume() } } Now, in the delegate, I have: public func urlSession( _ session: URLSession, aggregateAssetDownloadTask: AVAggregateAssetDownloadTask, willDownloadTo location: URL ) { print(Location: (location.path)) do { let data = (try location.bookmarkData()) print(Great! We generated bookmark data with length (data.count)) } catch { print(Ooops, an error occurred: (error)) } The problem is, when I run the code I get an error: Error Domain=NSCocoaErrorDomain Code=260 The file couldn’t be opened because it doesn’t exist. I am not sure why this is the case. My code is basically exactly the same as a sample from Apple: https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/using_avfoundation_to_play_and_persist_http_live_stre
We are a picture design company. When we use the Photos library to store pictures to albums, we encountered a large number of user album storage failure cases. The most error code is 41002, but I don't know how to fix it, or avoid it. Error Example: Error Domain=com.apple.photos.error Code=41002 Unable to obtain assetsd XPC proxy for getPhotoKitAddServiceWithReply:. assetsd could have crashed UserInfo={NSLocalizedDescription=Unable to obtain assetsd XPC proxy for getPhotoKitAddServiceWithReply:. assetsd could have crashed, NSUnderlyingError =0x2818a8b70 {Error Domain=NSCocoaErrorDomain Code=4097 connection to service on pid 0 named com.apple.photos.service UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.photos.service}}}
Thanks for your answer, Quinn. Yes, I'm using SMLoginItemSetEnabled to register the agent. When debugging, I run the agent direcly from Xcode instead of relying upon it to be started by launch services. I have tried to follow your advice, but apparently I am still doing something wrong, because NSXPCConnection.remoteObjectProxyWithErrorHandler() calls made in app extension do fail with: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named S1J6DZ9E7U.com.myapp.agent.srv2 was invalidated: failed at lookup with error 159 - Sandbox restriction. Looking at the application bundle I think I am using the correct application group % codesign -dv --entitlements - agent.app/Contents/MacOS/agent Executable=/Users/user/Library/Developer/Xcode/DerivedData/MyApp-eylcetoqyczzehhcpvnjldtuqcay/Build/Products/Debug/agent.app/Contents/MacOS/agent Identifier=com.myapp.agent Format=app bundle with Mach-O thin (x86_64) CodeDirectory v=20500 size=114401 flags=0x10000(runtime) hashes=3564+7 location=embe
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hi, I'm developing an macOS app which includes an agent (registered as login item) which is intended to run for entire duration of user's login session. The agent's bundle also includes few application extensions. The application is intended to be distributed outside of App Store. It is not going to be sandboxed but rather notarized, so I'm using hardened runtime. I want to add some application extensions (for example: a file provider etension) to be bundled with the agent. The extensions are sandboxed and belong to the same application group as main application and the agent. Extensions should do some IPC calls on the running agent process. I think the most convenient solution for the IPC would be to use the XPC service, so, in the agent, I'am creating an XPC listener registered to mach service name. Now I want to connect to the XPC service provided by the agent from the app extensions. This, however, fails with the following error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service
I am trying to create a build server for my CICD pipeline. The problem is whenever I'm trying to run the following command: xcodebuild -exportArchive -archivePath /Users/ec2-user/CICD/Project_path/build/ios/archive/Runner.xcarchive -exportPath /users/ec2-user/CICD/Executions/Build_16-03-22_9:50:45 -exportOptionsPlist /users/ec2-user/CICD/ExportOptions.plist for generating a .ipa file the Xcode is repeatedly trying the following process and randomly he succeeds/failed. These errors could return Succeed after a few times that the Xcode is trying to sign and sometimes will fail. I am using an AWS instance with 5GB bandwidth so I don't think is a plausible connectivity timeout. 2022-03-16 10:04:28.689 xcodebuild[39983:283429] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed
Hello I'm having a problem with the SwiftUI preview, I created a package, which has resources and I'm trying to run the preview inside the package. But the preview gives the following error: PreviewUpdateTimedOutError: Updating took more than 5 seconds Updating a preview from in XCPreviewAgent.app (6693) took more than 5 seconds. When I generate the diagnosis and see the SerializationErrors.txt it gives the following message: Error Domain=NSCocoaErrorDomain Code=516 “resource_bundle_accessor.swift” couldn’t be linked to “Intermediates” because an item with the same name already exists. UserInfo={NSSourceFilePathErrorKey=/Users/********/Library/Developer/Xcode/DerivedData/********-glsxbeukhhwappbnunipftxmhjvi/Build/Intermediates.noindex/Previews/********/Intermediates.noindex/***** ***.build/Debug-iphonesimulator/********.build/DerivedSources/resource_bundle_accessor.swift, NSUserStringVariant=( Link ), NSDestinationFilePath=/var/folders/xt/s6r881rx7bjfcw_mds72nxyw0000gp/T/previews-diagnostics-2022030
I am working on uploading pdf file to server using UIDocumentPicker. It selects the file correctly but while fetching the file content it is throwing this error: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=257 The file “file-sample_150kB.pdf” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/file-sample_150kB.pdf, NSUnderlyingError=0x28225c5a0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} Here my code for uploading file to server. func uploadDocumentRequest(targetVC : UIViewController, args: [String : String], url: URL) { let boundary = generateBoundaryString() var body = Data() for (key, value) in args { body.append(Data(--(boundary)rn.utf8)) body.append(Data(Content-Disposition: form-data; name=(key)rnrn.utf8)) body.append(Data((value)rn.utf8)) } let filePathKey = file let filename = doc_file.pdf let fileData: Data =
Am I the only one that's also seeing this issue on device? I started noticing it with iOS 14 and it's continued intermittently on iOS 15 too. Every once in a while my app just stops being able to paste text that was copied from anywhere. Force-quitting the app fixes it so that the app can paste again. I've never gathered a sysdiagnose or anything, but I do have logs from when it's happened in the simulator too. 2022-01-19 22:57:34.052240-0600 Testing[13092:3724690] [scoped] <0x283552940 file:///var/mobile/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/e773525714f94678cc813686e707bb53ec1d2285>: internal sandbox error for 2022-01-19 22:57:34.060486-0600 Testing[13092:3724763] [claims] Upload preparation for claim 2B831962-7238-4C74-B05E-396F22C916EA completed with error: Error Domain=NSCocoaErrorDomain Code=257 The file “e773525714f94678cc813686e707bb53ec1d2285” couldn’t be opened because you don’t have permission to view it. UserInfo={NSURL=file:///var/mobile/Libra
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Same problem here. I'm running in a iPhone X with iOS 15.3.1 I have two photos in the same folder. The first fails when result.itemProvider.loadObject(ofClass: UIImage.self) [0] (null) public.jpeg : /private/var/mobile/Containers/Shared/AppGroup/F925A8FA-C8EC-42CB-8990-0370E73A9808/File Provider Storage/photospicker/version=1&uuid=3034711E-F03B-44CD-B180-659775A56EA6&mode=current.jpeg The second is ok. [0] (null) public.jpeg : /private/var/mobile/Containers/Shared/AppGroup/F925A8FA-C8EC-42CB-8990-0370E73A9808/File Provider Storage/photospicker/version=1&uuid=299A6E28-21CC-440E-8C1B-A05F479081C0&mode=current.jpeg I have tried also with result.itemProvider.loadFileRepresentation(forTypeIdentifier: representation), with UTType.jpeg.identifier, and the same error. PHPickerResult(itemProvider: {types = ( public.jpeg )}, assetIdentifier: Optional(3034711E-F03B-44CD-B180-659775A56EA6/L0/001)) 2022-02-24 23:45:49.484182+0100 App[1344:394073] [claims] Upload preparation for claim 8E1CBDF5-66F2-4453-87
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Background Core Data driven app, successfully using NSPersistentCloudKitContainer for some time. App is written 100% SwiftUI, currently targeting iOS and macOS targets. Development only, no production release yet. Error... ... Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. ... reason=Cannot migrate store in-place: CloudKit integration forbids renaming 'foodServes' to 'foodPortions'. Older devices can't process the new relationships. An unusual problem for me... the renaming occurred between version 7 and version 8 of the Core Data model and this is version 13. So if I revert back to version 12, there is no issue. It is only when I add the new Entity in model version 13 that the error occurs. The new entity incudes a relationship back to two other existing entities, but not the Food entity that contains the foodServes -> foodPortions renamingID. To be clear, the error relates to a renamingID that was implemented in the
UPDATE: I tried using loadFileRepresentation instead. itemProvider.loadFileRepresentation(forTypeIdentifier: UTType.jpeg.identifier) { (url, error) in guard let url = url else { print(Failed to load url) return } And this time I get the following error on the console. `Error copying file type public.jpeg. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 Cannot load representation of type public.jpeg UserInfo={NSLocalizedDescription=Cannot load representation of type public.jpeg, NSUnderlyingError=0x600001d26430 {Error Domain=NSCocoaErrorDomain Code=4101 Couldn’t communicate with a helper application. UserInfo={NSUnderlyingError=0x600001dbcb70 {Error Domain=PHAssetExportRequestErrorDomain Code=0 The operation couldn’t be completed. (PHAssetExportRequestErrorDomain error 0.) UserInfo={NSLocalizedDescription=The operation couldn’t be completed. (PHAssetExportRequestErrorDomain error 0.), NSUnderlyingError=0x600001dbca80 {Error Domain=PAMediaConversionServiceErrorDomain Code=2 The operation could
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
ataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 Invalid value around line 1, column 0. UserInfo={NSDebugDescription=Invalid value around line 1, column 0., NSJSONSerializationErrorIndex=0}))) dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/eshansingh/Library/Developer/Xcode/DerivedData/EmployeeManagement-bfquzjwgjywziwfrfyygkodtlgop/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I have be trying to use the sample code project associated with WWDC21 session 10294: Meet MusicKit for Swift, with Catalyst. The apps works on mac correctly excepted the playback and the barcode scanning (that is out of my scope) The following message is displayed continuously: MusicAlbums[30849:533531] [SDKPlayback] Failed to obtain synchronousRemoteObject: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process.} Before diving deeper i wanted to know if some of you have been able to play music via MusicKit with Mac catalyst? The sample code uses an ApplicationMusicPlayer.shared that is not available directly on macOS. (In fact none of the Music players are available) Would yo