@hanwha-ss1/plugin 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/Plugin/Plugin.m +1 -0
- package/ios/Plugin/Plugin.swift +19 -0
- package/package.json +1 -1
package/ios/Plugin/Plugin.m
CHANGED
|
@@ -20,5 +20,6 @@ CAP_PLUGIN(Plugin, "Plugin",
|
|
|
20
20
|
CAP_PLUGIN_METHOD(getCertificateProvisioning, CAPPluginReturnPromise);
|
|
21
21
|
CAP_PLUGIN_METHOD(saveUserDefault, CAPPluginReturnPromise);
|
|
22
22
|
CAP_PLUGIN_METHOD(getUserDefault, CAPPluginReturnPromise);
|
|
23
|
+
CAP_PLUGIN_METHOD(clearCache, CAPPluginReturnPromise);
|
|
23
24
|
|
|
24
25
|
)
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -132,6 +132,25 @@ public class Plugin: CAPPlugin {
|
|
|
132
132
|
// data 매개변수에 keyboardsize를 전달
|
|
133
133
|
self.notifyListeners(notification.name.rawValue, data: ["size": keyboardSize.height])
|
|
134
134
|
}
|
|
135
|
+
// 캐시 클리어
|
|
136
|
+
@objc func clearCache(_ call: CAPPluginCall){
|
|
137
|
+
// WKWebsiteDataStore의 데이터 삭제 (로컬 스토리지 제외)
|
|
138
|
+
WKWebsiteDataStore.default().removeData(
|
|
139
|
+
ofTypes: [
|
|
140
|
+
WKWebsiteDataTypeDiskCache,
|
|
141
|
+
WKWebsiteDataTypeMemoryCache,
|
|
142
|
+
WKWebsiteDataTypeCookies,
|
|
143
|
+
WKWebsiteDataTypeSessionStorage,
|
|
144
|
+
WKWebsiteDataTypeWebSQLDatabases,
|
|
145
|
+
WKWebsiteDataTypeIndexedDBDatabases,
|
|
146
|
+
],
|
|
147
|
+
modifiedSince: Date(timeIntervalSince1970: 0)
|
|
148
|
+
) {
|
|
149
|
+
print("🔴 HomeViewController: WKWebView cache and data cleared successfully")
|
|
150
|
+
}
|
|
151
|
+
// HTTP 캐시 삭제
|
|
152
|
+
URLCache.shared.removeAllCachedResponses()
|
|
153
|
+
}
|
|
135
154
|
// ios 인증서 만료일을 가져온다
|
|
136
155
|
@objc func getCertificateProvisioning(_ call: CAPPluginCall){
|
|
137
156
|
|