<ul>
<li>Is there a key shortcut for this in XCode?</li>
<li>Can I implement an Applescript for this and run it within XCode?</li>
</ul>

You can probably do that using a script (check out the relevent piece of Xcode documentation). Also see the "Insert Text Macro" menu item…
But you might find it to be more efficient to just use the auto-correct feature. I just type "[[F", then hit my auto-correct key (bound to F5 I believe, but I've changed it), type enough of the class name for it to be selected in the autocorrect popup. Hit space, start typing alloc but let auto correct kick in. Close the brace. Start typing init, use autocorrect again.
You generally shouldn't need to create macros/scripts for something this trivial. The autocorrect, placeholders and autofill features should be all you really need.