iOS build error: SDK "iphoneos4.2" cannot be located

I recently upgraded to haxe 3.3 from 3.1 on osx, to keep synced with my PC installation of openFL.

However now when I build for iOS I receive this error:
SDK “iphoneos4.2” cannot be located.

In particular it seems to show up when I run this command:
lime rebuild src/NativeSupport ios

I have to run that command before doing a full build to ensure that my extension is compiled correctly.
When updating haxe it moved the base installation directory from /usr/lib to /usr/local/lib so I’m not sure if that has anything to do with it at this point.

My issue seems related to this: Cannot build for IOS
though I am not building for simulator

I’m locked in to openfl 3.6.1, lime 2.9.1.
Also running xcode 7.2.1
This is a legacy project so I’m looking to update as little as possible to ensure that everything still builds.

Haxe 3.2.1 should be more reliable than Haxe 3.3, but this issue appears to be one that was resolved in newer HXCPP releases, it was caused by this line:

You could try commenting yours out, or using a newer HXCPP version

updating hxcpp did the trick. thanks!