xcodebuild + waxsim
above is for debug
update:
here is for archive
use xcrun and xcodebuild to package *ipa
(show me the introdution) http://miraclei.net/?p=551
(show me the app file path:build/.........) http://www.cnblogs.com/ThankForYou/archive/2012/11/04/2754256.html