UIApplication and UIWindow error using swift fix