Created
January 31, 2020 23:03
-
-
Save embassem/908c4e8a3fb5e144eaf143b6d68afb4a to your computer and use it in GitHub Desktop.
Clean iOS app launch screen cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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