Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to AppIntents Parameter requestValue not working in iOS 18 when parameter is not in parameterSummary
The issue still exists on iOS18 and beta 18.1. Entity import AppIntents struct CategoryEntity: AppEntity { var id: UUID var name: String init(name: String) { self.id = UUID() self.name = name } var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: LocalizedStringResource(stringLiteral: name)) } static let typeDisplayRepresentation: TypeDisplayRepresentation = Category static let defaultQuery = CategoryEntityQuery() } struct CategoryEntityQuery: EntityQuery { func entities(for identifiers: [CategoryEntity.ID]) async throws -> [CategoryEntity] { SampleData.categories } func suggestedEntities() async throws -> [CategoryEntity] { SampleData.categories } } struct SampleData { static var categories: [CategoryEntity] = [ .init(name: Category 1), .init(name: Category 2), .init(name: Category 3), .init(name: Category 4), .init(name: Category 5) ] } Intent import AppIntents struct Intent: AppIntent { static let title: LocalizedStringResource = Intent static var parameterSummary: some Par
Topic: App & System Services SubTopic: General Tags:
Oct ’24
'You don’t have permission. - The AVPlayerItem instance has failed with the error code 257 and domain "NSCocoaErrorDomain".'
[[PHImageManager defaultManager] requestAVAssetForVideo:asset options:videoOptions resultHandler:^(AVAsset *_Nullable avAsset, AVAudioMix *_Nullable audioMix, NSDictionary *_Nullable info) { if ([avAsset isKindOfClass:[AVURLAsset class]]) { AVURLAsset *urlAsset = (AVURLAsset *)avAsset; NSURL *videoURL = urlAsset.URL; mediaInfo[@path] = videoURL.absoluteString; } else { // Failed to get video asset completion(nil); } }];``` Before iOS 18, i could able access AVAsset video using the method mentioned above with the url, but starting from the iOS 18 version, the following error appears 'You don’t have permission. - The AVPlayerItem instance has failed with the error code 257 and domain NSCocoaErrorDomain.'
2
0
755
Oct ’24
Reply to macOS 15.1 Beta 5: Mac App Store unable to install apps "The file “preflight.pfpkg” doesn’t exist"
Navigating to /Library and creating a folder called AppStore fixed the issue for me. App Store incorrectly complained about not having enough disk space, but the real issue was that the folder being inspected, /Library/AppStore, didn't even exist. [DiskSpaceManager] availableSpaceOnDiskAtPath:/Library/AppStore/086CC570-12A0-4414-98D7-831B563088C0 failed: Error Domain=NSCocoaErrorDomain Code=260 The file “086CC570-12A0-4414-98D7-831B563088C0” couldn’t be opened because there is no such file. UserInfo={NSUnderlyingError=0x89f096790 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}, NSFilePath=/Library/AppStore/086CC570-12A0-4414-98D7-831B563088C0, NSURL=file:///Library/AppStore/086CC570-12A0-4414-98D7-831B563088C0}
Oct ’24
Xcode 15 beta 8 can't connect to iOS 17 beta 6
When I try and deploy my app to my iPhone 12 running iOS17 Beta 6 with Xcode beta 8 I get : Previous preparation error: The developer disk image could not be mounted on this device. CoreDevice_DDI_Staging This has been happening since beta 5 I think, worked on beta 3 for sure. Yes, I have reinstalled and rebooted everything multiple times, turned developer mode off and on along with pretty much every other incantation. I have tried to manually create the directory CoreDevice_DDI_Staging_502 in /private/var/tmp/ as the recovery suggestion kind of implies but get permission denied. The full error is: the developer disk image could not be mounted on this device. Domain: com.apple.dt.CoreDeviceError Code: 12040 Failure Reason: You don’t have permission to save the file “my device id” in the folder “CoreDevice_DDI_Staging_502”. User Info: { DVTErrorCreationDateKey = 2023-08-31 21:45:03 +0000; DeviceIdentifier = xxxxx; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = file:///Users/xxx/Library/Deve
4
0
2.5k
Aug ’23
What is the correct method for renaming a file in the app's container using the Swiftui 2.0 Document based template?
I've been using the new template for a document-based SwiftUI app. While you get a lot of file-management for free in the new template, as it stands in the iOS version users have to back out of the file to the file browser to change the filename. I want to create an opportunity for the user to rename the file while it is open. Here's a sample project focused on the issue: https://github.com/stevepvc/DocumentRenamer In the code, I've added to the template code a simple UI with a textfield for the user to enter a new name. When the user hits the rename button, the app checks to see if the URL with that name component is available, appending a suffix if necessary to create a target url. func getTargetURL() -> URL { ttlet baseURLt=tself.fileurl.deletingLastPathComponent() ttprint(filename: (self.filename)) ttprint(fileURL: (self.fileurl)) ttprint(BaseURL: (baseURL)) ttvar target = URL(fileURLWithPath: baseURL.path + /(filename).exampletext) ttvar nameSuffix = 1 tt ttwhile (target as NSURL).checkPromisedItemIsR
3
0
3.6k
Oct ’24
Mac OS 15, XCode 15.3
We recently upgrade our OS from Sonoma to Sequoia and have been using Fastlane to generate our ipa(s) However since the upgrade we are facing the following error: 00:26:30 + xcodebuild -exportArchive -exportOptionsPlist /var/folders/sk/_k2v73dd5hscn2mcvcqc43gs69_8bc/T/gym_config20240930-10121-gjvg0h.plist -archivePath /Users/ejeniossvc/jenkins/workers/workspace/local-jenkins-build32/-1449677665/452/build-dir/rqa-EnterpriseDistribution/dist/MY.xcarchive -exportPath /var/folders/sk/_k2v73dd5hscn2mcvcqc43gs69_8bc/T/gym_output20240930-10121-27pj6 -allowProvisioningUpdates -skipPackagePluginValidation -skipMacroValidation CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM=xxxxxxxxxxxx 00:26:30 error: Couldn't load -exportOptionsPlist: The data couldn’t be read because it isn’t in the correct format. 00:26:30 00:26:30 Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not a valid property list., underlyingError: Optional(Error Domain=NSCocoaErrorDomain C
1
0
1.2k
Oct ’24
Issue with AVAsset access in iOS 18 beta
NSString *filePath = @/var/mobile/Media/DCIM/100APPLE/IMG_0800.MP4; NSURL *fileURL = [NSURL fileURLWithPath:filePath]; AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:fileURL options:nil]; Before iOS 18, you could access AVAsset using the method mentioned above, but starting from the iOS 18 beta version, the following error appears Error Domain=NSCocoaErrorDomain Code=257 未能打开文件“IMG_0800.MP4”,因为你没有查看它的权限。 UserInfo={NSURL=file:///var/mobile/Media/DCIM/100APPLE/IMG_0800.MP4, AVErrorFailedDependenciesKey=( assetProperty_AssetType ), NSUnderlyingError=0x30c497f60 {Error Domain=NSOSStatusErrorDomain Code=-12203 (null)}}
7
0
2.3k
Jul ’24
Reply to File transfer issue from iPhone to Watch after iOS 17.5 & WatchOS 10.5 update
Help! How can transfer img file from phone to watch? I meet below problem: Compress: 84317 bytes Save to: ../Application/06FB8B02-39C8-4844-B13B-D3860EE5B564/tmp/compressed_image.jpg Read file scuccess: 84317 bytes -[WCFileStorage persistOutgoingFileTransfer:] error serializing file transfer , transferring: YES> due to Error Domain=NSCocoaErrorDomain Code=4866 Caught exception during archival: This object may only be encoded by an NSXPCCoder.
Topic: App & System Services SubTopic: General Tags:
Oct ’24
Reply to MacOSX Sonoma 14.7 + XCode 16.0 + iOS 17.6.1:
Thanks for your reply... Here is the information you have requested: Request xcrun devicectl list preferredDDI Response Host CoreDevice version: 397.21 The DDI used for the iOS platform: • hostDDI: file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg ▿ ddiMetadata: • buildUpdate: 16A242d • contentIsCompatible: true • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: iOS ▿ projectMetadata: • Citrine-94 • CoreDevice-397.21 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-300.21 • JetsamProperties-2205 • LiveExecutionResultsLogger-20002 • Mercury-54 • XCTest-23196 • isUsable: true • variant: external The DDI used for the tvOS platform: • hostDDI: file:///Library/Developer/DeveloperDiskImages/tvOS_DDI.dmg ▿ ddiMetadata: • buildUpdate: 16A242d • contentIsCompatible: true • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platfo
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Today, mysteriously, the sample code works again. How could this possibly happen? Yesterday all my App Store apps weren't able to resolve and create file bookmarks, and today they work again. It's hard to guess at an exact cause, but this particular error: Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key ...comes from one of the intermediate daemons involved in resolving security scoped bookmarks. If there was a problem in one of the lower level daemons it communicated with, then it's possible the problem would resolve itself if/when that daemon restarted. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’24
Reply to Help with 2 way relationships with classes (SwiftData / cloudkit)
I'm getting 2 errors when I try add cloudkit.. The first because a direct relationship does not exist and the second is a container issue ... error: Store failed to load. (type: SQLite, url: file:///var/mobile/Containers/Data/Application/D931D996-869F-4CED-842E-D1373B0DE090/Library/Application%20Support/default.store) with error = Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=CloudKit integration requires that all relationships have an inverse, the following do not: GroupData: task GroupSortOrder: group TaskData: groupSortOrders} with userInfo { NSLocalizedFailureReason = CloudKit integration requires that all relationships have an inverse, the following do not:nGroupData: tasknGroupSortOrder: groupnTaskData: groupSortOrders; } SwiftData/PersistentModel.swift:327: Fatal error: Unable to find a container with entity GroupSortOrder My classes are as follows: import SwiftData @Model class TaskData: Identifiable, Equatable { var id = UUID() va
Sep ’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
Sep ’24
iPadOS 18 Beta and SwiftData issues
I had a series of @Model classes with some mandatory attributes and some optional. Pre-move to 18, everything was working fine. After the migration, it reports that every single non-Optional attribute is nil upon trying to save. The error is CoreData related but not sure if its in the Core layer or Swift layer. Sample error (with app data removed) is : SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 Multiple validation errors occurred. Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=systemName, NSValidationErrorValue=null} I have modified the code to provide default values for all constructors in an attempt to see a difference, but get the same errors
3
0
1k
Jun ’24