How to add copyrights to my current app in xcode using MAC OS

405 Views Asked by At

I am working on an app.I have finished the app development module ,now i am working on getting it ready for delivery to client.

I have to add client's copyrights to all the .h,.m files inn my projects.As there are around 700+ files in this .Also i don't want to use the cntrol+find in entire app and replace it with the copyright content required.

Is there any other approach i can look into to add the copyrights content to it.I heard of creating some sort of batch file and then using terminal to add copyrights to project but i am not sure how to implement this.

Any help would be appreciated. Thanks

1

There are 1 best solutions below

0
On

Hmm, this may need just a little shell scripting. In general, this is how I would attempt to tackle it:

  1. Create a text file with your copyright.
  2. Create a text file with the (code) file names you need to add the copyright to. (Should be pretty easy with something like ls *.m > script).
  3. Open the script file with a text editor and modify each line so that it reads: cat copyright 'filename' > Should be pretty easy to do with a macro
  4. Set the script file's execution bit: chmod a+x script
  5. Run the script by: ./script

Notice that this produces files with '_out' at the end. Change it to what fits you.