@hanwha-ss1/plugin 0.6.0 → 0.7.0-beta.2
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.swift +20 -0
- package/package.json +2 -2
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -5,8 +5,28 @@ import Contacts
|
|
|
5
5
|
* Please read the Capacitor iOS Plugin Development Guide
|
|
6
6
|
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
7
|
*/
|
|
8
|
+
extension Notification.Name {
|
|
9
|
+
static let documentViewRequest = Notification.Name("documentViewRequest")
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
@objc(Plugin)
|
|
9
13
|
public class Plugin: CAPPlugin {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
override public func load() {
|
|
17
|
+
// 문서뷰어 요청 이벤트
|
|
18
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleDocumentViewRequest(_:)), name: .documentViewRequest, object: nil)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@objc func handleDocumentViewRequest(_ notification: Notification) {
|
|
22
|
+
if let userInfo = notification.userInfo as? [String: Any] {
|
|
23
|
+
notifyListeners("DocumentViewer", data: userInfo)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
deinit {
|
|
28
|
+
NotificationCenter.default.removeObserver(self)
|
|
29
|
+
}
|
|
10
30
|
|
|
11
31
|
/**
|
|
12
32
|
안드로이드에서만 사용
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanwha-ss1/plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"description": "Plugin",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"gitHead": "dbc41811fcd3e5956cc77c6df41d831c9370c1b3"
|
|
79
|
-
}
|
|
79
|
+
}
|