write initial app_delegate