Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Apple now encourages people to get the templates directly from the PyObjC project. There's a nice thread of explanation archived on <a href="http://www.cocoabuilder.com/archive/message/xcode/2009/8/31/30205" rel="noreferrer">Cocoabuilder</a>, with the following advice from bbum:</p> <blockquote> <p>You'll need to download and install the templates from the PyObjC<br> repository or web site.</p> <p>The templates were pulled from the release because the template<br> development moves at a different pace &amp; schedule than the Xcode<br> releases. Too often, the templates have been out of date by the time<br> the discs were pressed.</p> </blockquote> <p>The <a href="http://pyobjc.sourceforge.net/" rel="noreferrer">PyObjC website</a> has both the templates for download, and great documentation/tutorials to get up and going.</p> <hr> <p>Edit: Being a bit more specific, here's what I have done to get PyObjC working in Snow Leopard:</p> <ul> <li><p>Using the Finder, I went to <code>Go &gt; Connect to Server...</code> and connected to <a href="http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode/" rel="noreferrer">http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode/</a> as a guest.</p></li> <li><p>I then made a folder called <code>Xcode</code> on my local system at <code>~Library/Application Support/Developer/Shared/Xcode/</code>. (You may already have this folder, but I hadn't customized anything for myself yet).</p></li> <li><p>I copied the <code>File Templates</code> folder from the red-bean server into my new Xcode folder.</p></li> <li><p>Copied the <code>Project Templates</code> folder to some other place, for example, the Desktop.</p></li> <li><p>Using the Terminal, navigated to the temporary Project Templates folder on my Desktop and ran this command to "build" the template.:</p></li> </ul> <blockquote> <p>$ cd ~/Desktop/Project\ Templates/</p> <p>$ ./project-tool.py -k -v --template ~/Desktop/Project\ Templates/Cocoa-Python\ Application/CocoaApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Application ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Cocoa-Python\ Application</p> </blockquote> <ul> <li>Repeat for the other templates:</li> </ul> <blockquote> <p>$./project-tool.py -k -v --template ~/Desktop/Project\ Templates/Cocoa-Python\ Document-based\ Application/CocoaDocApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Document-based\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Cocoa-Python\ Document-based\ Application</p> <p>$ ./project-tool.py -k -v --template ~/Desktop/Project\ Templates/Cocoa-Python\ Core\ Data\ Application/CocoaApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Core\ Data\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Cocoa-Python\ Core\ Data\ Application</p> <p>$ ./project-tool.py -k -v --template ~/Desktop/Project\ Templates/Cocoa-Python\ Core\ Data\ Document-based\ Application/CocoaDocApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Core\ Data\ Document-based\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Cocoa-Python\ Core\ Data\ Document-based\ Application</p> </blockquote> <ul> <li>I launched Xcode. The templates are now located under the "User Templates" section of the <code>New Project...</code> and <code>New File...</code> windows.</li> </ul> <p>The default project built out of the box (no need to install anything else from the PyObjC project, or py2app). I cobbled up a silly program with one button and an action, and it worked beautifully, including integration with Interface Builder (I was able to control-drag to wire up actions and outlets).</p> <p>I also recently stumbled across a <a href="http://scottr.org/blog/tags/pyobjc/" rel="noreferrer">series of "Getting Started" tutorials</a> on a blog that seemed quite useful for beginners. The author appears to have put a lot of effort into the "Building Cocoa GUIs in Python with PyObjC" series (currently in 6 parts).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload