How to add new templates in Xcode for iPhone application developement?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Popover segue to static cell UITableView causes co
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- didBeginContact:(SKPhysicsContact *)contact not in
You can make a template through changing the contents of the developer folder. I have done this myself. Let's say, you were making an html template: Step 1. Go to:/Developer/Library/Xcode/Templates/file templates/resource Step 2. make a folder there called HTML File.xctemplate. Step 3. Copy the contents of the RTF file folder Step 4. Paste the contents in your html folder. Step 5. Change the rtf extention of the
Step 6. Change the plist file to:
Step 7. now, when you add a new file, if you go to resources, you will find an html template. PS You just need to replace the html text to your choice, such as ruby.
For some advices, I suggest to take a look at answers to a related question: Change templates in Xcode.
In particular, if you want your modifications not to be lost whenever you upgrade Xcode, put your templates in
~/Library/Developer/Shared/Xcode
, not under/Developer
.I wrote an article on how to create a new Xcode template from an existing project here.
It covers:
It doesn't cover where to put the template. That information is covered in other answers.
XCode 4 changes how templates work, and where templates go, so be careful following instructions unless they refer to XCode 4. You can find a few template examples, and the paths to where they go in my XCode4 customization repository:
https://github.com/KiGi/XCode4Customization
The paths where the system templates live is:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/ Xcode/Templates/File Templates
Don't change those, copy and modify in your own library directory:
~/Library/Developer/Xcode/UserData/File Templates
Those paths are also in the "WhereToPlaceFiles" RTF file on github.
I had taken reference from this link, its really helpful having some correction in benny answer which I mentioned in comment
How to create project templates in Xcode 4
You can use this template which is a well researched one available in the market.
http://www.binpress.com/app/ios-boilerplate-and-template/1597