react-native-webview-ios-cache-clear
Version:
Clear the cache of ios webview
22 lines (21 loc) • 864 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clearWebViewIOSCache = clearWebViewIOSCache;
var _reactNative = require("react-native");
const LINKING_ERROR = `The package 'react-native-webview-ios-cache-clear' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
const WebviewIosCacheClear = _reactNative.NativeModules.WebviewIosCacheClear ? _reactNative.NativeModules.WebviewIosCacheClear : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
function clearWebViewIOSCache() {
if (_reactNative.Platform.OS === 'ios') {
return WebviewIosCacheClear.clearWebViewIOSCache();
}
}
//# sourceMappingURL=index.js.map