How to Rename Complete Xcode Project using command line? - xcode

I am trying to rename my xcode project using command line but some how it's not renaming entire project. My project structure is bit more nested and I need to replace one string which is even a sub string of Project name and some files names I tried http://stackoverflow.com/questions/29824737/xcode-6-3-1-crashes-while-renaming-project/29830195#29830195, but it's not worked for me with this project but for some other project(which is sample app with not much nested structure) it worked well. . Any suggestions will be appreciated.

Here is a quick and nice solution for my question. By following this link I achieved what exactly I want , It saved my most of time, https://www.reddit.com/r/Python/comments/32r8i6/findreplace_string_in_files_filenames_and/

Related

Using Command line to add files to xcode project

I am trying to write a bash script that downloads a bunch of classes from the internet, inserts them into an existing (or maybe not?) xcode project and compiles them using xcodebuild into a static library.
However, I could not find a way to add classes to the project via command line, but only by gui.
Is there any way to do so?
In addition, is there any way to create an xcode project via the command line?
You should read about cocoapods.
Regarding your second question about creating a project via the command line, check this link: cmake
If I remember correctly the terminal command should be something like cmake -G Xcode .....
An old problem and I haven't found a valid solution, but actually, with a bit knowledge from the community, it wasn't that hard to solve. I published my results in the github project XCodeControl.
You need a basic xcode project created by xcode though. It should be possible to create an empty xcode project pattern and copy+modify that to create a new project.

Eclipse ADT 'Couldn't resolve resource' but works fine

I realised today that you don't have to have string values in 'strings.xml', dimensions in 'dimens.xml', etc and you can put them in any xml file or indeed combine them all into one. As long as they are findable in the res folder and match the correct xml element format.
However, while this works fine and runs, Eclipse gives me an error 'Couldn't resolve resource' in the activity view when I try and use a value from the above, but it works just fine. Does Eclipse only search known file names or am I not doing something to get it to work.
I appreciate this may not be the recommended approach but I actually found this method in Reto Meier's Android development book, and I figured if he is one of the engineers it must be ok to do so :)
Solved it, in the #prefix/varname you put the name of the file as the prefix, e.g. if the file was called bob.xml and the variable was called name it would be #bob/name.

Accessing an external file from MacRuby

I have done several small scripting/automation projects before but this is my first time using MacRuby and I couldn't find out at all why my project is not working.
This task would have been easy to fix if it was just a plain Ruby script. However, it needs a Mac GUI so I decided to use MacRuby for its Cocoa bindings.
The app itself is a simple form that will perform a calculation based from some data from an external CSV and some text fields and then show the results of the calculation.
My problem is that this code does NOT seem to work:
#arr_from_csv = CSV.read("data.csv")
Upon building the file, I get the following error:
[...]/ruby/1.9.2/CSV.rb:1335:in `open': No such file or directory - open() failed (Errno::ENOENT)
At first, I thought that I must have put the CSV file into the wrong directory inside XCode project's folder structure. I tried putting on the same folder as the script itself (app_delegate.rb). Didn't work. I tried putting it in the Resources folder, still didn't work.
Then, I decided to just use an absolute file path. So, I changed to code into:
#arr_from_csv = CSV.read("~/data.csv")
and copied the file into my home directory. It still can't read the CSV file.
Am I missing something? I'm sorry, this is my first time using MacRuby.
Thanks.
You should change the code to "/Users/xxx/data.csv".
Ruby does not expand "~" to "/Users/xxx".
Notice: xxx represents your login id.
I was able to solve my problem by using:
#arr_from_csv = CSV.read(File.expand_path("~/data.csv"))

Setting output path of the projects in solution file with VS2010

I have a solution file that contains tens of project files. And I need to set the 'Output path:' of the compiled results to different directory for all the projects in a solution file. Can I change the output path one time with the solution file to apply the change to the all the projects in it?
I don't think so, but you can edit the build path within each project file looking for <OutputPath>bin\Release\</OutputPath>, maybe you can work with search&replace to do this easily... Just a suggestion, hope this will help.

How to create a template for visual studio 2008 for multiple projects

I want to create a template kind of thing where there will be more than one project in the solution. Like one test project + one normal project + some other project.
How to do that.
When I export a template it exports only one project.
We had to resort to a powershell script to do this, as we couldn't find a reliable way of doing this.
This is fully supported but you'll need to modify the .vstemplate file manually. Starting by running the Save as Template on each project is a good first step. Now you need to bind them together in another .vstemplate. More information can be found here:
http://msdn.microsoft.com/en-us/library/ms185308(v=vs.80).aspx
Have you tried this: http://visualstudiogallery.msdn.microsoft.com/57320b20-34a2-42e4-b97e-e615c71aca24

Resources