Updated code generator, first cut at apple/mac/ios stubs