Calling WKWebsiteDataStore.getDefaultDataStore().removeData and passing 'null' as the Runnable callback will cause a crash.
Usually when a Runnable is used as a callback handler, one can just pass in null, and it will work fine.
Workaround is simple, just supply an empty lambda.
Issue details
Calling
WKWebsiteDataStore.getDefaultDataStore().removeData
and passing 'null' as the Runnable callback will cause a crash. Usually when a Runnable is used as a callback handler, one can just pass in null, and it will work fine. Workaround is simple, just supply an empty lambda.Reproduction steps/code
WKWebsiteDataStore.getDefaultDataStore().removeData(WKWebsiteDataStore.getAllWebsiteDataTypes(), NSDate.getDistantPast(), null);
Configuration
Build Tools:
Versions:
Build Targets:
This is tested on an M1, with the iPhone 15 Simulator, (running iOS 17.5)