Git Product home page Git Product logo

better-xcode-templates's Introduction

About
-----
The templates that ship with Xcode are not the greatest. Some of them are inconsistent
and don't enforce good coding standards (e.g. missing a dealloc method). Other templates
which would be useful just flat out don't exist (e.g. an NSOperation subclass, or a
protocol header file). This project aims to supplement or replace the built-in templates
for Xcode to speed up coding and improve the quality of code.

Install
-------
From your terminal:
1. mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/{Project,File}\ Templates
2. git clone git://github.com/amazingsyco/better-xcode-templates.git
3. ln -s $PWD/better-xcode-templates/Templates/File\ Templates
   ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates/Better\ Xcode\ Templates
4. ln -s $PWD/better-xcode-templates/Templates/Project\ Templates
   ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Better\ Xcode\ Templates

Note: Do NOT simply git clone the templates into the template folders, as Xcode will
pick up all the cruft from the .git folder.

Coding Standard
---------------
All files will be processed by Xcode. The generated source files must produce consistent,
readable, commented code. The code must have these characteristics:

- Each file must have a comment block at the top describing the file.
- Each class must implement its superclass' designated initializer and dealloc.
- Stub methods must be organized by their purpose, class or protocol.
-- Each group must be organized by their class hierarchy, with protocol stubs following.
-- Each group must be prefaced by a pragma mark naming the class or protocol the methods
   were implementing.
-- Clusters of methods (such as relating to KVO) should be organized along the lines
   above, with a pragma mark.
- All method implementations should contain a method call to their super implementation
  if needed.
- All method implementations should contain a commented out stub line that will signify
  where to insert their code. 
- All comments must be in the form of two slashes //, and none using the /* */ form. This
  will allow developers to comment out large blocks of code as needed.

Wish List
---------
- Different people want different things in their template. For instance, someone may
  want to include an implementation of observeValue:... for every class. Would be nice
  to have a template generator application (yeah yeah, very meta) which would make
  templates customized to the developer.

better-xcode-templates's People

Contributors

stevestreza avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.