Does that mean you have multiple applications using that same file resource? What if that icns is copied to another folder them re-insert them into the ide. See what happens?
@Jens K Same here. After reading the user guide, I did the following steps:
- Add a new script via Insert > Build Step > Script.
- Copy the mentioned code to the script.
- Drag the script in the navigator to macOS in the Build Settings section of the navigator.
- Your script has to be above the Build entry in order to be executed before building; drag it there, if it is unter the Build entry.
This works perfectly for running a debug application, but I have the additional problem, that my application is not built as long as there is already an application build in the Builds folder. So I would like to add some lines of code to my build script to remove the Builds folder of my application before building it again.
By now I have no working result. Is there a way to extend Beatrix' script for that?
I tried that initially but for some reason I can't drag the script into the build setting section of the left side panel. Unless I'm doing it wrong. When I try to drag it there it bounces back to where it started from.
@Beatrix W How can I whack iconservices into behaving? Or is this a MacOS bug?
Most likely the later
@Beatrix W @Derk J: not a setting. Seems to be a problem with the macOS hanging on to the icon file. I suspect that this is also the reason why quitting the debug app takes so very very long on High Sierra.
I am seeing this also... it takes a really looooooooonnnnngggggggg time.
I tried to transfer the project from the HS machine to my El Cap machine, but HS won't see my network shares, won't see other machine in AirDrop and it's a USB-C machine so I can't just plug a USB stick or SD card in. I'd disabled iCloud because it ate half my bookmarks. Sometimes I really wonder if Apple do any QA anymore or if it's simply left to the beta testers.
Here is something interesting ...
This may not be the issue but Iwas debugging an app with the entire project folder on <gasp> Dropbox (a cloud file sharing service). I think there was some hints below that the .debug file issue may be a timing thing. So, as a test, I moved my project to a local drive and the .debug file is deleted as it should be. The next debug session comes up without error this time.
So perhaps some odd timing or sharing nuance may be causing this? The failure was on the same system and the OS has been updated (macOS 10.13.1).
A word of warning when using "rm -r", always add code to verify that the path you intend to delete is exactly what you think it is. In the past I had a function go wrong and supply the wrong path to the rm -r function, there's no coming back!
when you see this occurring PLEASE open terminal and run
lsof +D <full path to the debug app bundle>
draggin the "debug" file into terminal should give you the right path
We do a low level unlink of the file (which is what rm calls to remove files) but if the file is busy this too can fail