Since deleted notes get into the search, I want to delete them immediately and not wait 40 days! Can anyone help? Thanks!
Deleted notes are moved into a folder Recently Deleted.
Just delete the notes in this folder
tell application "Notes"
try
delete every note in folder "Recently Deleted"
end try
end tell
The try block ignores an error if there is no folder Recently Deleted
Related
I just created a group and want to rename it but getting unable to update popup.
I know how to rename it from show in finder. but y Apple in Xcode 10.2 does not allowed it directly from Xcode?
Or
Am i missing something?
I was facing the same issue today. Only thing which helped me was quitting the Xcode and restarting it. It is working for me now
I just checked and found another way without restarting Xcode.
I have the same issue. #ravin001 i did the same thing as you and quit and restarted Xcode but i found another way.
• Go ahead and Right Click wherever you want to create the Folder/Group.
• Select New Group.
• Press Enter to name the Folder/Group whatever Xcode suggested (usually "New Group").
• Now make sure the new Folder/Group is selected and Open the inspector panel.
Inspector Panel: top most right corner.
• The little page "file inspector" should be highlighted. If not, select it.
Trying to rename it won't work, First you have to rename the folder wherever it's stored.
- To do so:
• In the inspector panel, underneath the "location" title, you should see a folder icon. Click on that folder icon.
• Xcode will open a "choose a location" folder structure widget right in the middle of the screen.
• Right Click on the "New Group" folder and Rename it to whatever you want.
• Click on the 'Choose' button to close the widget ("It's important to select choose")
Now you rename the folder to whatever you like in Xcode
NOTE
• Renaming the folder any other way other than through the "Choose a location" way, won't work and you still won't be able to edit the folder
• You'll need to do this for every folder you create. So if you just created the project and will be adding a lot of folders, then it's probably best to restart xcode
I was seeing this problem today. After further investigation I determined it was due to already having folders in that directory using the same names. This was caused by creating a Group in Xcode but reverting my git changes, which didn't revert the folder creation only the Xcode Project File changes.
Check in Finder that the folder/group names are unique.
If you just created this group and you know for sure that the name wasn't already used in this project... Make sure the folder is not open.
You do this but looking to the left side of the folder(there is a triangle/arrow) if the triangle is pointing down, this means the folder is open and Xcode won't allow you to rename the folder.
Simply press the triangle to close it (it will be pointing towards the right when closed) and try to rename again.
You shouldn't have to exit out of Xcode!!!
See next to "New Group" the arrow is pointing down
Tap on the arrow and it will point to the right
Now you are able to change the name to Controller
Let me know if this solved you issue.
i am also facing this issue. What works for me is Force Quit Xcode and restart it. Also make sure that your group should be in Right path by Right Clicking and show in Finder option.
In my case the folder was already created on the filesystem but it wasn't showing on the Project Navigator.
I only had to change the location of the "New Group" folder using the folder icon on File Inspector tab.
I think its not related to xcode, its finder problem, because directory still exists and finder doesn't show that, you can see directory exists by entering ls in terminal.
How to solve this?
Open terminal and navigate to parent directory of desired directory : cd ~/../parent or just right click parent directory and choose New Terminal at Folder
Remove desired directory : rm -rf MyGroup
Now you can try to create your group with MyGroup name.
Ok... When you create a group it also creates a folder there. If you delete the group, the folder will not be deleted. Then if you change your mind and create the group again, it will try to create the folder again. But since the folder exists, the OS will throw an error which Xcode just reports as an inability to create the group.
So just rename or delete the underlying folder and now you can rename the group. You can rearrange the files in Finder after that.
First Restart Xcode. If restart doesn't work then check that is same group name already exist inside folder. If group exist then delete it. Hope this two process will help to solve this issue.
I accidentally had one of my files selected in a project in Xcode and pushed delete and it was deleted. Anyone know how to recover it? It won't let me undo. Please help.
The file itself is not deleted, it is simply removed from the Project Navigator.
To add it back, go to
File -> Add files to "projectName"
and select the missing file, after having navigated to the project's folder if needed.
Or simply hit cmd+z
May be its too late but for someone else it might be good to know, that's why I am answering it.
Go to File >>> Add Files'Your Project Name' there will be a list of all files which have been removed from project, select and add them back.
Now these files are back in project, but they don't have any reference yet so xCode will give you error saying "Storyboard do not have any file of this name", now you have to add references, for this just right click on that missing files and add that file to project.
NOTE: If you have removed files directly to trash then restore from trash and repeat second step to add reference back in project.
This file should be in the trash folder, look in that folder or you can search via apple spotlight.
The following steps will allow you to recover (a) deleted file(s):
Click on the trash icon on the bottom right
Search for the file(s) and move it back into your project folder
In XCode, go to File, Add Files to ..., then select the file(s) you've just restored
There are some files that XCode deletes utterly without warning. These files are permanently deleted unless you have a backup.
I am having a very strange thing happen to me when trying to work on any of my Xcode projects. All the projects that do this are apps that have already been published on the App Store. When I try to edit any of the files, .storyboard, .h or .m, Xcode will rename them by adding a "~" at the end of the name, for instance, "Main.storyboard" becomes "Main~.storyboard". This will cause Xcode to say that they have dissipated. I can get them back by going to the file in Finder and just deleting the "~" from the name. This problem is preventing me from working on or updating any of my apps. What is going on?
Update: A reinstall of Xcode did not help the problem. Here is a pic of the error.
Clicking "resave" allows me to work without the file disappearing but I will still get these errors every few minutes.
Whenever I close Xcode and then open it again, some file gets deleted and I have to start all over again. When I checked the file status it says locally deleted. Is there a way I can fix this :
Thanks
There is a possibility that your 'red' files (classes) are not at the same location as they were the last time you opened the project.
Find the files which were red, add them back to your project, and
delete the red links. Assuming, that you haven't deleted them by
mistake. (in case you did accidently - here's a hack)
Check the full path of the missing file or 'Show in Finder'. Can you access it?
If this doesn't help, I found this useful thread when I was using Xcode 4.1 earlier. Check it.
When I erased a class from my project in xcode, it somehow disappeared from my Mac.
I can't find it in the trash of the mac, I cant find it in the project folder.
Where is it?
Xcode deletes files immediately. If you want to keep them, press "Remove the references" in the confirmation dialog.
Yeah, I found this out the hard way too... You cannot recover it once you have deleted it via Xcode (Sucks i know)
All I can say is to write the lost class again and start using Time Machine or Xcodes built in source control to backup your files so it don't happen again in the future