Tuesday, February 20, 2024
HomeiOS Developmentios - Can't delete .xcassets content material or folder (even in Finder)

ios – Can’t delete .xcassets content material or folder (even in Finder)


I am taking part on this yr’s Swift Playground Pupil Problem by Apple and encountering a difficulty in Xcode with the .xcassets catalog. I’ve created some assets and saved them inside useful resource catalogs (.xcassets), however I’m unable to maneuver or delete any content material from inside Xcode AND Finder. When making an attempt to delete or transfer a useful resource from one folder to a different in Xcode, I obtain the next error message:
Error message when moving/deleting a resource file from within Xcode

If I attempt eradicating a useful resource catalog file (nonetheless inside Xcode), I get this error message:
Deleting a resource file from within Xcode

My first guess was that the file didn’t exist in my system, so I right-clicked the useful resource in my catalog and clicked on “Present in Finder”, and (sadly), the file existed and was accessible. So, if I’ve entry to the folder and Contents.json file from Finder, I may straight delete them from there, however I obtained this error message every time I attempt to transfer or delete one thing inside one of many .xcassets folders inside Finder.
Error message within Finder

(Sorry, my system is ready to French, mainly, the system cannot discover my file…)

I am nonetheless new to the entire macOS system and have solely developed some small functions in Xcode. However I’ve by no means used Swift Playgrounds. Might that be the problem? I keep in mind having difficulties with .xcassets information prior to now throughout my college’s course on app improvement on iOS.

There are already some blogs and different posts right here about the identical drawback (properly, not less than I feel it’s the identical drawback), however I could not discover any resolution. It has been two days now I have been combating with this .xcassets catalog, folder, file, name them what you need, and could not discover something.

If it might probably assist, right here is my undertaking file construction:

.
├── GreenLight.swift
├── Fashions
│   ├── Recordings
│   │   ├── EmotionRecording.swift
│   │   ├── RecordingType.swift
│   │   └── Recordings.swift
│   ├── Soundscape.swift
│   └── Consumer.swift
├── Package deal.swift
├── README.md
├── Assets
│   ├── Belongings.xcassets
│   │   ├── AppIcon.appiconset
│   │   │   └── Contents.json
│   │   ├── Contents.json
│   │   └── PlantStage
│   │       └── Contents.json
│   ├── Themes.xcassets
│   │   ├── Blue
│   │   │   ├── Contents.json
│   │   │   └── New Folder
│   │   │       └── Contents.json
│   │   ├── Contents.json
│   │   └── Inexperienced
│   │       └── Contents.json
│   └── ThemesOld.xcassets
│       ├── Motion.colorset
│       │   └── Contents.json
│       ├── Blue
│       │   └── Contents.json
│       ├── Contents.json
│       ├── Error.colorset
│       │   └── Contents.json
│       ├── Inexperienced
│       │   ├── Motion.colorset
│       │   │   └── Contents.json
│       │   ├── Blue
│       │   │   └── Contents.json
│       │   ├── Contents.json
│       │   ├── Error.colorset
│       │   │   └── Contents.json
│       │   ├── Spotlight.colorset
│       │   │   └── Contents.json
│       │   ├── Main.colorset
│       │   │   └── Contents.json
│       │   ├── Secondary.colorset
│       │   │   └── Contents.json
│       │   ├── Success.colorset
│       │   │   └── Contents.json
│       │   └── Warning.colorset
│       │       └── Contents.json
│       ├── Spotlight.colorset
│       │   └── Contents.json
│       ├── Main.colorset
│       │   └── Contents.json
│       ├── Secondary.colorset
│       │   └── Contents.json
│       ├── Success.colorset
│       │   └── Contents.json
│       └── Warning.colorset
│           └── Contents.json
├── Utilities
├── ViewControllers
│   └── MainViewController.swift
├── ViewModels
│   ├── GreenlightView.swift
│   ├── HomePageView.swift
│   ├── LoginView.swift
│   ├── Major.swift
│   ├── Recordings
│   │   ├── Kinds
│   │   │   └── EmotionRecordingFormView.swift
│   │   ├── RecordingDetailView.swift
│   │   ├── RecordingEntriesListView.swift
│   │   └── RecordingListView.swift
│   ├── SettingsView.swift
│   └── Soundsapes
│       ├── SoundscapeCustomizationView.swift
│       └── SoundscapeListView.swift
└── Views
    ├── GlobalStatsCard.swift
    └── PlantImageView.swift

What I’ve completed :

Here’s what I’ve completed already :

  • Shut and reopen my undertaking
  • Restart Xcode
  • Restart my pc
  • Attempt deleting from Finder straight
  • Verify entry authorization on information / folder
  • Change entry authorization on information / folder

I’ve created a number of .xcassets catalog file for testing, this “bug” occurs on everybody of them.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments