Accidentally wiped Cordova project - xcode

I wrote "cordova prepare ios" in my terminal console, unaware that it would wipe my project.
I do have a copy of my javascript file, but my css and html file are gone.
It happened 5 minutes ago. Is there any possibility in getting these files back? If so, how?
I worked 6 months on that project.
I did not press the "Build"-button, so the application on my iPhone is still with the original files.
I'd really appreciate any help.
Thank you very much.

Here's how I did it.
If you deleted your projects original content, but have not compiled the app yet, you can easily recover your work by following these steps:
Open Stoplight and enter "appname".app
Show all results in Finder and right click your .app file (If you find multiple select the one with the most current "Modified"-timestamp)
Click "Open enclosing folder"
Right click the .app file now in the newly opened window and click "Show package content".
Bam, all your files are there. Just copy them back into your project folder.

Related

Missing phpStorm project folder icons on OSX 10.10 in phpStorm explorer

I am working with the deployment feature to easily upload files to a server. So opening a specific project folder for which I have already set up deployment gives me the opportunity to work with the project files instantly and also upload them without any problems.
The problem is with opening the right folder. When setting up deployment for a project you choose a folder as the 'root' folder for this one project and when one wants to load this settings he has to choose the right folder when opening a project. Sometimes there are some differences which folder is chosen as root (most of the time the folder is 'domain', but sometimes it's another folder).
When I now want open a project folder to work with the files and have the deployment ready, I can not recognize in the popped up window which folder is the right one. Friends of mine (win8/Linux) tell me that they have a phpStorm icon instead of the standard folder icon.
On the other hand I told OSX to show me the hidden files on my system which results in following:
As you can see Finder shows me the .idea file, so at least I know the folder I am at right now is the project folder. But I in the future I don't want to check first in Finder, which folder the right one is and then open phpStorm to open it there.
I hope anybody understands my problem :). Thanks for any tips, really annoying topic.
Update:
Maybe the problem comes with the fact that phpStorm on OSX uses Finder as the explorer when trying to open a project folder. The explorer on Windows looks similar
I posted on the jetbrains helpforum, the 'answer' was:
Relates to: https://youtrack.jetbrains.com/issue/IDEA-100279
Duplicates: https://youtrack.jetbrains.com/issue/IDEA-131303
Nothing anybody could have find out themselves, there does not seem to be a better answer than "give the folders related to PHPStorm the right icon, manually".

Storyboard file in Xcode now showing up as an empty folder

I opened my Xcode project this morning and found that the .storyboard file in my project now shows up as a folder named MainStoryboard.storyboard instead of an actual storyboard file.
It seems to be the same when I open it in finder and any Time Machine backups, which I find strange because I've had it opened in Xcode more recently than some of the backups.
Is there any way to recover the file or is all hope lost?
This is what I see in the Project Navigator:
Turns out someone had opened the project file in a Developer Preview of Xcode. I had to go way back in Time Machine to find a version of the file that would open.

How to refresh Project Navigator content in Xcode?

I'm not able to refresh file list in Project Navigator. There is no refresh button, and I don't think restarting Xcode should be the solution.
How do you see files that you add externally? I'm on Mac.
How do you see files that you add externally?
Files cannot be added externally. Dumping a source file into the project directory does not add it to the project. To add a file you must add it to the project from within Xcode.
If you have a bunch of files that you need to add then in the Add File dialog you can just select all the files you want at once and add them, without having to repeatedly open the Add File dialog. Just use control clicking to select multiple files.
Close and reopen the project, if necessary.
This may be required if you are using folder references (as one example). In that case, touching the directory might work to refresh what Xcode displays.
For a single file, you can open the external file in Xcode and cmd+s to save it, it will be refreshed in Xcode.
Also, for the quick way you can just chose the external folder in Xcode and cmd+s, it will refresh all your external file in this folder.
File > Add files to "Runner" 👍
I don't think you can refresh the Project navigator to detect files that have been modified outside of Xcode, and that instead you need to manually add or delete files from the Project navigator with "right-click" / two-finger tap.
Some other solutions suggested:
File > Add Files to "Runner"... but that doesn't delete files
Open and close Xcode, but that's not practical. It also did not work for me.
Use cmd+s, but Xcode does not detect files which need to be saved. And so, that also did not work for me.
You can just press "Command + B", for refresh your project in xcode

Xcode 4.3.2 show hidden files

I am using Xcode 4.3.2 and I am trying to add some SDK references to my project.
I can SEE the files using Finder, as I used the terminal script to view hidden files.
Yet, when I go to my user home directory in Xcode finder, it does not show the "hidden" 'Library' folder under my user profile that stores my SDK files.
Scratching head
Press and hold the ⌘ + shift and . keys at the same time.
Then you can switch to view hidden/non-hidden files.
Answering you 9 months later from OS X 10.8 Mountain Lion...
Press ⌘ShiftG from within Xcode's Open dialog -- this is the Go To Folder command from Finder. This works in XCode's Open dialog as well. You could go to 'Library' or, as I did below, go to the otherwise hidden .config directory by typing '.config'
This screenshot shows both the process & the result of opening the .config folder. Note that I've already 'gone' to the .config folder once, which is why it's displayed on the left, above Applications.
Which command are you Using ?
Use Bellow Command it worked for me.
If the Library folder is not visible in your folder, enter the command "chflags nohidden ~/Library/ " on Terminal(Applications->Utilities->Terminal) application
Had a similar problem (but arrived on this page looking for answers).
I removed a reference to a file in XCode which I actually wanted to keep but the file still existed in finder.
Even though the file is in the correct folder, Xcode won't acknowledge it until you re-add it via File > Add Files To "YourProject"
The point I'm making is that the files in your code project folders vs. those actually included in the XCode project are two different things

Remove files from Xcode project

I do not know why, but somehow two files were added to project with a mistake as you can see on screenshot. How can I safely remove them from Xcode project? I've already deleted them from disk, but delete button is grayed out in Xcode interface.
Just had this problem today. The fix for me (on Mac) was:
Find YourProjectName.xcodeproj in finder.
Right click > Show package contents.
Inside there, right click on project.xcworkspace > Show package contents.
Open contents.xcworkspacedata (XML format) in any text editor and manually remove the references.
Hope this helps anyone with the same issue!
Do a clean of all targets and then remove the app from simulator. Finally, relaunch it.
Quit Xcode and relaunch to fix it.
I can't replicate your problem, but you could give this a shot:
Close Xcode. Right-click your .xcodeproj file, show package contents. Make a copy of your project.pbxproj somewhere as a backup, then open the original in TextEdit. Find "MyClass.h" in the file. You should find a few lines containing it; just delete the entire line each time (including the line break). Do the same for "MyClass.m". Then save, and open your project.

Resources