This repository has been archived by the owner on Jun 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 195bdaf
Showing
12 changed files
with
336 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
File Templates/Licensed Objective-C Class.xctemplate/Apache 2.0/___FILEBASENAME___.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ___FILEBASENAMEASIDENTIFIER___ : NSObject | ||
|
||
@end |
21 changes: 21 additions & 0 deletions
21
File Templates/Licensed Objective-C Class.xctemplate/Apache 2.0/___FILEBASENAME___.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#import "___FILEBASENAME___.h" | ||
|
||
@implementation ___FILEBASENAMEASIDENTIFIER___ | ||
|
||
@end |
32 changes: 32 additions & 0 deletions
32
File Templates/Licensed Objective-C Class.xctemplate/BSD 3-Clause/___FILEBASENAME___.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are met: | ||
// | ||
// Redistributions of source code must retain the above copyright notice, this | ||
// list of conditions and the following disclaimer. Redistributions in binary | ||
// form must reproduce the above copyright notice, this list of conditions and | ||
// the following disclaimer in the documentation and/or other materials | ||
// provided with the distribution. Neither the name of the nor the names of | ||
// its contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ___FILEBASENAMEASIDENTIFIER___ : NSObject | ||
|
||
@end |
32 changes: 32 additions & 0 deletions
32
File Templates/Licensed Objective-C Class.xctemplate/BSD 3-Clause/___FILEBASENAME___.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are met: | ||
// | ||
// Redistributions of source code must retain the above copyright notice, this | ||
// list of conditions and the following disclaimer. Redistributions in binary | ||
// form must reproduce the above copyright notice, this list of conditions and | ||
// the following disclaimer in the documentation and/or other materials | ||
// provided with the distribution. Neither the name of the nor the names of | ||
// its contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#import "___FILEBASENAME___.h" | ||
|
||
@implementation ___FILEBASENAMEASIDENTIFIER___ | ||
|
||
@end |
27 changes: 27 additions & 0 deletions
27
File Templates/Licensed Objective-C Class.xctemplate/MIT/___FILEBASENAME___.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ___FILEBASENAMEASIDENTIFIER___ : NSObject | ||
|
||
@end |
27 changes: 27 additions & 0 deletions
27
File Templates/Licensed Objective-C Class.xctemplate/MIT/___FILEBASENAME___.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import "___FILEBASENAME___.h" | ||
|
||
@implementation ___FILEBASENAMEASIDENTIFIER___ | ||
|
||
@end |
Binary file added
BIN
+72.3 KB
File Templates/Licensed Objective-C Class.xctemplate/TemplateIcon.icns
Binary file not shown.
66 changes: 66 additions & 0 deletions
66
File Templates/Licensed Objective-C Class.xctemplate/TemplateInfo.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>AllowedTypes</key> | ||
<array> | ||
<string>public.objective-c-source</string> | ||
<string>public.objective-c-plus-plus-source</string> | ||
</array> | ||
<key>DefaultCompletionName</key> | ||
<string>Licensed Objective-C Class</string> | ||
<key>Description</key> | ||
<string>Creates a new Objective-C class with an embedded software license.</string> | ||
<key>Kind</key> | ||
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string> | ||
<key>MainTemplateFile</key> | ||
<string>___FILEBASENAME___.m</string> | ||
<key>Options</key> | ||
<array> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>productName</string> | ||
<key>Description</key> | ||
<string>The name of the class to create</string> | ||
<key>Name</key> | ||
<string>Class Name</string> | ||
<key>NotPersisted</key> | ||
<true/> | ||
<key>Required</key> | ||
<true/> | ||
<key>Type</key> | ||
<string>text</string> | ||
</dict> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>license</string> | ||
<key>Name</key> | ||
<string>License</string> | ||
<key>Description</key> | ||
<string>The license to embed into the source file.</string> | ||
<key>Type</key> | ||
<string>popup</string> | ||
<key>Default</key> | ||
<string>MIT</string> | ||
<key>Values</key> | ||
<array> | ||
<string>Apache 2.0</string> | ||
<string>BSD 3-Clause</string> | ||
<string>MIT</string> | ||
<string>Zlib</string> | ||
</array> | ||
<key>NotPersisted</key> | ||
<false/> | ||
</dict> | ||
</array> | ||
<key>Platforms</key> | ||
<array> | ||
<string>com.apple.platform.iphoneos</string> | ||
<string>com.apple.platform.macosx</string> | ||
</array> | ||
<key>SortOrder</key> | ||
<string>1</string> | ||
<key>Summary</key> | ||
<string>An Objective-C class with an embedded software license.</string> | ||
</dict> | ||
</plist> |
27 changes: 27 additions & 0 deletions
27
File Templates/Licensed Objective-C Class.xctemplate/Zlib/___FILEBASENAME___.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. | ||
// In no event will the authors be held liable for any damages arising from | ||
// the use of this software. | ||
// | ||
// Permission is granted to anyone to use this software for any purpose, | ||
// including commercial applications, and to alter it and redistribute it | ||
// freely, subject to the following restrictions: | ||
// | ||
// 1. The origin of this software must not be misrepresented; you must not | ||
// claim that you wrote the original software. If you use this software in a | ||
// product, an acknowledgment in the product documentation would be | ||
// appreciated but is not required. | ||
// | ||
// 2. Altered source versions must be plainly marked as such, and must not be | ||
// misrepresented as being the original software. | ||
// | ||
// 3. This notice may not be removed or altered from any source distribution. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ___FILEBASENAMEASIDENTIFIER___ : NSObject | ||
|
||
@end |
27 changes: 27 additions & 0 deletions
27
File Templates/Licensed Objective-C Class.xctemplate/Zlib/___FILEBASENAME___.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ___FILENAME___ | ||
// | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___ | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. | ||
// In no event will the authors be held liable for any damages arising from | ||
// the use of this software. | ||
// | ||
// Permission is granted to anyone to use this software for any purpose, | ||
// including commercial applications, and to alter it and redistribute it | ||
// freely, subject to the following restrictions: | ||
// | ||
// 1. The origin of this software must not be misrepresented; you must not | ||
// claim that you wrote the original software. If you use this software in a | ||
// product, an acknowledgment in the product documentation would be | ||
// appreciated but is not required. | ||
// | ||
// 2. Altered source versions must be plainly marked as such, and must not be | ||
// misrepresented as being the original software. | ||
// | ||
// 3. This notice may not be removed or altered from any source distribution. | ||
|
||
#import "___FILEBASENAME___.h" | ||
|
||
@implementation ___FILEBASENAMEASIDENTIFIER___ | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2012 Mattt Thompson (http://mattt.me/) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Xcode Licensed Templates | ||
------------------------ | ||
|
||
**Minimal Xcode Templates for Open Source Developers** | ||
|
||
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. | ||
|
||
These templates start your code off on the right foot: attribution and license in the header, followed by import statements and `@interface` / `@implementation`. | ||
|
||
Select from your favorite open source licenses to be embedded in the header: | ||
|
||
- [MIT](http://opensource.org/licenses/mit-license) | ||
- [Apache 2.0](http://opensource.org/licenses/Apache-2.0) | ||
- [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) | ||
- [Zlib](http://opensource.org/licenses/Zlib) | ||
|
||
> Is your license of choice missing? Feel free to send a pull request! | ||
## Installation & Usage | ||
|
||
- Create a new directory in `/Library/Developer/Xcode/Templates/Application/File\ Templates` called `Licensed`. | ||
- Copy the contents of the "File Templates" directory of this repository into `Licensed`. | ||
- Relaunch Xcode and select "File > New File", or use the `⌘N` keyboard shortcut. | ||
- Select the "Licensed" category, then select the "Licensed Objective-C Class" template, and hit "Next". | ||
- Enter the name of your class and select the desired license. | ||
|
||
## Contact | ||
|
||
Mattt Thompson | ||
|
||
- http://github.com/mattt | ||
- http://twitter.com/mattt | ||
- [email protected] | ||
|
||
## License | ||
|
||
FormatterKit is available under the MIT license. See the LICENSE file for more info. |