To follow up, I did a quick test to see how this could be done. There is a solution for both open-source libraries, but it will require a bit of effort.
BlocklyDuino
This is an older library and does not have generators for many of the core default blocks. However, you can get up and running immediately with it.
1) From the Blockly repo (
https://github.com/google/blockly), copy "blockly_compressed.js" and "msg/js/<language of your choice>.js" (eg. "en.js") into your Xcode project.
2) Then copy "arduino_compressed.js" from BlocklyDuino into your project
3) Specify these files into CodeGeneratorService and you should be able to generate code (unfortunately, for very few blocks).
With this solution, you'll most likely need to create generators for many blocks (or copy them from ArduBlockly).
ArduBlockly
This one is more well-maintained and has generators for many of the core blocks. Unfortunately, it is out-of-date and needs to be merged with the Blockly core library in order to work with Blockly iOS (which assumes a version of Blockly master from the past year). So here's what you'll have to do:
1) Merge the latest version of Blockly into ArduBlockly's version, by following the instructions under "Git Configuration" in the README. This will probably result in conflicts, which need to be resolved.
2) Once merged and resolved, run the build script ("build.py") to generate updated versions of "blockly_compressed.js" and "arduino_compressed.js".
3) Copy "blockly_compressed.js", "arduino_compressed.js", and "msg/js/<language of your choice>.js" into your Xcode project.
4) Specify them into the CodeGeneratorService and generate the code.
This is probably the preferred approach to go with. It's a bit of work to setup, but should be relatively simple to use afterward.