Setup didFinishLaunchingWithOptions function.