Comments on: Creating Xcode Templates https://briksoftware.com/blog/archives/28 Thu, 14 Jun 2012 18:56:48 +0000 hourly 1 https://wordpress.org/?v=4.7 By: Karsten https://briksoftware.com/blog/archives/28/comment-page-1#comment-16238 Tue, 28 Jun 2011 21:03:21 +0000 https://briksoftware.com/blog/?p=28#comment-16238 sorry, i’ve not yet tried that, but if you find out more, please share!

]]>
By: harsha https://briksoftware.com/blog/archives/28/comment-page-1#comment-16237 Mon, 27 Jun 2011 09:51:40 +0000 https://briksoftware.com/blog/?p=28#comment-16237 What if I want to create a custom template depending on user input. So that while creating a new project user can actually give some input for choosing various files/components? Is that possible?

]]>
By: Sunetos, Inc. :: Creating an Xcode project template with GHUnit and OCMock https://briksoftware.com/blog/archives/28/comment-page-1#comment-16211 Sat, 22 Jan 2011 21:14:56 +0000 https://briksoftware.com/blog/?p=28#comment-16211 […] Creating Xcode Templates (blog post) […]

]]>
By: Karsten https://briksoftware.com/blog/archives/28/comment-page-1#comment-16130 Thu, 19 Nov 2009 17:01:04 +0000 https://briksoftware.com/blog/?p=28#comment-16130 Hi Motti, thanks for sharing your findings.

1. Plists can be saved either as XML or as Binary format. Both is supported by Apple’s Plist Editor so you can just try it yourself to save a plist as binary.
2. i can’t remember why i used the text-editor… probably because of the encoding.
3. true indeed
4. nice find!
5. i have actually no idea
6. nope, no idea here…

Karsten

]]>
By: Motti Shneor https://briksoftware.com/blog/archives/28/comment-page-1#comment-16129 Thu, 19 Nov 2009 07:13:03 +0000 https://briksoftware.com/blog/?p=28#comment-16129 Thanks, this is very good. I spent a lot of time trying to get this missing information about XCode templates, and last I had to decipher it all by myself. It’s assuring to see that my findings match yours. However — There are few notes.

1. plists ARE xml. I never saw any “binary” version of a plist file. So I don’t quite get what you mean.

2. If you have XCode installed — You also have the “PList Editor” which gives you easy UI for editing plists. Why bother to work directly on the XML text of it? Search and replace are available, Encoding is handled automatically…. why not use it

3. Even if you want to edit the plist text by yourself — XCode itself is a good choice, and it does handle file encodings too.

4. There are two distinct way I saw in Apple’s own templates, to put “Macros” in the template files. One is the «MACRONAME»
where you must use the templateInfo.plist to explicitly tell XCode to MacroExpand the file, but there is another way, using ___MACRONAME___ instead. (3 underscores before and after the Macro name). These macros are being parsed and expanded even if you do not specify the file’s name in the template’s templateInfo.plist. Apple even uses these macros in the File names in the template directory.

5. One big mystery is the list of Apple provided Macros (like PROJECTNAME) and their content when compiling a template. What is (to your best knowledge) this list?

6. There is a new “templateChooser.plist” which allowes creating simple GUI with popup menus and checkboxes, to allow the user to specify the exact kind of template or template-variation he wants. I managed to duplicate Apple’s own templateChooser.plist behaviors, but I don’t know what is POSSIBLE. Have you any ideas?

Thanks again, and feel free to e-mail me anytime.
Motti

]]>
By: ThreeE https://briksoftware.com/blog/archives/28/comment-page-1#comment-16115 Sat, 30 May 2009 22:09:57 +0000 https://briksoftware.com/blog/?p=28#comment-16115 Great info. My only problem is that once I modify project.pbxproj to include the macro version of filenames, Xcode is no longer able to parse the project.pbxproj file of the template.

]]>
By: Gustavo Chaurais https://briksoftware.com/blog/archives/28/comment-page-1#comment-16109 Fri, 20 Feb 2009 23:51:44 +0000 https://briksoftware.com/blog/?p=28#comment-16109 Don’t you have to use «PROJECTNAMEASIDENTIFIER», instead of «PROJECTNAME» for the file names? Otherwise, if you create a project with a space in the name (ex: “My First Project”, you’ll end up by having file names with space, which is no good. Using «PROJECTNAMEASIDENTIFIER» should fix this problem. It’s also the way Apple implemented iPhone templates.

]]>
By: Jesse Grosjean https://briksoftware.com/blog/archives/28/comment-page-1#comment-15092 Sun, 27 Jan 2008 21:08:13 +0000 https://briksoftware.com/blog/?p=28#comment-15092 I just created a mini tool that can help with this process http://hogbaysoftware.com/products/xcodetemplatefactory

]]>
By: fdiv.net » Xcode Template for Custom Quartz Composer Patches https://briksoftware.com/blog/archives/28/comment-page-1#comment-2508 Tue, 08 May 2007 19:36:13 +0000 https://briksoftware.com/blog/?p=28#comment-2508 […] Frustrated with the tedium of going through all the Xcode project files in a text editor and manually replacing all of the identifiers and filenames when creating a new Quartz Composer Patch, I decided to finally figure out how to create a new Xcode template. It’s pretty straightforward, actually, given Karsten Kusche’s instructions. […]

]]>
By: Karsten https://briksoftware.com/blog/archives/28/comment-page-1#comment-1045 Sun, 25 Mar 2007 08:01:26 +0000 https://briksoftware.com/blog/?p=28#comment-1045 Yeah, exactly…you must not have more files than these two in your project bunde, maybe i should have made it a bit more clear in the post.

]]>