├── File Templates └── Licensed Objective-C Class.xctemplate │ ├── NSObjectApache 2.0 │ ├── ___FILEBASENAME___.h │ └── ___FILEBASENAME___.m │ ├── NSObjectBSD 3-Clause │ ├── ___FILEBASENAME___.h │ └── ___FILEBASENAME___.m │ ├── NSObjectMIT │ ├── ___FILEBASENAME___.h │ └── ___FILEBASENAME___.m │ ├── NSObjectUnlicense │ ├── ___FILEBASENAME___.h │ └── ___FILEBASENAME___.m │ ├── NSObjectZlib │ ├── ___FILEBASENAME___.h │ └── ___FILEBASENAME___.m │ ├── TemplateIcon.icns │ └── TemplateInfo.plist ├── LICENSE └── README.md /File Templates/Licensed Objective-C Class.xctemplate/NSObjectApache 2.0/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | ___IMPORTHEADER_licensedSubclass___ 18 | 19 | @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_licensedSubclass___ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectApache 2.0/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #import "___FILEBASENAME___.h" 18 | 19 | @implementation ___FILEBASENAMEASIDENTIFIER___ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectBSD 3-Clause/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // Redistributions of source code must retain the above copyright notice, this 9 | // list of conditions and the following disclaimer. Redistributions in binary 10 | // form must reproduce the above copyright notice, this list of conditions and 11 | // the following disclaimer in the documentation and/or other materials 12 | // provided with the distribution. Neither the name of the nor the names of 13 | // its contributors may be used to endorse or promote products derived from 14 | // this software without specific prior written permission. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | 28 | ___IMPORTHEADER_licensedSubclass___ 29 | 30 | @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_licensedSubclass___ 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectBSD 3-Clause/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // Redistributions of source code must retain the above copyright notice, this 9 | // list of conditions and the following disclaimer. Redistributions in binary 10 | // form must reproduce the above copyright notice, this list of conditions and 11 | // the following disclaimer in the documentation and/or other materials 12 | // provided with the distribution. Neither the name of the nor the names of 13 | // its contributors may be used to endorse or promote products derived from 14 | // this software without specific prior written permission. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #import "___FILEBASENAME___.h" 29 | 30 | @implementation ___FILEBASENAMEASIDENTIFIER___ 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectMIT/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | ___IMPORTHEADER_licensedSubclass___ 24 | 25 | @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_licensedSubclass___ 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectMIT/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "___FILEBASENAME___.h" 24 | 25 | @implementation ___FILEBASENAMEASIDENTIFIER___ 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectUnlicense/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // This is free and unencumbered software released into the public domain. 6 | // 7 | // Anyone is free to copy, modify, publish, use, compile, sell, or 8 | // distribute this software, either in source code form or as a compiled 9 | // binary, for any purpose, commercial or non-commercial, and by any 10 | // means. 11 | 12 | // In jurisdictions that recognize copyright laws, the author or authors 13 | // of this software dedicate any and all copyright interest in the 14 | // software to the public domain. We make this dedication for the benefit 15 | // of the public at large and to the detriment of our heirs and 16 | // successors. We intend this dedication to be an overt act of 17 | // relinquishment in perpetuity of all present and future rights to this 18 | // software under copyright law. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | // IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 24 | // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 25 | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | // OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // For more information, please refer to 29 | 30 | ___IMPORTHEADER_licensedSubclass___ 31 | 32 | @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_licensedSubclass___ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectUnlicense/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // This is free and unencumbered software released into the public domain. 6 | // 7 | // Anyone is free to copy, modify, publish, use, compile, sell, or 8 | // distribute this software, either in source code form or as a compiled 9 | // binary, for any purpose, commercial or non-commercial, and by any 10 | // means. 11 | 12 | // In jurisdictions that recognize copyright laws, the author or authors 13 | // of this software dedicate any and all copyright interest in the 14 | // software to the public domain. We make this dedication for the benefit 15 | // of the public at large and to the detriment of our heirs and 16 | // successors. We intend this dedication to be an overt act of 17 | // relinquishment in perpetuity of all present and future rights to this 18 | // software under copyright law. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | // IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 24 | // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 25 | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | // OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // For more information, please refer to 29 | 30 | #import "___FILEBASENAME___.h" 31 | 32 | @implementation ___FILEBASENAMEASIDENTIFIER___ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectZlib/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // In no event will the authors be held liable for any damages arising from 7 | // the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software in a 15 | // product, an acknowledgment in the product documentation would be 16 | // appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not be 19 | // misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | 23 | ___IMPORTHEADER_licensedSubclass___ 24 | 25 | @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_licensedSubclass___ 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/NSObjectZlib/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // ___FILENAME___ 2 | // 3 | // Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ 4 | // 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // In no event will the authors be held liable for any damages arising from 7 | // the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software in a 15 | // product, an acknowledgment in the product documentation would be 16 | // appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not be 19 | // misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | 23 | #import "___FILEBASENAME___.h" 24 | 25 | @implementation ___FILEBASENAMEASIDENTIFIER___ 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattt/Xcode-Licensed-Templates/8c5a41cbbcd897b498deb679bd3512213ef9f91e/File Templates/Licensed Objective-C Class.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /File Templates/Licensed Objective-C Class.xctemplate/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AllowedTypes 6 | 7 | public.objective-c-source 8 | public.objective-c-plus-plus-source 9 | 10 | DefaultCompletionName 11 | Licensed Objective-C Class 12 | Description 13 | Creates a new Objective-C class with an embedded software license. 14 | Kind 15 | Xcode.IDEKit.TextSubstitutionFileTemplateKind 16 | MainTemplateFile 17 | ___FILEBASENAME___.m 18 | Options 19 | 20 | 21 | Identifier 22 | productName 23 | Description 24 | The name of the class to create 25 | Name 26 | Class Name 27 | NotPersisted 28 | 29 | Required 30 | 31 | Type 32 | text 33 | 34 | 35 | Default 36 | NSObject 37 | Description 38 | What class to subclass in the new file 39 | Identifier 40 | licensedSubclass 41 | Name 42 | Subclass of 43 | Required 44 | YES 45 | Type 46 | class 47 | 48 | 49 | Identifier 50 | license 51 | Name 52 | License 53 | Description 54 | The license to embed into the source file. 55 | Type 56 | popup 57 | Default 58 | MIT 59 | Values 60 | 61 | Apache 2.0 62 | BSD 3-Clause 63 | MIT 64 | Unlicense 65 | Zlib 66 | 67 | NotPersisted 68 | 69 | 70 | 71 | Platforms 72 | 73 | com.apple.platform.iphoneos 74 | com.apple.platform.macosx 75 | 76 | SortOrder 77 | 1 78 | Summary 79 | An Objective-C class with an embedded software license. 80 | 81 | 82 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Mattt Thompson (http://mattt.me/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Xcode Licensed Templates 2 | ------------------------ 3 | 4 | **Minimal Xcode Templates for Open Source Developers** 5 | 6 | Xcode means well with all of its file templates and autocomplete fanciness. But more often than not, it just gets in the way, and generates dozens of lines of code that you'll delete anyway. 7 | 8 | These templates start your code off on the right foot: attribution and license in the header, followed by import statements and `@interface` / `@implementation`. 9 | 10 | Select from your favorite open source licenses to be embedded in the header: 11 | 12 | - [MIT](http://opensource.org/licenses/mit-license) 13 | - [Apache 2.0](http://opensource.org/licenses/Apache-2.0) 14 | - [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) 15 | - [Zlib](http://opensource.org/licenses/Zlib) 16 | - [The Unlicense](http://unlicense.org/) 17 | 18 | > Is your license of choice missing? Feel free to send a pull request! 19 | 20 | ## Installation & Usage 21 | 22 | - Create a new directory in `/Library/Developer/Xcode/Templates/Application/File Templates` called `Licensed`. 23 | As for Xcode 4.x & 5.x directory is: `~/Library/Developer/Xcode/Templates/File\ Templates` 24 | As for Xcode 6.x & newer directory is: `/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates` 25 | - Copy the contents of the "File Templates" directory of this repository into `Licensed`. 26 | - Relaunch Xcode and select "File > New File", or use the `⌘N` keyboard shortcut. 27 | - Select the "Licensed" category, then select the "Licensed Objective-C Class" template, and hit "Next". 28 | - Enter the name of your class and select the desired license. 29 | 30 | ![Step 1](https://raw.github.com/mattt/Xcode-Licensed-Templates/screenshots/xcode-template-step-1.png) 31 | 32 | ![Step 2](https://raw.github.com/mattt/Xcode-Licensed-Templates/screenshots/xcode-template-step-2.png) 33 | 34 | 35 | ## Contact 36 | 37 | Mattt Thompson 38 | 39 | - http://github.com/mattt 40 | - http://twitter.com/mattt 41 | - m@mattt.me 42 | 43 | ## License 44 | 45 | Xcode Licensed Templates is available under the MIT license. See the LICENSE file for more info. 46 | --------------------------------------------------------------------------------