copy and paste any file in Xcode Workspace - xcode

I have opened a workspace in Xcode, now how are you suppose to copy paste a file.. Using keyboard Command+c/v does not work?

Related

Open project in XCode using Foodomia.xcworkspace file

I am installing a source code into xcode, however, it says to first open the project using the "Foodomia.xcworkspace" file. Where can I access the Foodomia.xcworkspace file in Xcode?
Thank You!
On the .xcodeproj file, right click > show package contents. Workspace file(s) will be in there.

Open file with WebStorm from MacOS finder

In OSX El Capitan, I have set WebStorm to be the default application for opening .js files like so. This successfully opens WebStorm when opening a .js file via finder, or when cmd-clicking on the file from iterm2.
However, when WebStorm opens, the file I've chosen is not opened within WebStorm. The app simply has the same files I've opened before (whether or not the WebStorm app was running when I opened the file).
Using open -a /applications/WebStorm.app <filename> works fine, but it's less convenient than just clicking on the file I want, as I do for file extensions that I've set to open in Eclipse or Sublime.
Is there a way to get WebStorm to open the file I've selected?
Known issue, please follow IDEA-129532 for updates

How to open Settings.bundle in Finder

I want to be able to add files to Settings.bundle folder using Finder but I'm unable to do so because Finder recognizes Settings.bundle as a file.
How do I view/edit the contents of Settings.bundle using Finder?
Just right click the file and choose Show package contents or use Go->Go to folder option using the bundle path.

where is the root of the Xcode app project directory located?

I'm following a app tutorial and it says:
"Next, create an empty file in the root of the Xcode app project directory and call the file Podfile. Open it with your favorite text editor and paste the following line in it:"
I'm confused exactly where this is? is it inside my Xcode program? or is it some folder inside my Xcode folder in finder?
Got it.
Open Terminal, navigate to the directory that has your project. Type it like this:
cd ~/Path/To/Folder/Containing/yourProject
I saved mine on my desktop so it was simple.
Then type: pod init
This creates the pod file.
Then type:
open -a Xcode Podfile
This will open the file so that you can edit it.
You should do it in Terminal.
Once in Terminal:
type cd (there is a space after cd)
drag your project to the Terminal window and press return. It points Terminal to your project.
type touch .Podfile, which will create an empty file in your project
type open -a TextEdit .Podfile, which will open the .Podfile file in TextEdit
paste your code in it and then save.
you can check that your Podfile has been created by typing ls -a in Terminal, which will show you all files and folders in your project
This should work.

In CLion, how can I rename a project?

I try to rename my project from encoding to Tutorial, but after I refactor directory name, it comes out an error, like:
Error: CMakeLists.txt not found in D:\code\encoding
I find that files in .idea directory don't change automatically, they are still encoding.iml, encodings.xml.
In the project folder, cd to the .idea directory. Locate the .name file and open it for editing. A single line of the current project name is displayed. Change it and save it.
If the .name file is not present, create it, then add a single line of text with the desired name.
Now reopen CLion and the project name has changed.
When using CLion with CMake, the project name is set by the project command inside the CMakeLists.txt.
Look for a line like the following and change "my_project_name" to the CLion project name you want.
project(my_project_name)
Then reload the file using Tools >> CMake >> Reload CMake Project or, if present, by clicking on Reload changes in the yellow bar across the top of the CMakeLists.txt editor window.
Note, if you use New Cmake Project From Sources... to create your project, then CLion generates the CMakeLists.txt at that time including a project command using the directory name. It is fine to edit CMakeLists.txt after it is generated, including changing the project name.
On Mac:
Close CLion
Rename your project folder, found at ~Users/Your_User/ClionProjects
Open CLion
Click "Open Project"
Browse for your renamed project
Wait for your project to fully load and update
If your are running Clion on a Mac, all you have to do is rename the directory that contains your .cpp and .h and CMake files then in Clion go to open then to the new name of the directory and Clion automatically figures everything else out.
That is what I did. However before you open the new project which is the project you renamed. Clion will create a project directory with the original name and it will be blank so you will have to Delete that directory.
However, if you are using windows or other machines it may not be the same. Because, now that i look, i don't have and .idea file.
Now that i think about it. Maybe this is a new feature since the new update. I am not sure when the new update for jetbrain IDEs was released. So, maybe that is a new feature that was not around at the time of your original post.
Easier Answer:
Why are you making it so hard? I have done this by either editing or adding a .name file to the .idea directory. I have done this several times and it works:
Edit or create your .name file in the .idea directory
Change or add file name.
Save file
Reopen project and voila, the new project name.
I did that in Linux. Grep oldProjectName in my project dir by cmd:
grep -rn oldProjectName
CMakeLists.txt, cmake-build-debug/ .idea/ have that str, so I replace all by cmd:
sed -i "s/oldProjectName/newProjectName/g" `grep -rl "oldProjectName" .`

Resources