@hanwha-ss1/plugin 0.6.0 → 0.7.0-beta.1
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 +17 -0
- package/package.json +2 -2
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -7,6 +7,23 @@ import Contacts
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(Plugin)
|
|
9
9
|
public class Plugin: CAPPlugin {
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
override public func load() {
|
|
13
|
+
// 문서뷰어 요청 이벤트
|
|
14
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleDocumentViewRequest(_:)), name: .documentViewRequest, object: nil)
|
|
15
|
+
// NotificationCenter.default.addObserver(self, selector: #selector(handleCustomEvent(_:)), name: .myCustomEvent, object: nil)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@objc func documentViewRequest(_ notification: Notification) {
|
|
19
|
+
if let userInfo = notification.userInfo as? [String: Any] {
|
|
20
|
+
notifyListeners("DocumentViewer", data: userInfo)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
deinit {
|
|
25
|
+
NotificationCenter.default.removeObserver(self)
|
|
26
|
+
}
|
|
10
27
|
|
|
11
28
|
/**
|
|
12
29
|
안드로이드에서만 사용
|
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.1",
|
|
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
|
+
}
|