Build separate debug and release libraries, and teach Xcode to use them.
Organise debug/release build machinery so each library can be built separately.
Build for simulator as well as device, and produce fat binaries.