optimize and deploy swift