No, you don’t use yiic on production server to generate code. You only use it on your dev machine which you normally should have full control over it.
The yiic code generation tool is just a way to help you speed up your development. If you are familiar with yii, you can create an application from scratch without using yiic.