Skip to content

Instantly share code, notes, and snippets.

@embassem
Created January 31, 2020 23:03
Show Gist options
  • Save embassem/908c4e8a3fb5e144eaf143b6d68afb4a to your computer and use it in GitHub Desktop.
Save embassem/908c4e8a3fb5e144eaf143b6d68afb4a to your computer and use it in GitHub Desktop.
Clean iOS app launch screen cache
public extension UIApplication {
func clearLaunchScreenCache() {
#if DEBUG
do {
let launchScreenPath = "\(NSHomeDirectory())/Library/SplashBoard"
try FileManager.default.removeItem(atPath: launchScreenPath)
} catch {
print("Failed to delete launch screen cache - \(error)")
}
#endif
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment