This may be possible, but don't expect it to be easy, so your milage may vary.
You can use the xcodebuild
command from the command line to build the .app file in the required architecture (or alternatively, when you run the app on the simulator, go to the DerivedData folder for your project and you should find the .app file in there somewhere)
You can then use the following command to archive it into an IPA:
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"
Check out This StackOverflow article and this blog post